SpectroChemPy (SCPy) is a framework for processing, analyzing, and modeling spectroscopic data for chemistry with Python. It is cross-platform (Linux, Windows, macOS) and combines a lightweight scientific core with optional plugins for domain-specific workflows.
Its central object, NDDataset, provides numerical data together with
coordinates, units, masks, labels, history, and metadata, making it easier
to build reproducible spectroscopy workflows in Python.
The history records participating operations on a dataset. It is inspectable, but it is not a complete provenance record; reproducibility also requires the originating script or notebook, inputs, environment, and parameters.
- Core Data Structure:
NDDatasetwith coordinates, units, masks, labels, history, and metadata - Project Management: Organize and manipulate multiple datasets within a
Project - Data Processing:
- Unit-aware mathematical operations
- Baseline correction, automatic subtraction, interpolation, FFT workflows
- Core processing with plugin-specific extensions where appropriate
- Analysis Tools:
- SVD, PCA, MCR-ALS, EFA, PLS, fitting, and related result objects
- I/O and Interoperability:
- Import from major spectroscopy and scientific data formats
- Export to lightweight interchange formats such as CSV, JCAMP-DX, and
minimal MATLAB
.matexchange files - Portable
NDDataset ↔ xarray.Dataset ↔ NetCDFround-trips for the maintained portable subset - Safe native
.scp/.pscppersistence by default, with explicit legacy opt-in only for historical trusted archives
- Plugin System:
- Automatic discovery of optional plugins
- Namespaced APIs:
scp.nmr.read_topspin(...),scp.iris.IRIS() - Dataset accessors for plugin-bound operations
The recommended way to install SpectroChemPy is with uv:
curl -LsSf https://astral.sh/uv/install.sh | sh # if uv is not installed
uv venv scpy --python 3.13
source scpy/bin/activate
uv pip install spectrochempyAlternatively, with mamba / conda:
mamba install -c spectrocat -c conda-forge spectrochempyOr with pip:
pip install spectrochempySee the full installation guide for platform-specific instructions, optional dependencies, and development setup.
Extend SpectroChemPy with official plugins (installed separately):
| Plugin | Install | What it provides |
|---|---|---|
spectrochempy-carroucell |
uv pip install spectrochempy-carroucell |
Carroucell experiment reader |
spectrochempy-hypercomplex |
uv pip install spectrochempy-hypercomplex |
Quaternion / hypercomplex support |
spectrochempy-iris |
uv pip install spectrochempy-iris |
2D-IRIS analysis tools |
spectrochempy-nmr |
uv pip install spectrochempy-nmr |
Bruker TopSpin reader, NMR-specific processing |
spectrochempy-perkinelmer |
uv pip install spectrochempy-perkinelmer |
PerkinElmer .sp IR file reader |
spectrochempy-tensor |
uv pip install spectrochempy-tensor |
Tensor learning tools |
pip install works as well if you are not using uv.
Plugins are also available via conda from the spectrocat channel:
mamba install -c spectrocat -c conda-forge spectrochempy-nmrPlugins are discovered automatically once installed — no manual loading step required.
spectrochempy-cantera is available as an experimental plugin. It is not
officially supported, not included in aggregate extras, and must be installed
manually:
python -m pip install spectrochempy-cantera- 📚 Documentation
- 🔌 Plugins
- 🚀 Installation Guide
- 📓 Example Notebooks
- 🐛 Issue Tracker
- 📝 How to Cite
- 💻 Source Code
If you want to contribute, start with:
CONTRIBUTING.md- the developer guide under
docs/sources/devguide/ - the issue tracker
Maintainer release procedures live in maintainers/.
Architecture, RFCs, and roadmap discussions are maintained in the
SpectroChemPy Maintainer Repository.
