To perform parameter math on a data file, select the Data→Calculate→Parameter Math→Single Calculation command, which brings up the dialog shown in Figure 12.1. If no data files are open, you will be prompted to select an data file.
Figure 12.1 Parameter Math Dialog
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. If you are creating a new parameter, you can enter the name of the new parameter in the Output Parameter Name field.
Parameter Math will only be performed on cells that are accepted by the gating formula listed under Only perform math on cells in gate. If this field says "No Gate", the calculation will be performed on all cells in the file.
The Use Compensation field allows you to choose whether or not the mathematical calculations will be performed on compensated or uncompensated data. To use uncompensated data, select "None" in this field, otherwise choose the compensation matrix you wish to use.
There are two ways to set up a Parameter Math calculation. 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 12.2).
Figure 12.2 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 check box 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.
If you choose to enter a formula, make sure to use the "=" sign in the front to allow the formula to be evaluated properly.
A comprehensive set of all formula operators and functions is available. This set is the same as is available 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.
To perform the calculation, press the Calculate button.