Skip to main content

RamanSPy logo

Downloads contributions welcome

RamanSPy is an open-source Python package for integrative Raman spectroscopy data analysis.

Overview of RamanSPy

Key features

  • Common data format
  • Data loaders
  • Preprocessing methods
  • Preprocessing pipelining
  • Preprocessing protocols
  • Analysis methods
  • AI & ML integration
  • Visualisation tools
  • Datasets
  • Synthetic data generator
  • Metrics

Installation

RamanSPy has been published on PyPI and can be installed via pip:

pip install ramanspy

Code example

Below is a simple example of how RamanSPy can be used to load, preprocess and analyse Raman spectroscopic data. Here, we load a data file from a commercial Raman instrument; apply a preprocessing pipeline consisting of spectral cropping, cosmic ray removal, denoising, baseline correction and normalisation; perform spectral unmixing; and visualise the results.

import ramanspy as rp

# load data
image_data = rp.load.witec("<PATH>")

# apply a preprocessing pipeline
pipeline = rp.preprocessing.Pipeline([
    rp.preprocessing.misc.Cropper(region=(700, 1800)),
    rp.preprocessing.despike.WhitakerHayes(),
    rp.preprocessing.denoise.SavGol(window_length=9, polyorder=3),
    rp.preprocessing.baseline.ASPLS(),
    rp.preprocessing.normalise.MinMax()
])
data = pipeline.apply(image_data)

# perform spectral unmixing
nfindr = rp.analysis.unmix.NFINDR(n_endmembers=5)
amaps, endmembers = nfindr.apply(data)

# plot results
rp.plot.spectra(endmembers)
rp.plot.image(amaps)
rp.plot.show()

Documentation

For more information about the functionalities of the package, refer to the documentation.

Credits

If you use this package for your research, please cite our paper:

Georgiev, D.; Pedersen, S. V.; Xie, R.; Fernández-Galiana, Á.; Stevens, M. M.; Barahona, M. RamanSPy: An open-source Python package for integrative Raman spectroscopy data analysis. ACS Analytical Chemistry 2024, 96(21), 8492-8500, DOI: 10.1021/acs.analchem.4c00383

@article{georgiev2024ramanspy,
    title={RamanSPy: An open-source Python package for integrative Raman spectroscopy data analysis},
    author={Georgiev, Dimitar and Pedersen, Simon Vilms and Xie, Ruoxiao and Fern{\'a}ndez-Galiana, Alvaro and Stevens, Molly M and Barahona, Mauricio},
    journal={Analytical Chemistry},
    volume={96},
    number={21},
    pages={8492-8500},
    year={2024},
    doi={10.1021/acs.analchem.4c00383}
}

Also, if you find RamanSPy useful, please consider leaving a star on GitHub.

Metadata

Release files for ramanspy 0.2.10

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

Source distribution (sdist)

Source distribution for ramanspy 0.2.10
File Size Uploaded
ramanspy-0.2.10.tar.gz 40.8 kB Details

Built distribution (wheel)

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

Total release size: 87.7 kB

Release files / ramanspy-0.2.10.tar.gz

Download URL ramanspy-0.2.10.tar.gz
Size 40.8 kB
Tags Source
SHA-256 checksum
How to use checksums
e3e5fce69de0b6e845ed15c68d3adfc76513d7f3f01a594cc266ce838cb5aa34
BLAKE2b-256 checksum
How to use checksums
91fe328782e78d0b9f4ce13e6f86a7c5f6a7f06089e8115d3473cd48ec18bac7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release files / ramanspy-0.2.10-py3-none-any.whl

Download URL ramanspy-0.2.10-py3-none-any.whl
Size 47.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4b034b6ed65e372ba0efa31e7463f7da59ed181c704a483b550b01fdf40665b4
BLAKE2b-256 checksum
How to use checksums
e0b424e6f1bb9e1a8a773fdc3fb4830c90bbd68ba00c1583e83349798afa8856
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release history Release notifications | RSS feed

This release

0.2.10 This release

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

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

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