Advanced features of the Calculate signal tool Case study: how to us the advanced features of the Calculate signal tool? 1 The calculate signal tool The calculate signal tool is one of the most useful tools provided in NOVA. It provides the means to perform calculations. The tool can be used in the Analysis view, on previously measured data, or in the Setup view, where it can be added to a procedure and executed during a measurement. The use of the calculate signal tool is explained in the NOVA User Manual, available from the Help menu. The tool provides a dialog, shown in Figure 1. Figure 1 The dialog provided by the Calculate signal tool The example shown in Figure 1 shows how the tool can be used to calculate the absorbance in the context of a spectroelectrochemical measurement. 1 Page
NOVA Technical note 21 The calculate signal can be used to calculate a single value of an array of values based on a mathematical expression typed in the Expression field of the tool. The editor provides a number of default Functions (like 10LOG, ABS, etc ) and Trigonometric functions (like COS, SIN, etc ), which can be used in conjunction with user defined parameters to build the expression. The calculate signal tool provides additional functions, not shown in the editor, for advanced users. This technical note illustrates some of these advanced functions. Two groups are available: Mathematical operators Logical operators 2 Advanced mathematical operators The following advanced mathematical operators are available in the in calculate signal tool: 1. CEIL(): this operator returns the smallest value that is not less than the argument and is equal to an integer. CEIL(3.2) and CEIL(3.8) both return 4. 2. FLOOR(): this operator return the largest values that is not the greater than the argument and is equal to an integer. FLOOR(3.2) and FLOOR(3.8) both return 3. 3. ROUND(): this operator rounds the argument to the nearest integer. ROUND(3.2) returns 3 and ROUND(3.8) returns 4. 4. FPART(): this operator returns the fractional part of the argument. FPART(3.2) and FPART(3.8) return 0.2 and 0.8, respectively. 5. %: this operator returns the modulo (the rest of the integral division of the specified arguments) of the specified arguments. 22%3 return 1 and 25%5 returns 0. To use these advanced mathematical operators, simply type them directly in the Expression field, as shown in Figure 2. 2 Page
Figure 2 Using the ROUND() operator on the expression shown in Figure 1 3 Advanced logical operators Logical operators can be used to test if a given relationship between two arguments is true or false. The logical operators provided in NOVA will return 1 when the test is true or 0 when the test is false. The following advanced logical operators are available in the in calculate signal tool: 1. ==: this operator tests if the arguments provided are mathematically equal. 2==2 will return 1 (true) and 2==3 will return 0 (false). 2.!=: this operator tests if the arguments provided are mathematically not equal. 2!=2 returns 0 (false) and 2!=3 returns 1 (true). 3. >, >=: this operator tests if one of the arguments is larger (larger or equal) than the other argument. 2>3 returns 0 (false), 3>2 returns 1 (true), 3>=3 returns 1 (true). 3 Page
NOVA Technical note 21 4. <, <=: this operator tests if one of the arguments is smaller (smaller or equal) than the other argument. 2<3 returns 1 (true), 3<2 returns 0 (false), 3<=3 returns 1 (true). 5. &&: this operator can be used to specify an AND operator between two logical expressions. The AND condition will return 1 only when both expressions are true. (2==2)&&(2<=3) returns 1 (both are true), (2==2)&&(2>=3) returns 0 (one is false), (2>=3)&&(3<=2) returns 0 (both are false). 6. : this operator can be used to specify an OR operator between two logical expressions. The OR condition will return 1 when at least one of the expressions is true. (2==2) (2<=3) returns 1 (both are true), (2==2) (2>=3) returns 1 (one is true), (2>=3) (3<=2) returns 0 (both are false). 7.!: this operator can be used to negate the result of a logical expression. Negating a 1 (true) will result in a 0 (false). This NOT operator can be used in combination with the other logical operators. 2!>3 returns 1 (true) and 3!>2 returns 0 (false). To use these advanced mathematical operators, simply type them directly in the Expression field, as shown in Figure 3. 4 Page
Figure 3 Using the >= logical operator on the expression shown in Figure 2 The expression shown in Figure 3 will return 1 (true) for all the rounded absorbance values larger or equal to 1, and 0 (false), for all the other rounded absorbance values. 5 Page