4d — Parameter Editor

Preferences ▸ Parameters · 4d User Manual

← Back to Preferences

The Parameter Editor

The Parameters tab of the Preferences dialog opens the Parameter Editor — the master list of every parameter 4d knows about. Each parameter has a name used in the processing scripts (via their # DISPLAY: lines) and a set of properties (label, default value, type, help, and where it is shown). The scripts and the per-dataset/project configuration all draw their labels, types and defaults from here. Parameters are grouped into tabs, one per parameter file (Sample, 4D STEM, Parallax, …).

The numbered markers on the screenshot point to each region; the legend and the sections below explain them. The ? button at the top-right of the Parameter Editor (just to the right of the mode-filter toggle) opens this page.

The Parameter Editor with numbered regions 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#Region / columnWhat it is and does
1Preferences tabsThe nine Preferences pages; Parameters is selected here.
2Parameter Editor titleThe panel title.
3Mode-filter toggle"Showing only parameters valid for program mode …" — toggles between showing only the parameters used in the current program mode and showing all parameters. The ? help button sits just to its right.
4Section tabsOne tab per parameter file / group (Sample, 4D STEM, Parallax, Ptychography, Motion correction, …). Use the ‹ › arrows to reach tabs that don't fit. Editing a tab writes back to its own .cfg file.
5Row # & "4D" show-in-table boxThe row number, and a check-box that makes the parameter appear as a column in the Library table for the current program mode.
6ParameterThe parameter's internal name, exactly as scripts reference it in their # DISPLAY: lines. Must be unique (see below).
7LabelThe human-readable text shown for this parameter in the Manual Processing parameter form.
8ValueThe parameter's default value.
9TypeThe parameter's data type — see Parameter types.
10DescriptionThe explanatory text (legend), shown to the user as the parameter's tooltip/help.
11ExampleAn example value, to show the expected format.
12Lock / Wrong / SyncThree YES/NO flags controlling initial lock state, the "still needs editing" mark, and project-wide syncing — see Lock, Wrong & Sync.
13User & program mode (4D / Fibr.)The User level (Normal vs. Advanced — advanced parameters are hidden until "Show advanced" is on), and the 4D / Fibr. check-boxes that say which program mode(s) the parameter belongs to.
14HelpAn optional link to a help page for the parameter.
15Action buttonsAdd New Parameter, Copy / Cut / Paste (⌘C/⌘X/⌘V), and Search (⌘F) at the bottom-left; Save All Parameters and Close without saving at the bottom-right.
Double-click any row to open the full Edit Parameter dialog, where you can change the name, label, value, type, min/max, description, example, the lock/wrong/sync flags, user level and program mode. Add a new one with Add New Parameter.

Parameter types

The Type column (9) fixes how a parameter is entered and validated. The available types are:

TypeMeaning
Text_EditFree text — any string.
Bool (y;n)A yes/no switch, stored as y or n.
IntegerA whole number.
FloatA decimal number. A range can be attached, written as Float "MIN=…;MAX=…".
Two_FloatA pair of decimal numbers (e.g. 16,100).
Three_FloatThree decimal numbers.
Drop_Down_MenuA choice from a fixed list, written as Drop_Down_Menu "a;b;c" — the GUI shows a drop-down of those options.
File_PathA path to a file (with a file browser).
Dir_PathA path to a directory.
Dir_Path_No_SubdirA directory path, restricted to a directory without browsing into sub-directories.
File_Path_System_WideA file path resolved against system-wide locations.
File_Path_Project_WideA file path resolved against the project.
File_Path_Local_ImageA file path local to the current image/dataset.

Lock, Wrong & Sync

These three YES/NO columns (12) are per-parameter flags:

FlagYES means…
LockThe parameter starts locked in the processing GUI — a small lock icon is shown, and the user must unlock it before editing. Use it to protect values that should rarely change.
WrongThe parameter is flagged as still requiring editing — it is marked as "wrong / not yet set" so the user's attention is drawn to it before a script is run.
Sync (sync with upper level)The parameter is global / project-wide: its value is shared across all datasets (synchronised with the project level) instead of being stored separately per dataset. Changing it in one place changes it everywhere.

Parameter names must be unique

A parameter name (column 6) may appear only once across the whole Parameter Editor — the name is the key that scripts use, so two definitions would be ambiguous. If the same name is entered twice (in the same tab or in different tabs), every row with that name is highlighted in orange to flag the clash. An orange row means you must rename or remove one of the duplicates before saving. The Edit Parameter dialog also turns the name field orange and warns "Parameter exists already in tab '…'" as you type a name that is already in use.