Threshold (Split)

<series> output = <series>.thresholdsplit(<string> Threshold Type, <number> Level, <bool> Suppress Spikes and Gaps, <number> Suppression Time, <bool> Rectify Input, <bool> Low Pass Filter Input, <number> Low Pass Filter Cutoff Frequency)

<series> output = <series>.thresholdsplit(<string> Threshold Type, <number> Baseline Level, <number> Window Length, <number>Number of Windows, <bool> Suppress Spikes and Gaps, <number> Suppression Time, <bool> Rectify Input, <bool> Low Pass Filter Input, <number> Low Pass Filter Cutoff Frequency)

This function can be called in two different manners (listed above).  The first is for thresholds that are a fixed level or a percent level.  Enter “Fixed” or “Percent” as the Threshold Type for these two types. 

If “Fixed”, the function will return windows that contain only data that is above Level. If “Percent”, the function will return windows that contain only data that is above Level percent of the total range of the data.

The second manner is with Threshold Type equal to “Smart”.  This will perform baseline estimation for the threshold level.  Baseline estimation finds the smallest RMS value of a series of Number of Windows windows of length Window Length and multiplies it by the Baseline Level.  The function returns windows of data containing only data that is greater than Baseline Level multiplied by this value.

Examples:

var myThreshold = mySeries.thresholdsplit(“Fixed”, .45, true, .01, true, true, 12);

var myThreshold = mySeries.thresholdsplit(“Percent”, 75, true, .01, true, true, 12);

var myThreshold = mySeries.thresholdsplit(“Smart”, 5, .0125, 15, true, .01, true, true, 12);

If true, Suppress Spike and Gaps will throw away all windows whose length is shorter than Suppression Time.  If true, Rectify Input will take the absolute value of the data prior to analyzing it. If true, Low Pass Filter Input will apply a low pass filter with a cutoff frequency of Low Pass Filter Cutoff Frequency to the data prior to analyzing it.