18.1.2 Algorithms (Smooth)
Moving window in adjacent-averaging, Savitzky-Golay or percentile filter method
When the smoothing method is adjacent-averaging, Savitzky-Golay or percentile filter, each smoothed data point is computed from data points within a moving window. Let be the input data points and let denote the output data points. Each is computed from
where npts is the value of the Points of Window variable.
However, when the smoothing method is FFT filter, moving window is not used. Instead, the whole signal is processed.
The adjacent-averaging method
The adjacent-averaging method uses the simplest possible averaging procedure: each is the average of the data points within the moving window. If the Weighted average option is used, the average will be computed using weighted averaging. In this case, a parabolic weight is used, with the weight area normalized to 1. For a window whose center is in i (which means to calculate the ith averaged point), the weight which corresponds to the jth (j=0, 1, ... npts-1) point is:
where N is the number of Points of Window.
The Savitzky-Golay method
The Savitzky-Golay method performs a polynomial regression to the data points in the moving window. Then will be computed as the value of the polynomial at position i.
The percentile filter method
For the percentile filter, the pth quantile of the points in the moving window is assigned as , where p is specified by the parameter, Percentile. The pth quantile (or 100 pth percentile) is computed from the empirical distribution function as follows:
where j is the integer part of , and g is the fractional part of it.
Then we can compute the pth quantile, which is denoted by y, with the following equations:
where is the jth (j=0, 1, ... npts-1) point in the moving window.
The FFT Filter method
When the FFT Filter method is selected, Origin performs the following:
- Calculate the mean of the first 1% data points and the mean of the last 1% data points.
- Construct a straight line throught these two points and subtract the input data by this line.
- Perform FFT on the dataset acquired in last step.
- Apply filtering with the low-pass parabolic filter.
- Perform IFFT on the filtered spetrum.
- Add the baseline to the dataset acquired in last step.
The Lowess and Loess method
Lowess and Loess are abbreviations for "locally weighted scatterplot smoothing" or "locally weighted least squares". We say "locally" because we calculate each smoothed value using neighboring points contained within a span of values. This method is classically performed by the following steps:
Calculate weights for a center point , and all neighboring points contained within the span, using the tri-cube weight function...
where is a neighbor point within the span associated to the current center point , and is the distance along the abscissa from to the most distant neighbor points within the span.
Perform the weighted least square regression.
- For Lowess, a weighted linear regression is used.
- For Loess, a second-order polynomial regression is used.
- Obtain predicted value given in the step2 for .
- Move to next point , then perform step1-3 to get predicted value . The calculation stops when all points are calculated.
The Binomial method
Binomial filter is a weighted moving average filter, Let be the input source data, is the output smoothed data.
The sequence of smoothing coefficients is given by:
is the Order.
The Cutoff frenquency is calculated by:
is Sampling Interval. is cutoff amplitude at -6dB, . Cutoff frequency decreases with insceasing Order .