Savitzky-Golay - sgol


The Savitzky-Golay smoothing function essentially applies a local polynominal fitting routine to a series of data points to then find the smoothed data points. This has the benefit that for sharp intense peaks (common to EPR) that the line broadening effects and lessening of peak intensity seen by a local moving window average are not seen.

To perform a Savitzky-Golay smoothing functions requires a polynominal order to be defined as well as the window size (or number of data points to be sampled at any given time). We can also weight the window such that future data points are more/less favourable than past points


[smoothed_y] = SGOL (
    number of points left,
    number of points right,
    Poynominal Order)


y_smoothed = SGOL( y, 16, 16, 4)

This smoothes the data in array y using a 4th order polynominal (y = ax4 + bx3 + cx2 + dx + e), using a window of 16 data points either side of the current point being examined

This page previously appeared on[^1][^2][^3]

[^1:] [^2:] [^3:]