Skip to main content

Tools for analyzing Raman spectroscopy data, measured by a Witec confocal Raman microscope.

Project description

ramantools

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

Binder

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.

DOI

Summary of Core API

ramanmap

Container class for Raman maps exported from Witec software. Key attributes include:

  • mapxr: xarray.DataArray storing intensity values, coordinates and metadata
  • map: raw numpy array of intensities
  • ramanshift: array of Raman shift values
  • mask: boolean mask populated after background removal
  • samplename and mapname: names extracted from metadata

singlespec

Container for individual Raman spectra. Important variables:

  • ssxr: xarray.DataArray with spectral data and metadata
  • counts and ramanshift: raw spectral data
  • mask: background fit mask
  • samplename and specname: metadata fields

Utility functions

  • gaussian, lorentz and lorentz2 implement standard peak shapes
  • polynomial_fit performs polynomial baseline fitting
  • bgsubtract removes background using automatic peak detection
  • peakfit fits 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ramantools-0.3.6.tar.gz (28.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ramantools-0.3.6-py3-none-any.whl (28.3 kB view details)

Uploaded Python 3

File details

Details for the file ramantools-0.3.6.tar.gz.

File metadata

  • Download URL: ramantools-0.3.6.tar.gz
  • Upload date:
  • Size: 28.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for ramantools-0.3.6.tar.gz
Algorithm Hash digest
SHA256 868d386a77eb3b15a1046f57a83d9a0cc9602a63d8c7a27be6ba2c83b1bf4527
MD5 0f3cf1326de1d3bc81aa0fd1da31dbf8
BLAKE2b-256 b2b7dd4b130dfe9fdf5bdb2ccfd38c73392206507781b5d106e86deeab0c41cd

See more details on using hashes here.

File details

Details for the file ramantools-0.3.6-py3-none-any.whl.

File metadata

  • Download URL: ramantools-0.3.6-py3-none-any.whl
  • Upload date:
  • Size: 28.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for ramantools-0.3.6-py3-none-any.whl
Algorithm Hash digest
SHA256 8ed1533193fca04dfa93b3c929b2d2107783eb35e22bd3b4dc9bed7a06c4459f
MD5 a27e476c5ebd911002545f64c6058afe
BLAKE2b-256 b1886cf03bf2fed8043d5031312c48b092afab9fa0ad62e4f2d8eab37b4e1730

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page