Arithmetic Functions
The Arithmetic tab contains the following functions: Add, Subtract, Multiply, Divide, Exponentiation, Absolute Value, Square Root, Log, Log Base 10, Sine, Cosine, Tangent, Inverse, Accumulation, Successive Differences, and Time Derivative.
To Add a value to each data point in a data set:
1. Select Add in the Operator dropdown list.
2. Click Constant and enter a value to add in the box to the right, as shown below.
3. Click Compute.
To see the results Select The Menu: Display --> Original data with computed. The click the plot button.
To Add data sets together (time series data sets only):
1. Select Add in the Operator dropdown list.
2. From the Selected Data Set list, select a data set to apply the function. This data set will contain the result of the addition operation.
3. Click Data Set.
4. From the Data Set list, select the data sets to be added. If you include the data set selected in the top Selected Data Set, it will be added to itself. In the figure below the series xcubed is added to xsquared when you click compute.
5. Click Compute.
Caution: Do not include the Selected Data Set (at the top of the dialog) in the lower window unless you want the data set added to itself. This is a common mistake.
Subtract
To Subtract a value from each data point in a data set:
1. Select Subtract in the Operator dropdown list.
2. Click Constant and enter a value to subtract in the box to the right.
3. Click Compute.
To Subtract a data set from anther data set (time series data sets only):
1. From the Selected Data Set list, select a data set to apply the function. This data set will contain the result of the subtraction operation.
2. Click Data Set.
3. From the Data Set list, select the data sets to be subtracted. If you include the data set selected in the Selected Data Set, it will be subtracted from itself.
4. Click Compute.
Multiply
To Multiply a value to each data point in a data set:
1. Select Multiply in the Operator dropdown list.
2. Click Constant and enter a value to multiply by in the box to the right.
3. Click Compute.
To Multiply data sets (time series data sets only):
1. From the Selected Data Set list, select a data set to apply the function. This data set will contain the result of the multiply operation.
2. Click Data Set.
3. From the Data Set list, select the data sets to be multiplied. If you include the data set selected in the top Selected Data Set, it will be multiplied by itself.
4. Click Compute.
Divide
The Divide function divides all valid values in a time series or paired data set by a number, or divides the values in a data set by the values in one or more data sets of the same type. For time series data, missing values are kept as missing.
When you are dividing data sets, times in the data sets need not match exactly. Therefore, only values with coincident times will be divided. Times in the primary time series data set that cannot be matched to times in the other data set result in missing values for those times. Values in the data set(s) selected from the lower list form the divisor(s). Values in the resultant data set are set to missing if there is a zero divisor. Missing values in the primary data set are kept as missing. Data sets may be regular or irregular interval time series.
Presently the Divide function does not allow the division of paired data by another data set.
To divide all values in the selected data set(s) by a number:
1.Choose the Arithmetic tab of the Math Functions Screen and select the Divide operator.
2. Select a data set to apply the function from the Selected Data Set pull-down list at the top of the screen or multiple data sets from the list in the lower portion of the screen. If you include the data set selected in the top Selected Data Set, the operation on that set will only be done once.
3. If the data set is paired data, use the Select Paired Data Curve list to select a single paired data curve or all curves for the operation (see Section 7.2.1 for more details). Constants can be divided by only one paired data set at a time.
4. Click Constant and enter the value to divide by in the box to the right.
5. Click Compute.
To divide the selected data set by one or more data sets (time series only):
1. From the Selected Data Set list, select a data set to apply the function. This data set will contain the result of the divide operation.
2. Click Data Set.
3. From the Data Set list, select the divisor data set(s). . If you include the data set selected in the top Selected Data Set, it will be divided by itself.
4. Click Compute.
Exponentiation
The Exponentiation function raises values in a time series or paired data set to a user specified power, or exponent. For time series data, missing values are kept as missing.
For exponentiation of the values:
1. Choose the Arithmetic tab of the Math Functions Screen and select the Exponentiation operator.
2. Select a data set to apply the function from the Selected Data Set pull-down list at the top of the screen or multiple data sets from the list in the lower portion of the screen. If you include the data set selected in the top Selected Data Set, the operation on that set will only be done once.
3. If the data set is paired data, use the Select Paired Data Curve list to select a single paired data curve or all curves for the operation (see Section 7.2.1 for more details).
4. In the Power box, enter the value for the power, or exponent.
5. Click Compute.
Absolute Value
The Absolute Value function computes the absolute value of values in a time series or paired data set. For time series data, missing values are kept as missing.
To compute the absolute value of values:
1. Choose the Arithmetic tab of the Math Functions Screen and select the Absolute Value operator.
2. Select a data set to apply the function from the Selected Data Set pull-down list at the top of the screen or multiple data sets from the list in the lower portion of the screen. If you include the data set selected in the top Selected Data Set, the operation on that set will only be done once.
3. If the data set is paired data, use the Select Paired Data Curve list to select a single paired data curve or all curves for the operation (see Section 7.2.1 for more details).
4. Click Compute.
Square Root
The Square Root function computes the square root of valid values in a time series or paired data set. If a value is less than 0.0, the value is set to missing in the resultant data set. For time series data, if the original value is missing, the value remains missing in the resultant data set.
To compute the square root of values:
1. Choose the Arithmetic tab of the Math Functions Screen and select the Square Root operator.
2. Select a data set to apply the function from the Selected Data Set pull-down list at the top of the screen or multiple data sets from the list in the lower portion of the screen. If you include the data set selected in the top Selected Data Set, the operation on that set will only be done once.
3.If the data set is paired data, use the Select Paired Data Curve list to select a single paired data curve or all curves for the operation (see Section 7.2.1 for more details).
4. Click Compute.
Log
The Log function computes the natural logarithm (log base "e") of valid values in a time series or paired data set. If a value is less than or equal to 0.0, the value is set to missing in the resultant data set. For time series data, if the original value is missing, the value remains missing in the resultant data set.
To compute the natural logarithm of values:
1. Choose the Arithmetic tab of the Math Functions Screen and select the Log operator.
2. Select a data set to apply the function from the Selected Data Set pull-down list at the top of the screen or multiple data sets from the list in the lower portion of the screen. If you include the data set selected in the top Selected Data Set, the operation on that set will only be done once.
3. If the data set is paired data, use the Select Paired Data Curve list to select a single paired data curve or all curves for the operation (see Section 7.2.1 for more details).
4. Click Compute.
Log Base 10
The Log Base 10 function computes the log base 10 of valid values in a time series or paired data set. If a value is less than or equal to 0.0, the value is set to missing in the resultant data set. For time series data, if the original value is missing, the value remains missing in the resultant data set.
To compute the log base 10 of values:
1. Choose the Arithmetic tab of the Math Functions Screen and select the Log Base 10 operator.
2. Select a data set to apply the function from the Selected Data Set pull-down list at the top of the screen or multiple data sets from the list in the lower portion of the screen. If you include the data set selected in the top Selected Data Set, the operation on that set will only be done once.
3. If the data set is paired data, use the Select Paired Data Curve list to select a single paired data curve or all curves for the operation.
4. Click Compute.
Sine
The Sine function computes the sine of valid values in a time series or paired data set. The resulting data set will be in radians. For time series data, missing values are kept as missing.
To compute the sine of values:
1. Choose the Arithmetic tab of the Math Functions Screen and select the Sine operator.
2. Select a data set to apply the function from the Selected Data Set pull-down list at the top of the screen or multiple data sets from the list in the lower portion of the screen. If you include the data set selected in the top Selected Data Set, the operation on that set will only be done once.
3. If the data set is paired data, use the Select Paired Data Curve list to select a single paired data curve or all curves for the operation.
4. Click Compute.
Cosine
The Cosine function computes the cosine of valid values in a time series or paired data set. The resulting data set will be in radians. For time series data, missing values are kept as missing.
To compute the cosine of values:
1. Choose the Arithmetic tab of the Math Functions Screen and select the Cosine operator.
2. Select a data set to apply the function from the Selected Data Set pull-down list at the top of the screen or multiple data sets from the list in the lower portion of the screen. If you include the data set selected in the top Selected Data Set, the operation on that set will only be done once.
3. If the data set is paired data, use the Select Paired Data Curve list to select a single paired data curve or all curves for the operation (see Section 7.2.1 for more details).
4. Click Compute.
Tangent
The Tangent function computes the tangent of valid values in a time series or paired data set. The resulting data set will be in radians. If the cosine of a value is 0.0, the value is set to missing in the resultant data set. For time series data, if the original value is missing, the value remains missing in the resultant data set.
To compute the tangent of values:
1. Choose the Arithmetic tab of the Math Functions Screen and select the Tangent operator.
2. Select a data set to apply the function from the Selected Data Set pull-down list at the top of the screen or multiple data sets from the list in the lower portion of the screen. If you include the data set selected in the top Selected Data Set, the operation on that set will only be done once.
3. If the data set is paired data, use the Select Paired Data Curve list to select a single paired data curve or all curves for the operation (see Section 7.2.1 for more details).
4. Click Compute.
Inverse
The Inverse function computes a new value from 1 divided by the value (1/x) in a time series or paired data set. If a value is equal to 0.0, the value is set to missing in the resultant data set. For time series data, if the original value is missing, the value remains missing in the resultant data set.
To compute the inverse (1/x) of values:
1. Choose the Arithmetic tab of the Math Functions Screen and select the Inverse operator.
2. Select a data set to apply the function from the Selected Data Set pull-down list at the top of the screen or multiple data sets from the list in the lower portion of the screen. If you include the data set selected in the top Selected Data Set, the operation on that set will only be done once.
3. If the data set is paired data, use the Select Paired Data Curve list to select a single paired data curve or all curves for the operation (see Section 7.2.1 for more details).
4. Click Compute.
Accumulation
The Accumulation function computes a running accumulation of values for a regular or irregular interval time series data set. For a missing value in the time series data, the value in the accumulation time series remains constant (i.e., missing values treated as zero).
Note: The data type of the time series data set governs how values are added. See also Accumulation over interval in the Time Conversion function Min/Max/Avg/… Over Period.
To compute the running accumulation of values for time series data sets:
1. Choose the Arithmetic tab of the Math Functions Screen and select the Accumulation operator.
2. Select a data set to apply the function from the Selected Data Set pull-down list at the top of the screen or multiple data sets from the list in the lower portion of the screen. If you include the data set selected in the top Selected Data Set, the operation on that set will only be done once.
3. Click Compute.
Successive Differences
The Successive Differences function computes the difference between successive values in a regular or irregular interval time series data set. The time series data must be of type "INST-VAL" or "INST-CUM". A value in the resultant time series is set to missing if either the current or previous value in the original time series is missing (need to have two consecutive valid values). If the data type of the original data set is "INST-CUM" the resultant time series data set is assigned the type "PER-CUM", otherwise the data type does not change.
To compute the successive differences for time series data sets:
1. Choose the Arithmetic tab of the Math Functions Screen and select the Successive Differences operator.
2. Select a data set to apply the function from the Selected Data Set pull-down list at the top of the screen or multiple data sets from the list in the lower portion of the screen. If you include the data set selected in the top Selected Data Set, the operation on that set will only be done once.
3. Click Compute.
Time Derivative
The Time Derivative function computes the successive differences per unit time for a regular or irregular interval time series data set. For the time "t",
TS2(t) = ( TS1(t) – TS1(t-1) ) / DT
where DT is the time difference between t and t-1. For the current form of the function, the units of DT are minutes.
A value in the resultant time series is set to missing if either the current or previous value in the original time series is missing (need to have two consecutive valid values). By default, the data type of the resultant time series data set is assigned as "PER-AVER".
To compute the time derivative for time series data sets:
1. Choose the Arithmetic tab of the Math Functions Screen and select the Time Derivative operator.
2. Select a data set to apply the function from the Selected Data Set pull-down list at the top of the screen or multiple data sets from the list in the lower portion of the screen. If you include the data set selected in the top Selected Data Set, the operation on that set will only be done once.
3. Click Compute.