This application is designed for deconvolution of Raman spectra.
Before running this script, please make sure that Python3 and all the required libraries are installed by running:
$ pip install -r requirements.txt
$ python RD.py
The data should be in a text file with two columns (Raman shift and Intensity) separated by any commonly used delimiter. The script also accepts .wdf files (generated by the WIRE software of Renishaw Inc.)
The script has an integrated "spike" detector. To detect "spikes" the moving average of two adjacent points is compared and, if the difference is higher than the threshold value, the point is considered as a spike. If the algorithm fails to detect spikes, the user can specify another threshold value and try again.
By default the baseline is calculated using a third degree polynomial function. However, the user is able to change the degree of the poly-function if the baseline does not fit the experimental data. A preview of the calculated baseline and the experimental data can be displayed.
The deconvolution can be performed with either a conventional least squares method or Markov chains Monte Carlo algorithm (MCMC). Regardless of the method, the shape, bounds and initial guess for all the bands can be adjusted. Currently, 4 peak shapes are supported: Lorentzian, Gaussian, Voigt, and Breit-Wigner-Fano.
It is possible to deconvolute multiple files at once (only with the least squares method). The user should carefully choose the region of interest and input parameters and ensure that all the spikes are removed. It is possible to choose the number of processes that will be spawned/forked.
Default values are loaded from the configuration file (./config/config.ini). To change the initial guess, bounds and the shape of peaks, edit the ./config/initialData.csv
You can convert wdf files to a more manageable format with the convertwdf.py script
$./convertwdf.py <fileName>
If the file contains only one spectrum the output will be a text file with two columns, if the file contains multiple spectra a csv file will be created with columns corresponding to each of the present spectra.