Use the calculator
Use the Calculator to create an equation from measurements and view the calculated data in a display.
Create a calculation
-
From the table, graph, or graph and table page, open the Calculator window by selecting the Calculator button from the toolbar at the bottom of the page.
-
Type your calculation into the text box. You may enter a name for your calculation at the start by prefacing the calculation with a single word name and an equals sign. Otherwise, the first calculation will automatically be named "Calc1", the second will be named "Calc2", and so on.
- To add a function to the equation, select the button for that function in the numerical panel at the bottom of the window. Some of these buttons are found inside the Trigonometry , Statistics , or Special menus. You can also enter these functions into the equation by typing the equivalent text listed under Function descriptions.
- To add a measurement to the equation, select the Measurements button and choose an option from the list of available sensor measurements.
- To add a Greek letter (capital or lowercase) or a single-digit subscript or superscript character to the equation, select the Symbols button and choose the appropriate option from the Symbol menu.
-
When you have entered your calculation, hit Enter or press the Return button in the calculator. The program will automatically check your calculation for errors; if none are detected, the text "empty expression" will change to "Calculation OK".
- If desired, enter a unit for the calculation by typing it into the small box next to the calculation text box.
- Repeat Steps 2 through 4 until all desired calculations have been entered.
-
Select Done to exit the calculator.
Note
If any of your entered calculations are flagged as invalid, you will not be able to close the Calculator window until you have resolved or deleted all invalid calculations.
To delete a calculation, select the Delete button next to the calculation.
Create Calculation tool
You can also create calculations from the table page by selecting the Create Calculation Column tool from the toolbar. This tool automatically creates a new calculation using the measurement in the currently selected column as a variable. Once you have edited this calculation as needed and entered the desired units, select Done to close the Calculator. The new calculation will be displayed in a new column at the far right of the Table display.
Calculation properties
Once you have entered a calculation, you can edit its properties by selecting the Properties button next to that calculation. This menu allows you to adjust the name, measurement type, and numerical format of your calculation as desired.
Selecting a measurement type is particularly useful, as it allows you to switch your calculation between multiple appropriate units as needed. Each measurement type has one or more specific units associated with it, visible by selecting the Measurement Unit dropdown box. For example, the "Mass" measurement type provides the option for units of kg, g, oz, and lb. If you select a measurement unit for a calculation in this menu and then display that calculation in the table or graph display, you will be able to switch between these different units by selecting the unit name box, as shown below. The software will automatically perform the appropriate unit conversion when a new unit is selected.
Display a calculation
- Collect at least one run containing data for all measurements used in the calculation.
- Navigate to the desired page using the Navigation bar.
-
Select one of the Displayed Measurement buttons and select the name of your desired calculation from the list.
Note
Calculations cannot be displayed on the live data page.
Function descriptions
The following list describes each of the functions included in the Calculator.
Math
The following calculations are available from the main Calculator window.
-
e^x
Raises e to the x power.
x
= data or valueTip
Entering
exp(x)
will yield the same function. -
10^x
Raises 10 to the x power.
-
x2
Squares the preceding data or value.
-
x-1
Inverts the preceding data or value.
-
xy
Raises the preceding data or value x to the power of the following data or value y.
-
ln
Calculates the natural logarithm of data or value x.
ln(x)
-
log
Calculates the logarithm (base 10) of data or value x.
log(x)
-
√
Calculates the square root of data or value x.
sqrt(x)
-
abs
Calculates the absolute value of data or value x.
abs(x)
-
EE
Scientific notation meaning "times ten raised to the power of".
E
Trigonometry
The following functions can be accessed by selecting the Trigonometry button in the Calculator window. For all of these functions, x
refers to the data or value on which the function is operating.
-
sin
Trigonometric sine function.
sin(x)
-
cos
Trigonometric cosine function.
cos(x)
-
tan
Trigonometric tangent function.
tan(x)
-
sin-1
Trigonometric arcsine function.
arcsin(x)
-
cos-1
Trigonometric arccosine function.
arccos(x)
-
tan-1
Trigonometric arctangent function.
arctan(x)
Statistics
The following functions can be accessed by selecting the Statistics button in the Calculator window. For all of these functions, only data can be inserted for x
, as these functions are incompatible with single values.
-
min
Determines the running minimum value of the data source.
min(x)
-
max
Determines the running maximum value of the data source.
max(x)
-
avg
Determines the running average value, or mean, of the data source.
avg(x)
-
σ
Determines the running standard deviation of the data source.
stddev(x)
-
count
Calculates the running count (number of data points) of the data source.
count(x)
-
sum
Calculates the running sum of the data source.
sum(x)
Special functions
The following functions can be accessed by selecting the Special button in the Calculator window.
-
integral
Calculates the numerical integral of the data source y with respect to data source x. This is done by determining the running sum of the area under each y data point with respect to its corresponding x data point.
integral(x,y)
x
= data onlyy
= data only -
derivative
Calculates the numerical derivative of data source y with respect to data source x. This is done by calculating the slope of a line segment from one data point in the sequence to a second point n-1 points away in the sequence. (For example, if n = 2, the derivative values will be the slope between the first and second point, second and third point, and so on. If n = 5, the derivative values will be the slope between the first and fifth point, second and sixth point, and so on.)
derivative(n,x,y)
n
= integer value ≥ 2 (default: 2)x
= data onlyy
= data only -
first
Returns a data set with all values equal to the first value of data source x. The length of the returned data set will be identical to the length of the original source.
first(x)
x
= data only -
period
Determines the period of data source x (assuming it is oscillating) by detecting peaks in the data and measuring time between those peaks. The values peak% and valley% set the thresholds to finding the peaks in the data source. If peak% and valley% both equal 10, the function searches for peaks in the top and bottom 10% of the data range. The value time is the time range over which the algorithm is detecting peaks. For best results, adjust the three values to tune the function.
period(peak%, valley%, time, x)
peak%
= value only (default: 90)valley%
= value only (default: 10)time
= value only (default: 5)x
= data only -
amplitude
Determines the amplitude of data source x (assuming it is oscillating) by detecting peaks and valleys in the data and measuring half the thresholds to find peaks and valleys in the data source. If peak% and valley% are both equal to 10, the function searches for peaks and valleys in the top and bottom 10% of the data range. The value time is the time range over which the algorithm is detecting peaks and values. For best results, adjust the three values to tune the function.
amplitude(peak%, valley%, time, x)
peak%
= value only (default: 90)valley%
= value only (default: 10)time
= value only (default: 5)x
= data only -
peakamp
Calculates half the distance between the maximum and minimum values in every time interval time for the data source x.
peakamp(time, x)
time
= integer value ≥ 1 (default: 1)x
= data only -
filter
Returns a copy of data source x with all values less than min or greater than max removed.
filter(min, max, x)
min
= value only (default: 1)max
= value only (default: 10)x
= data only -
smooth
Smooths the data from the data source x using the Savitzky-Golay method. Increasing n increases the amount of smoothing. The parameter n must be an odd number greater than or equal to 5.
smooth(n,x)
n
= odd integer value ≥ 5 (default: 7)x
= data only -
avgfilter
Smooths the data from the data source x by averaging every n values into one value. The resultant data set will have a factor of n fewer data points than the original source.
avgfilter(n, x)
n
= integer value ≥ 2 (default: 2)x
= data only -
random
Returns a random value between 0 and 1.
random()