Smoother options specify a smoother applied to the input sequence. This smoother may be used for value smoother, spike detection and/or stability detection.

In the simplest form, the option is just a single smoother specification. The smoother specification consists of a sequence of fields separated by , with the meaning and number determined by the first field. The type specification is not case sensitive:

disable

Disable smoothing. This is always stable without spikes but never gives a valid value.

last

Return the last valid value. This is always stable without spikes and returns the last valid value seen.

anylast

Return the latest value even if it is invalid. This is always stable without spikes and returns the last value even if it was invalid.

1p, lowpass, 1plp, singlepole, or singlepolelowpass

A single pole low pass digital filter. This is a simple infinite response filter. The time constant is the second field and is specified as a time interval that is the nominal time the filter takes to reach 63.2% of its final value after a step change. The third field is a time interval specifying the maximum time between points before it is considered a gap in data and the filter is reset. The fourth field is a boolean value (on, yes, true or none zero vs off, no, false or zero) indicating whether or not the filter should reset after an undefined value. The filter is considered stable if the most recent value is within the band set by the fifth field. The filter reports a spike if the most recent value falls outside the band defined by the sixth field.

4p, 4plp, fourpole, or fourpolelowpass

A four pole low pass digital filter. This is a simple infinite response filter. The time constant is the second field and is specified as a time interval that is the nominal time the filter takes to reach 63.2% of its final value after a step change. The third field is a time interval specifying the maximum time between points before it is considered a gap in data and the filter is reset. The fourth field is a boolean value (on, yes, true or none zero vs off, no, false or zero) indicating whether or not the filter should reset after an undefined value. The filter is considered stable if the most recent value is within the band set by the fifth field. The filter reports a spike if the most recent value falls outside the band defined by the sixth field.

A valid base ten decimal number

A finite length mean smoother of the specified minimum length in seconds. The second field specifies the maximum length of the smoother. The third field specifies the number of seconds to discard on initialization before starting smoothing. The fourth field specifies the maximum relative standard deviation for the smoother to be considered stable. The filter reports a spike if the most recent value is outside the band defined by the sixth field.

Three minute single pole low pass
--switch=1p,3m
30 second minimum and 60 second maximum mean
--switch=30,60,10,0.01,2.0

If the option contains a / then it is treated as time dependent. In this context the value is split into fields separated by , with the first field being the interval and all further ones specifying the time range. The first fields determine the smoother and the remaining fields set the time range specified that type of smoother applies to.

Time dependency
--switch=30,60,10,0.01,2.0,,2016:10/90,,,,,2016:10

Band Specification

A band is the fraction minus one relative to zero. So a band of 2.0 sets the valid range from 1/3 below to three times above. That is, the band minus one is multiplied or divided by the relative value to get the absolute bounds.