This function applies a low-pass filter to a specified channel or multiple channels with a running average or median. The sample being evaluated is always in the centre of the filtering window to avoid phase distortion. Edge effects are handled by mirroring the original time series.
windowLength argument determines the degree of smoothing. If
windowLength = 5; the filter is composed of two samples from either side of the evaluated sample and the sample itself.
windowLength must be odd to centre the average value within the window.
The median filter is less sensitive to extremes (best for spike removal), whereas the boxcar and triangle filters are more effective at noise reduction and smoothing.
The figures below demonstrate the effect of the different available filters.
The effect of the various low-pass filters implemented by
Example of the effect of various low-pass filters on a time series.