This function allows you to base-line correct and edge-step normalize XANES spectra (background correction). Raw spectra are loaded, then base-line corrected and edge-step normalized. The spectrum is flattened after E0. The function returns the corrected, normalized and flattened spectrum
bkg_corr(raw.spec, corr.norm)
Arguments
raw.spec: Raw spectrum
corr.norm: Vector of the base-line correction and edge-step normalization values (vector of length 4)