Giter Site home page Giter Site logo

raman-deconvolution's Introduction

Deconvolution of Raman spectra

This application is designed for deconvolution of Raman spectra.

Screenshot

Dependencies

Before running this script, please make sure that Python3 and all the required libraries are installed by running:

$ pip install -r requirements.txt

Usage:

$ python RD.py

Input data format

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.)

Spike detection

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.

Baseline subtraction

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.

Deconvolution

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.

Batch deconvolution

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.

Configuration

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

WDF conversion

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.

raman-deconvolution's People

Contributors

macdumi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.