Online Software Help Manual

Display Legacy Contents

Smoothing details

The Savitzky-Golay function is mostly used as low-pass filter to render visible the relative widths and heights of spectral lines in noisy data without major loss of intensity. This procedure is called smoothing. Each data point of a 2D or 3D data object will be evaluated under consideration of a number of neighboring data points and the overall resulting slope of the data. The algorithm can also be used to calculate derivatives.

Savitzky-Golay smoothing algorithm

Each data point value fi of the 2D or 3D data object is therefore replaced by a linear combination gi of itself and some number of neighboring data points,


Where nL is the number of data points used relative to the left of a ith data point and nR the number of points used to the right. In the software nL and nR are equivalent to compute gi as the weighted average of data points around the ith data point. The weighting factor cn for each data point i is derived from a polynomial least squares fit using a polynomial of the degree M. The polynomial is defined as

Required polynomials for the least squares fit for each data point of a 2D or 3D data object can be easily obtained using a previously designed matrix to produce required linear combinations of the polynomials. The matrix AT looks like this:

The weighting factors or Savitzky-Golay coefficients cn for each data point will be derived from the vectors aj in terms of the vectors fi of the matrix Aij with the specific forms


where f is replaced by the unit vector en if the coefficient cn is the component a0. cn is then calculated as:

For smoothing purposes only the coefficients a0 are interesting, because they represent the smoothed data point intensity values.

Savitzky-Golay smoothing example

A somewhat noisy UV/VIS spectrum is smoothed using a 2nd order polynomial and a window of nine data points.

The original UV/VIS spectrum looks like this:


(Source: J&M Analytische Mess- und Regeltechnik GmbH, Robert-Bosch Str. 83, 73431 Aalen, Germany)

After applying the smoothing function, the UV/VIS spectrum looks like this:


Smoothing parameters

The following smoothing parameters can be adjusted:

Polynomial Order

This value indicates the order of the polynomial fit function applied for smoothing of 2D or 3D data objects. A positive integer value (greater than 0) must be entered into this text field.

  • 1 = first order

  • 2 = second order


  • n = nth order.

Smoothing window

An odd number of data points around each smoothed data point of the spectrum will be taken into account for calculation of the smoothing polynomial. For details, please refer to the Savtizky-Golay documentation. The number of data points can be selected from the drop down combo box by clicking the icon at the right side of the parameter field.

Tip:  With increasing polynomial order the number of window points must be increased accordingly. If the number of window points is too small, a math error message is displayed on calculation.


Savitzky A., and Golay, M.J.E. 1964, Analytical Chemistry, vol. 36, pp. 1627–1639.

Hamming, R.W. 1983, Digital Filters, 2nd ed. (Englewood Cliffs, NJ: Prentice-Hall).

Ziegler, H. 1981, Applied Spectroscopy, vol. 35, pp. 88–92.

Bromba, M.U.A., and Ziegler, H. 1981, Analytical Chemistry, vol. 53, pp. 1583–1586.