Savitzky–Golay filter

The Savitzky-Golay smoothing being applied, passing through the data from left to right in a moving window fashion. The red line represents the local polynomial being used to fit a subset of the data. From this, the smoothed values - shown as a purple line - are derived by evaluating the polynomial at the central point of the moving window.

A Savitzky–Golay filter is a digital filter that can be applied to a set of digital data points for the purpose of smoothing the data, that is, to increase the precision of the data without distorting the signal tendency. This is achieved, in a process known as convolution, by fitting successive sub-sets of adjacent data points with a low-degree polynomial by the method of linear least squares. When the data points are equally spaced, an analytical solution to the least-squares equations can be found, in the form of a single set of "convolution coefficients" that can be applied to all data sub-sets, to give estimates of the smoothed signal, (or derivatives of the smoothed signal) at the central point of each sub-set. The method, based on established mathematical procedures, was popularized by Abraham Savitzky and Marcel J. E. Golay, who published tables of convolution coefficients for various polynomials and sub-set sizes in 1964. Some errors in the tables have been corrected. The method has been extended for the treatment of 2- and 3-dimensional data.

Savitzky and Golay's paper is one of the most widely cited papers in the journal Analytical Chemistry and is classed by that journal as one of its "10 seminal papers" saying "it can be argued that the dawn of the computer-controlled analytical instrument can be traced to this article".

Application of the smoothing to a noisy signal with Gaussian peaks via a discrete convolution with a subsequent polynomial fit at the boundaries. Compared to the sequential direct polynomial fitting shown above, this can be achieved more efficiently. The sudden drops to 0 at the edges of the filter cause discontinuities which limit the noise suppression capabilities of the Savitzky-Golay filter in practice.