Automated Peak Fitting Routine for XPS data from wood
Nayomi Z. Plaza · Zenodo (CERN European Organization for Nuclear Research) · 2019
The script allows to systematically fit high resolution XPS C1s spectra obtained from wood and other lignocellulosic materials. The code is particularly useful when fitting a large number of data files. Here, python curve fitting functions from the lmfit library are used to deconvolute the spectra into four peaks using a Python routine. First, the Shirley background of each curve is calculated and subtracted from the data, which are then fitted. Each peak is fitted with either a Pseudo-Voigt or a Lorentzian, and the area under each peaks is calculated using numpy's trapezoid function. The integrated areas are then normalized using the transmission function (in this case for an Aluminum K-alpha instrument) and then the relative contribution of each peak is calculated.