Add baseline methods to the `Spectra` class
Opened this issue · 0 comments
Available baseline methods:
-
ALS
Source: Baseline Correction with Asymmetric Least SquaresSmoothing P. Eilers and H. Boelens
Code: Provided in the article and some python examples are available here -
Iterative algorithm based on mean suppression
Source: 4SPeakFilling–baseline estimation by iterative mean suppression Kristian Hovde Liland. DOI:10.1016/j.mex.2015.02.009
R code: https://github.com/khliland/baseline/blob/master/R/baseline.fillPeaks.R -
Iterative restricted least squares with iteration breaking (irls):
Source:
R code: https://github.com/khliland/baseline/blob/master/R/baseline.irls.R -
Low-pass filter based on Fast Fourier Transform.
Source: Elimination of Baseline Variations from a Recorded Spectrum by Ultra-low Frequency Filtering Ahmet K. Atakan, W. E. Blass, and D. E. Jennings. Applied Spectroscopy Vol. 34, Issue 3, pp. 369-372 (1980)
R code: https://github.com/khliland/baseline/blob/master/R/baseline.lowpass.R -
Median window
Source: A model-free algorithm for the removal of baseline artifacts Mark S. Friedrichs DOI:10.1007/BF00208805
R code: https://github.com/khliland/baseline/blob/master/R/baseline.medianWindow.R -
Modified polyfit
Source: Automated method for subtraction of fluorescence from biological Raman spectra Lieber CA, Mahadevan-Jansen A. DOI:10.1366/000370203322554518
R code: https://github.com/khliland/baseline/blob/master/R/baseline.modpolyfit.R -
Peak detection
Source: Quality Control and Peak Finding for Proteomics Data Collected from Nipple Aspirate Fluid by Surface-Enhanced Laser Desorption and Ionization Kevin R. Coombes, et al. DOI: 10.1373/49.10.1615
R code: https://github.com/khliland/baseline/blob/master/R/baseline.peakDetection.R -
Robust fitting of local regression models for estimating a baseline or a background signal
Sources: -
Baseline Subtraction Using Robust Local Regression Estimation Ruckstuhl, Andreas F., et al; DOI:10.1016/S0022-4073(00)00021-2
-
Robust extraction of baseline signal of atmospheric trace species using local regression Ruckstuhl, Andreas F. DOI:10.5194/amt-5-2613-2012
R code: https://github.com/khliland/baseline/blob/master/R/baseline.rfbaseline.R -
Rolling Ball
Source: Algorithm for fitting XRF, SEM and PIXE X-ray spectra backgrounds M.A.Kneen, H.J.Annegarn DOI:10.1016/0168-583X(95)00908-6
R code: https://github.com/khliland/baseline/blob/master/R/baseline.rollingBall.R -
Shirley
Source: -
The Peak-Shirley Background Alberto Herrera-Gomez
R code: https://github.com/khliland/baseline/blob/master/R/baseline.shirley.R -
Polynomials
Source: ???
R code: https://github.com/cbeleites/hyperSpec/blob/master/hyperSpec/R/spc.fit.poly.R -
Rubberband
-
Source: ???
-
Code: It seems like implementations varies in different softwares/packages. Some python implementation is provided at here. R code is also available at https://github.com/cbeleites/hyperSpec/blob/master/hyperSpec/R/spc.rubberband.R
-
Lines or splines using custom wavelength points
Source:
R code: -
arPLS
Source: Baseline correction using asymmetrically reweighted penalized least squares smoothing Sung-June Baek, Aaron Park, Young-Jin Ahn, and Jaebum Choo DOI:10.1039/b000000x
Code: Is simple and provided in the article -
airPLS
Source: Baseline correction using adaptive iteratively reweighted penalized least squares Zhi-Min Zhang, Shan Chena and Yi-Zeng Liang. DOI:10.1039/b922045c
Python code: https://github.com/zmzhang/airPLS/blob/master/airPLS.py -
Wavelets
Source: An intelligent background-correction algorithm for highly fluorescent samples in Raman spectroscopy Z.M. Zhang, S. Chen, Y.Z. Liang, et al. DOI: 10.1002/jrs.2500
R code: https://github.com/zmzhang/baselineWavelet -
Morphological operations
Source: An automated baseline correction method based on iterative morphological operations, Yunliang Chen, Liankui Dai DOI: 10.1177%2F0003702817752371
R code: https://github.com/rguliev/spectra-heplers/blob/master/baseline/mor.R
The methods must be provided via accessor class SpectraBaselineMethods