Custom Parameters
Custom parameters allow you to derive new parameters by combining existing parameters found within an FCS file. The most common use case is calculating a ratio or difference between two or more existing parameters.
Create Custom Parameters
To create a new custom parameter, first select the FCS file you want to modify. Then, in the left-hand panel, select "Custom Parameter."
In the Custom Parameter popup window, you must:
- Assign a Name: Provide a name for your custom parameter (or use the default). Note: You cannot have two parameters with the same name within the same file.
- Input the Formula: Enter the mathematical formula that defines the custom parameter.
If you create a custom parameter and wish to apply it to other FCS files, you can drag and drop the associated custom parameter icon from the file tree onto the target file.
Available Formula Operations
The following operations can be used in your formulas.
| Operation | Description |
|---|---|
| x + y | Adds x to y |
| x - y | Subtracts y from x |
| x * y | Multiplies x by y |
| x / y | Divides x by y |
| x ^ y | Computes x to the yth power |
| -x | Negates x |
| min(x, y) | Computes the minimum value between x and y |
| max(x, y) | Computes the maximum value between x and y |
| abs(x) | Computes the absolute value of x |
| sin(x) | Computes the sine of x |
| cos(x) | Computes the cosine of x |
| tan(x) | Computes the tangent of x |
| log10(x) | Computes the base 10 logarithm of x |
| ln(x) | Computes the natural logarithm of x |
| sqrt(x) | Computes the square root of x |
Formula Rules
- The order of operations is respected, but you can use parentheses
()to explicitly group calculations. - Operands can be either a scalar numerical value or a parameter from the FCS file.
- A custom parameter formula must reference at least one parameter to be considered valid.
Referencing Parameters
Parameters are referenced by enclosing their short names in curly braces: {}.
- If a parameter is displayed as
"GLP::FL3-A", the short name is the part after::, i.e.,FL3-A. - Therefore, to reference it, you would type
{FL3-A}. - If the displayed name does not contain
::, use the entire name. - Case is not sensitive in formulas, so
{FL3-A}and{fl3-a}are interchangeable.
Examples
The formula syntax is highly flexible. Here are several examples to guide you:
Example 1: Scaling a Parameter
If you have a parameter called "SSC-A" and you want to multiply every event value by 10 (useful for applying a gain correction):
Formula: 10 * {SSC-A}
Example 2: Summing Two Parameters
To create a new parameter that is the sum of two parameters, "VioGreen-A::FL2-A" and "FITC-A::FL3-A":
Formula: {FL2-A} + {FL3-A}
Example 3: Bounding Values (Min/Max)
You can use min() and max() to clip values.
- Capping at 100:
min(100, {SSC-A})(Any value over 100 will be set to 100). - Clipping between 50 and 100:
max(50, min(100, {SSC-A}))(This ensures the value is never below 50 or above 100).
Example 4: Complex Ratio Calculation
Formulas can be arbitrarily complex. For instance, to calculate a ratio between two parameters while applying scaling and offset corrections:
Formula: ((2.7) * (({FL2-H} - (-100))) / (({FL2-A} - (-300))))