Affected Products: 

CI6870 NOT A VALID PART NUMBER

Problem/Symptom: 
calculator functions in DataStudio / SPARK / PASCO Capstone

PASCO Solution: 
amplitude(peak%, valley%, time, x) Capstone / SPARKvue / DataStudio The quantities peak% and valley% set thresholds of the percent of the maximum and minimum that x(t) must exceed in order to find the peak, where T is the time range over which the algorithm reports a peak. For best results, set the T to approximately twice the period of oscillation and adjust the valleys of peak and valley so that they a few percent larger than 100 times the ratio of the noise level to the signal level. If your function has an offset, use the peakamp() to evaluate the amplitude of the oscillating signal.
and(A, B) Capstone/ DataStudio
avgfilter(n, x) Capstone/ DataStudio chgfilter(changeAmount, x) Capstone / DataStudio Filters input values for x, reporting only those values which represent a change of at least "changeAmount" from the prior value. If changeAmount is 0, then any change (no matter how small) is reported. This filters out a large number of identical (or nearly identical) data values. derivative(n, y) DataStudio The derivative(n, y) function is the first order time derivative of the measurement y with respect to its implicit independent variable, which unless redefined by graphing with respect to another parameter, will be time t. The value is determined as (y(t_{i+n}) y(t_{i}))/(t_{i+n} t_{i}). It is the slope of a line segment from the first data point in a sequence to the nth data point in a sequence. 2 is the minimum and default value for n. derivative(n, y, x) Capstone / SPARKvue
The derivative(n, y, x) function is the first order time derivative of the measurement y with respect to x. The derivative is determined as (y(t_{i+n}) y(t_{i}))/(t_{i+n} t_{i}). It is the slope of a line segment from the first data point in a sequence to the nth data point in a sequence. 2 is the minimum and default value for n.
first(x) Capstone / SPARKvue / DataStudio
inrange( minimumValue, maximumValue, x) Capstone / DataStudio integral(y) DataStudio The integral(y) function uses the trapezoidal method to return the numerical integral of the data set, y(x) versus its implicit independent variable x, which, unless redefined by graphing with respect to another parameter, will be time, t. integral(y, x) PASCO Capstone / SPARKvue The integral(y, x) function uses the trapezoidal method to return the numerical integral of the data set, y(x). max(x) Capstone / SPARKvue / DataStudio Returns the maximum value of the data set x from the beginning of the set until the current value. This is sometimes called a running maximum. The last value reported will be the maximum of the entire data set.
min(x) Capstone / SPARKvue / DataStudio mod( numerator, denominator ) Capstone / DataStudio Returns the remainder (a floatingpoint number) when the numerator is divided by the denominator an integer number of times. The numerator and denominator can each be a constant or an input variable.
not(A) Capstone/ DataStudio
or(A, B) Capstone/ DataStudio
outputstate( adapter #, adapter port, state ) DataStudio
outputswitch( A ) DataStudio
outputvoltage( A ) DataStudio peakamp(T [s], x ) Capstone / SPARKvue / DataStudio Looks at the input data (x) every T seconds and reports a single value representing half the distance between the minimum and maximum value. The peakamp function is useful for reducing fastsampled data of a harmonic phenomenon to a small number of points representing the "average amplitude".
period (time, x) DataStudio The values peak%, valley%, and time are important constants that you type in. These constants allow you to "tune" the peak detection algorithm to the characteristics of your data. The quantities "peak" and "valley" set the thresholds to finding the peak, and "time" is the time range over which the algorithm is detecting a peak. For example, if you set peak = 10, valley =10, and time =1s then the period function determines the period of oscillation when the value of data goes above the top 10 percent and below the bottom 10 percent of the total data range of the 1 s time interval. Since the algorithm keeps a running tab of the times in which a peak occurred, the period is easily calculated. Once it has determined the period, the value is recorded and the algorithm begins to detect a peak and a valley for the next 1 second time interval. PASCO recommends you set "time" to approximately twice the period of oscillation. It is important to select the most appropriate values for "peak" and "valley." If the values of "peak" and/or "valley" are too high, the algorithm might not detect some peaks or valleys. If the values of "peak" and/or "valley" are too low, the algorithm might detect extra peaks in your data.
smooth(n, x) The smooth(n,x) function is a trailing average of n consecutive values of x_{i}. For example, if you type "7" for the value of "n", then the average is carried out on data points 1 through 7, 2 through 8, 3 through 9 etc.
Capstone Coefficient weights are used, such that the values closest to the value being smoothed usually have a greater weight, and thus a greater influence on the determining the resulting smoothed value. These coefficients are symmetric unless there are fewer than (n1)/2 unsmoothed values to both sides of the smoothed value. timefilter( timeOffset, x ) Capstone / DataStudio Filters input values for x, subtracting timeOffset from the time of each point. Useful for timeshifting data on the X axis, especially when the event of interest does not occur at time zero. The Y values are unchanged.
timeof(x) Capstone / DataStudio [These functions are not found in the drop down menuthey must be manually entered into the expression editor window in the DataStudio Calculator]
A > B Capstone / DataStudio

Creation Date: 06/1/2005
Last Modified: 06/4/2014
Mod Summary: