Tools for analyzing Raman spectroscopy data, measured by a Witec confocal Raman microscope. It uses xarray DataArrays to effiently store and analyze spectroscopy maps and individual spectra, as well as their metadata. There are two containers for Raman spectroscopy data: ramanmap and singlespec, for use with spectroscopy maps and single spectra.
Documentation can be found here: zrbyte.github.io/ramantools
Installation:
pip install ramantools
If you use this package in your publication, consider citing it: Peter Nemes-I. (2023) “zrbyte/ramantools: v0.3.1”. Zenodo. doi: 10.5281/zenodo.10143138.
Container class for Raman maps exported from Witec software. Key attributes include:
mapxr:xarray.DataArraystoring intensity values, coordinates and metadatamap: rawnumpyarray of intensitiesramanshift: array of Raman shift valuesmask: boolean mask populated after background removalsamplenameandmapname: names extracted from metadata
Container for individual Raman spectra. Important variables:
ssxr:xarray.DataArraywith spectral data and metadatacountsandramanshift: raw spectral datamask: background fit masksamplenameandspecname: metadata fields
gaussian,lorentzandlorentz2implement standard peak shapespolynomial_fitperforms polynomial baseline fittingbgsubtractremoves background using automatic peak detectionpeakfitfits peak functions to spectra or maps
Each class also provides methods for history tracking, background subtraction, calibration, normalization and cosmic ray removal as described in the module docstrings.