Mathematical Formulation and Parameter Tuning Guide for Spectroscopic Data Processing
Cengraph implements validated scientific algorithms for baseline subtraction, noise reduction, and spectral transformation.
1. Whittaker-Eilers Asymmetric Least Squares (AsLS)
The AsLS algorithm solves a penalized least-squares minimization problem to calculate a smooth baseline vector z from an observed signal vector y:
Q = ∑ w_i (y_i – z_i)² + λ ∑ (Δ² z_i)²
Where:
- w_i: Asymmetric weight vector defined as w_i = p if y_i > z_i and w_i = 1 – p if y_i ≤ z_i.
- λ: Smoothing parameter controlling baseline rigidity (typical values: 10² to 10⁹).
- p: Asymmetry parameter favoring points below the spectrum (typical values: 0.001 to 0.05).
Parameter Selection Guidelines
- High Fluorescence Background (Raman): Set λ = 10⁵ – 10⁷ and p = 0.001 – 0.01.
- Broad Overlapping Bands (FTIR / UV-Vis): Set λ = 10³ – 10⁴ and p = 0.01 – 0.05.
2. Savitzky-Golay Convolutional Filtering
Savitzky-Golay filtering fits successive sub-sets of adjacent data points with a low-degree polynomial by linear least squares:
ȳ_k = ∑_{i=-m}^{m} c_i y_{k+i}
Where:
- 2m+1: Window size (frame length). Must be an odd integer.
- k: Polynomial order (typically 2 or 3).
Best Practices
- Window Size: Choose a window size smaller than the Full Width at Half Maximum (FWHM) of the narrowest physical peak to prevent peak broadening.
3. Scientific References & Citations
1. Eilers, P. H., & Boelens, H. F. (2005). *Baseline correction with asymmetric least squares smoothing*. Leiden University Medical Centre Report.
2. Savitzky, A., & Golay, M. J. (1964). *Smoothing and differentiation of data by simplified least squares procedures*. Analytical Chemistry, 36(8), 1627-1639.