Expression filter
This output allows filtering on and changing individual localization fields. It is distributed into two parts: The simple input fields for minimum localization strength, linear drift correction and maximum two kernel improvement give easy access to often-needed manipulations, while the more complex test-based expressions give full access to all localization fields.
The number of Value to assign to and Expression to assign from fields in this output is variable and can be changed with the Number of expressions field. These fields form pairs called "actions", and all of the actions take effect. The order of application is top-to-bottom.
If this field is enabled, all localizations with a strength lower than its value are discarded and not displayed or stored in the suboutputs. The localization strength denotes the total signal detected in the PSF, i.e. the integral of the point spread function.
If this field is enabled, all localizations are shifted in space by an amount proportional to the time coordinate of their detection. This is used to implement linear drift correction.
If this field is checked, all localizations with a two-kernel improvement (quotient of residues with two kernels and residues with one kernel) greater than the given value are discarded. This value is used for artifact suppression and is only available when Compute two kernel improvement has been checked.
This option box determines the effect of the action. It can either take the value of Filter, in which case Expression to assign from must give a boolean result, or a variable name, in which case Expression to assign from must give a numerical result which matching dimensions. The possible variable names are formed by applying the modifiers from Table 2, “Variable name modifiers for expressions” to Table 1, “Variable base names for expressions”, with examples in Table 3, “Variable example names for expressions”.
This text field gives an arithmetic expression for the value of the action. An
expression consists of variables explained in Value to assign to and constants,
linked by the usual arithmetic operators. Constants are given as numbers with units, which
can be m
, ADC
or fr
for
meters, camera A/D counts of frames, respectively, and be prefixed with the usual SI prefixes
(with u
for μ). The available operators are given in Table 4, “Operators in expressions”.
Examples for complete actions are listed in Table 5, “Example actions”
Table 1. Variable base names for expressions
Variable base name | Dimension | Type | Meaning |
---|---|---|---|
pos | m | 3D vector | Position in sample space |
amp | ADC | scalar | Intensity of emission |
frame | fr | scalar | Time of emission |
psffwhm | m | 2D vector | PSF model's full width at half maximum |
fishy | dimensionless | scalar | Two-kernel improvement |
chisq | dimensionless | scalar | Fit residues. For least-squares fitting, this value gives the sum of squared deviations between PSF model and data in photons squared. For MLE fitting, this value gives the total likelihood score. In both cases, the value is not normed in any way and unlikely to be comparable between measurements. |
fluo | dimensionless | scalar | Fluorophore type (0 for first fluorophore, 1 for second, etc.) |
bg | ADC | scalar | Local background intensity |
Table 2. Variable name modifiers for expressions
Modifier | Meaning |
---|---|
… x | … in X dimension |
… y | … in Y dimension |
… z | … in Z dimension |
sigma… | uncertainty of … |
… min | lower bound of … |
… max | upper bound of … |
Table 3. Variable example names for expressions
Example variable name | Meaning |
---|---|
posx | Localization's X coordinate |
posminy | Highest possible Y localization coordinate |
fluo | Fluorophore type |
Table 4. Operators in expressions
Operator | Result type | Meaning |
---|---|---|
( | numerical | grouping of numerical expressions |
| numerical | exponentiation |
| numerical | multiplication, division |
| numerical | addition, subtraction |
( | numerical | choice operator (if b1 is true, use n1 , else n2 |
| boolean | comparison for equality, inequality, equality (same as == ), greater-equality, less-equality, greater, less |
! | boolean | negation |
| boolean | conjunction (and) |
| boolean | disjunction (or) |
Table 5. Example actions
Value to assign to | Expression to assign from | Intention |
---|---|---|
Filter | fluo = 0 | Only show localizations from the first fluorophore |
Filter | posx > 1 um | Only show localizations right of a line at 1 μm |
Filter | amp < 5 kADC | Discard emissions with intensities above 5000 counts |
Filter | posx > 2300 nm && posx < 2800 nm && posy > 1800 nm && posy < 2200 nm && frame < 500 fr | Limit region of interest to a single bead early in the acquisition to calibrate 3D |
posz | 8 nm/fr * frame | Set a Z ground truth raising 8 nanometre per frame |
amp | (fluo == 0) ? 1.5 * amp : 1 * amp | Make all localizations from the first fluorophore type more intense by a half |