Formula sequences may be single calculations or a series of calculations. There may be situations where you want to perform a series of parameter math calculations. Although it is possible to perform many calculations in a single formula, sometimes it is necessary to store and plot the intermediate results of a calculation, which makes parameter math sequences very useful.
To create new parameter math, complete the following commands:
1. Select the Tools→Transformations→Transformations command to open the Transformations dialog.
2. In the Transformations dialog, click the down arrow to the right of the blue plus to open the drop down menu and select Parameter Math (Figure 29.2).
Figure 29.2 - Transformation command on ribbon and Transformation Dialog with Add New drop down menu displayed
If no plots are inserted into the layout when adding new parameter math, a Template File will need to be selected by clicking the ... button (outlined in red in Figure 29.3 below) to open the Select data file dialog. This button will also need to be used if plots are inserted and a different file is preferred to be used rather than the selected file. If preferred, a gate may also be selected in this dialog by selecting the gate of interest from the Gate drop down list. Parameter math will only be performed on cells that are accepted by the gating formula listed. The calculation will be performed on all cells in the file if No Gate is selected from the drop down list.
Figure 29.3 - Select Template File from Transformations dialog
3. Once the Template File and Gate have been selected, click New to access Create New Sequence Item dialog (Figure 29.4).
Figure 29.4 - Transformations Dialog with Template File Selected
The Output Parameter field controls where the result of the calculation will be stored. It can either be New, in which case a new parameter will be created, or you can select a currently existing parameter, which will overwrite that parameter (Figure 29.5 below). If you are creating a new parameter, you can enter the name of the new parameter in the Output Parameter Name field.
Figure 29.5 - Output Parameter drop down list in Create New Sequence Item dialog
There are two ways to set up a Parameter Math calculation: Single or Formula. Click on the appropriate radio button to select either Simple or Formula for parameter math entry.
For typical calculations, the Simple approach is usually easiest. Select the First Input Parameter, followed by the mathematical operation [only addition (+), subtraction (–), multiplication (*), and division (/) are supported], and then the Second Input Parameter. The Second Input Parameter can also be a constant, in which case an entry field will appear below the Second Input Parameter allowing you to enter the constant value.
A more complicated but flexible way to set up a Parameter Math calculation is to enter a Formula directly. The formula has the advantage that you can combine multiple parameters, including regular and custom tokens, along with different calculations, in a single formula. Formulas are entered as mathematical equations. Each parameter is represented by Pn, where "n" is the parameter number. Some valid formulas are:
•P1+P2
•(P1+P2)/(P4-100)
•sin(P3)/cos(P4)
Functions can also be inserted in the Formula. To enter a token or a function into your equation, right-click on the Formula field and choose Insert Token or Insert Function from the pop-up menu (Figure 29.6).
Figure 29.6 Inserting a Token into a Parameter Math Formula
In addition to inserting tokens, you can use the word Row as a special keyword in Parameter Math formulas. Row refers to the cell number column in a data grid. For example, the formula P1+Row would add 1 to the P1 parameter for the first cell, 2 for the second cell, and so on. The Row keyword is also useful for creating parameters with increasing values, such as a time parameter.
The Evaluate tokens before adding to data checkbox controls whether or not tokens added to the formula will remain as tokens in the resulting data parameter. If that box is checked (the default), you will only see a single, calculated result in the new parameter column in a data grid. If it is unchecked, the value of the individual components of the formula (e.g., tokens or special keywords) will appear separately within the data grid cell, so that you can see the contribution of each component.
A comprehensive set of all formula operators and functions is available. This available set is the same for Custom Tokens.
If the parameter math calculation uses a simple calculation, or if the calculation uses a formula and the checkbox Evaluate tokens before adding to data is checked, then the results of the operation will be stored as floating point numerical values. If the parameter math calculation uses a formula, and the checkbox is unchecked, then the results will be stored as a formula.
Any final results that are above the maximum channel value in the FCS file are either truncated to the maximum value or stored without truncation, depending on the setting of the Math Range Checking option on the General page of the FCS Express User Options dialog.
4. To create the new sequence item, click the OK (Figure 29.7).
Figure 29.7 - Finish calculation creation in Create New Sequence Item dialog
It will now appear in the Formula Sequence box (outlined in red in Figure 29.8 below) of the Transformations dialog.
Figure 29.8 - Newly created calculation added to Formula Sequence box of Transformations dialog.
You can delete a sequence: select it in the Formula Sequence box and click the Delete button. To edit the sequence, select it and click the Edit button. These commands may be accessed by right-clicking within the Formula Sequence box as well. You may also save or load a sequence by right-clicking within the Formula Sequence box. See right-click menu below in Figure 29.9.
After adding or selecting Parameter Math in the Transformations dialog, the right-click in Formula Sequence box→Save Sequence to File command brings up a standard dialog to save your Parameter Math Sequence (*.fcf).
After adding or selecting Parameter Math in the Transformations dialog, the right-click in Formula Sequence box→Load Sequence from File command brings up a standard dialog to load a saved sequence.
Figure 29. 9 - Right-click menu for Formula Sequence box of Parameter Math in Transformations dialog