Signal Processing

How to Choose Savitzky-Golay Parameters (Window Size & Degree)

ENGPublished August 2026 · 6 min read

The Savitzky-Golay (S-G) filter is widely considered the gold standard for smoothing scientific spectra because it reduces high-frequency noise while preserving peak height, centroid, and FWHM width. However, choosing the wrong Window Size (w) or Polynomial Order (d) can either under-smooth your signal or artificially flatten critical spectral peaks.

1. Golden Rule for Window Size Selection (w)

The window size specifies how many consecutive data points are used to fit the local polynomial.

  • Must be an odd integer: e.g., 7, 11, 15, 21.
  • Optimal Ratio: Set the window size w to be between 1 to 1.5 times the FWHM of your narrowest spectral peak.
  • Warning: If w exceeds 2x FWHM, peak heights will start to decrease and peaks will artificially broaden.

2. Choosing Polynomial Order (d)

A 2nd-order (quadratic) or 4th-order (quartic) polynomial is standard in spectroscopy. Higher order polynomials fit sharp narrow peaks better but retain more noise. A 2nd-order polynomial provides aggressive smoothing for broad peaks.

Visual Parameter Tuning in AltaiPlot

Don't guess parameters in code! Adjust window size sliders with instant GPU live preview overlay in AltaiPlot.

📥 Download Sample Noisy Raman CSV (Practice Data)

Try Savitzky-Golay Smoothing for Free

Download AltaiPlot to visually smooth your spectra with real-time feedback.

Download AltaiPlot for Windows →