Skip to main content

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.

Metadata

Release files for ramantools 0.3.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ramantools 0.3.6
File Size Uploaded
ramantools-0.3.6.tar.gz 28.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ramantools 0.3.6
File Interpreter ABI Platform
ramantools-0.3.6-py3-none-any.whl Python 3 none any Details

Total release size: 56.9 kB

Release files / ramantools-0.3.6.tar.gz

Download URL ramantools-0.3.6.tar.gz
Size 28.6 kB
Tags Source
SHA-256 checksum
How to use checksums
868d386a77eb3b15a1046f57a83d9a0cc9602a63d8c7a27be6ba2c83b1bf4527
BLAKE2b-256 checksum
How to use checksums
b2b7dd4b130dfe9fdf5bdb2ccfd38c73392206507781b5d106e86deeab0c41cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.20

Release files / ramantools-0.3.6-py3-none-any.whl

Download URL ramantools-0.3.6-py3-none-any.whl
Size 28.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8ed1533193fca04dfa93b3c929b2d2107783eb35e22bd3b4dc9bed7a06c4459f
BLAKE2b-256 checksum
How to use checksums
b1886cf03bf2fed8043d5031312c48b092afab9fa0ad62e4f2d8eab37b4e1730
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.20

Release history Release notifications | RSS feed

This release

0.3.6 This release

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.14

2 release files

0.2.13

2 release files

0.2.10

2 release files

0.2.9

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.4

2 release files

0.2.3

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page