Skip to content

Processing Parameters

Sebastian Scherer edited this page Feb 9, 2014 · 7 revisions

This page describes dealing with processing parameters in 2dx

Processing parameter and configuration mechanism in 2dx

General approach

Processing parameters are displayed in the central section of 2dx_merge and 2dx_image. The GUI uniquely shows a view to the underlaying configuration file. Changing the value in one script changes the value in all scripts. All processing parameters are defined in a master configuration file and are included in the processing scripts by adding two lines. Traditionally 2dx supports locally defined parameters in each script, but using this option is not the recommended approach.

Configuration files in 2dx

Definition of processing parameters

All processing parameters used in 2dx are defined in "kernel/config/2dx_master.cfg". Each configuration parameter is defined by a couple of lines detailed below.

# LABEL: Upper Resolution Limit (RESMAX)

Short text describing the processing parameter. This label will be shown in the central configuration panel of 2dx.

# LEGEND: The upper limitation in resolution, in Angstroem. This one should be high resolution (e.g. 4.0 A), while the other RESMIN should be the lower resolution cutoff (e.g. 200A).

Detailed description of the parameter shown when right-clicking on the parameter.

# EXAMPLE: RESMAX = "4.0"

Exemplary value given the user more hints on how to set this particular value. Is shown in the help box.

# HELP: http://2dx.org/documentation/2dx-software/parameters/Resolution

Link to the full online documentation of the processing parameter section

# TYPE: Float "MIN=0.1;MAX=10000000.0;DEFAULT=16.0"

Type and legal range of the processing parameter. Information shown in the help button

# LOCKED: NO

Should the parameter be locked by default.

# INHERITABLE_UPON_INIT: YES

tbd

# SYNC_WITH_UPPER_LEVEL: NO

Can the parameter be synchronized upwards. This is particularly important when optimizing parameters related to processing of individual images.

# USERLEVEL: SIMPLE

Is the parameter for experts or for average users?

# ISWRONG: YES

Important parameters that need manual checking before the script is required, this parameter should be YES. If the parameter is ISWRONG the editable box has a blue background. Once the parameter is modified, the background will be gone

set RESMAX = "4.0"

Setting the default value of the parameter

Supported processing parameter types

List of allowed types:

  • INTEGER
  • Float
  • Two_Float
  • Three_Float
  • Four_Float
  • Bool
  • Drop_Down_Menu
  • File_Path
  • Dir_Path

Usage of parameters in scripts

A processing parameter is displayed for a processing script if by adding # DISPLAY: RESMIN to the script. The value is read from the GUI by set RESMIN = "" in the script. The parameter will be available in the processing script via ${RESMIN}.

Listing of parameters in the image section of 2dx_merge

Parameter that should be visible in the images section of 2dx_merge need an additional entry in "kernel/config/2dx_merge/projectMenu.inf" like:

RESMIN (ResolutionMIN,mouseover="Lower Resolution Cutoff",nonlockable,sortable)