OriginLab Corporation - Scientific Graphing and Data Analysis Software - 2D graphs, 3D graphs, Contour Plots, Statistical Charts, Data Exploration, Statistics, Curve Fitting, Signal Processing, and Peak Analysis

Algorithm (Smooth)

Contents

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 \left\{f_i| i = 1,2,...,N\right\} be the input data points and let \left\{g_i|i = 1,2,...,N\right\} denote the output data points. Each gi is computed from \left\{f_m|i - floor(npts/2) < m < i + floor(npts/2)\right\}

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 gi 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:

w_j=1-(\frac{(j-i)}{(N+1)/2})^2

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 gi 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 gi, where p is specified by the parameter, Percentile. The pth quantile (or 100 pth percentile) is computed from the empirical distribution function as follows:

Let npts\cdot p/100=j+p

where j is the integer part of npts\cdot p/100, and g is the fractional part of it.

Then we can compute the pth quantile, which is denoted by y, with the following equations:

y=
\begin{cases} 
  x_j,  & \mbox{if }g=0 \\
  x_{j+1}, & \mbox{if }g>0 
\end{cases}

where xj 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:

  1. Calculate the mean of the first 1% data points and the mean of the last 1% data points.
  2. Construct a straight line throught these two points and subtract the input data by this line.
  3. Perform FFT on the dataset acquired in last step.
  4. Apply filtering with the low-pass parabolic filter.
  5. Perform IFFT on the filtered spetrum.
  6. Add the baseline to the dataset acquired in last step.

Note: