Abstract
Savitzky–Golay (SG) filtering, based on local least-squares fitting of the data by polynomials, is a popular method for smoothing data and calculations of derivatives of noisy data. At frequencies above the cutoff, SG filters have poor noise suppression; this unnecessarily reduces the signal-to-noise ratio, especially when calculating derivatives of the data. In addition, SG filtering near the boundaries of the data range is prone to artifacts, which are especially strong when using SG filters for calculating derivatives of the data. We show how these disadvantages can be avoided while keeping the advantageous properties of SG filters. We present two classes of finite impulse response (FIR) filters with substantially improved frequency response: (i) SG filters with fitting weights in the shape of a window function and (ii) convolution kernels based on the sinc function with a Gaussian-like window function and additional corrections for improving the frequency response in the passband (modified sinc kernel). Compared with standard SG filters, the only price to pay for the improvement is a moderate increase in the kernel size. Smoothing at the boundaries of the data can be improved with a non-FIR method, the Whittaker–Henderson smoother, or by linear extrapolation of the data, followed by convolution with a modified sinc kernel, and we show that the latter is preferable in most cases. We provide computer programs and equations for the smoothing parameters of these smoothers when used as plug-in replacements for SG filters and describe how to choose smoothing parameters to preserve peak heights in spectra.
Highlights
Since their introduction more than half a century ago,[1] Savitzky−Golay (SG) filters have been popular in many fields of data processing; ranging from spectra in analytical chemistry[2−4] via geosciences[5] to medicine.[6,7] SG filters are usually applied to equidistant data points and are based on fitting a polynomial of given degree n to the data in a neighborhood k − m...k + m of each data point k
We will write “degree of the filter” for the degree of the fit polynomial used in the following. (We use the word “degree”, not “order”, as order often refers to the length of the kernel of an finite impulse response (FIR) filter.) The flat passband and steep cutoff leads to an advantageous property of SG filters when smoothing spectra: SG smoothing filters preserve peaks and their heights better than many other filters with a similar cutoff frequency
We present two new approaches and one known solution for this problem and discuss the respective merits and disadvantages: (i) We show that choosing suitable weights for the fit can substantially improve the stopband attenuation of SG filters by removing the discontinuity at the ends of the kernel. (ii) A convolution kernel based on a sinc function with a Gaussian-like window has excellent suppression in the stopband. (iii) SG smoothing can be replaced by the Whittaker−Henderson smoothing algorithm.[14−16] We analyze the near-boundary behavior of these methods, their noise suppression, and their suitability for calculating derivatives
Summary
Since their introduction more than half a century ago,[1] Savitzky−Golay (SG) filters have been popular in many fields of data processing; ranging from spectra in analytical chemistry[2−4] via geosciences[5] to medicine.[6,7] SG filters are usually applied to equidistant data points and are based on fitting a polynomial of given degree n to the data in a (usually symmetric) neighborhood k − m...k + m of each data point k (this range contains 2m + 1 data points). We constructed modified sinc kernels with smaller sizes Their stopband suppression is still substantially improved compared to the non-MS filters and good enough for almost all applications. Far from the boundaries of the data set, WH smoothing behaves similar to an FIR filter (with a very large kernel),[26] with the response to the unit impulse corresponding to the kernel (Figure 1). In this region, the frequency response of WH smoothing becomes. The overall stopband rejection of WH smoothing is somewhat lower than that of the corresponding MS filters
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have
Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.