Linear Combination Fitting
Background correction function
Porting of 'ATHENA' linear combination fitting
Central fitting function with float environment
Initial loading of spectra
Linear combination fitting function
Linear combination fitting solve function
Plot sample data, linear combination fit and residual spectrum
Read raw spectra
Phosphorus K-edge XANES spectral data for LCF
Create a data frame of all standards
Baseline correction, normalization and linear combination fitting (LCF) of X-ray absorption near edge structure (XANES) spectra. The package includes data loading of .xmu files exported from 'ATHENA' (Ravel and Newville, 2005) <doi:10.1107/S0909049505012719>. Loaded spectra can be background corrected and all standards can be fitted at once. Two linear combination fitting functions can be used: (1) fit_athena(): Simply fitting combinations of standards as in ATHENA, (2) fit_float(): Fitting all standards with changing baseline correction and edge-step normalization parameters.