Skip to main content

spectrochempy-nmr

NMR plugin for SpectroChemPy.

This package is the home for NMR-specific readers and tools that are useful in SpectroChemPy but should not live in the core package. It currently provides a validated public 1D workflow for reading data and processing raw 1D FIDs through scp.nmr.read(...) and scp.nmr.Experiment(...). The readers also load raw 2D time-domain data and vendor-processed 2D spectra and can represent them as hypercomplex arrays; this reading/representation scope is separate from processing, which remains limited to validated 1D experiments.

Future NMR readers or processing helpers can be added here without creating a new plugin package for each vendor format. Multi-dimensional NMR processing remains under active characterization and is not currently part of the public supported processing workflow. A pseudo-2D series (a list of ordinary 1D spectra sharing a secondary coordinate, such as a relaxation series) must be distinguished from a genuine 2D experiment with two Fourier dimensions: the former follows the validated 1D processing path per spectrum.

Installation

The next release, 0.1.13, requires SpectroChemPy 1.1.0 or later (and remains restricted to SpectroChemPy versions below 2). Users who stay on SpectroChemPy 1.0.0 should keep an earlier compatible version of this plugin.

pip install spectrochempy[nmr]

For development inside the SpectroChemPy repository:

pip install -e .
pip install -e plugins/spectrochempy-nmr

Usage

import spectrochempy as scp

dataset = scp.nmr.read("path/to/1/fid")
dataset = scp.nmr.read("path/to/1/pdata/1/1r")
dataset = scp.nmr.read("path/to/experiment", expno=1, procno=1)

experiment = scp.nmr.Experiment(dataset)
spectrum = experiment.process(apodization="em", lb=2.0, size=32768)

This explicit processing example does not imply that vendor processing parameters are automatically imported and replayed from metadata. That contract remains under active characterization.

The current explicit apodization contract covers the public modes already exposed by Experiment.process(): em(lb=...), gm(lb=..., gb=...), and sp(ssb=..., pow=...).

The result of Experiment.process() also records the SpectroChemPy-owned processing trace in result.meta.nmr_processing["scp_processing"]. requested contains only the arguments explicitly provided by the user, whereas applied contains only the operations that were actually executed and the values they really consumed. This trace is attached to the result only: the source dataset is not mutated, the vendor procs profile remains purely descriptive, and phase="metadata" does not replay TopSpin PHC0/PHC1.

The NMR ppm/frequency unit context is also provided by this plugin:

from spectrochempy_nmr.units import set_nmr_context

set_nmr_context(104.3 * scp.ur.MHz)

The compatibility aliases scp.nmr.read_topspin(...) and scp.read_topspin(...) are kept for historical usage. TopSpin is a reader, so it is not exposed as dataset.read_topspin(...) or dataset.nmr.read_topspin(...).

Development

python -m pytest tests/ -v

Metadata

Release files for spectrochempy-nmr 0.1.15

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

Source distribution (sdist)

Source distribution for spectrochempy-nmr 0.1.15
File Size Uploaded
spectrochempy_nmr-0.1.15.tar.gz 123.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for spectrochempy-nmr 0.1.15
File Interpreter ABI Platform
spectrochempy_nmr-0.1.15-py3-none-any.whl Python 3 none any Details

Total release size: 210.2 kB

Release files / spectrochempy_nmr-0.1.15.tar.gz

Download URL spectrochempy_nmr-0.1.15.tar.gz
Size 123.0 kB
Tags Source
SHA-256 checksum
How to use checksums
85a89d78467b2295570ef3bb19834cdfaa8700303f82509405523e407c52ff5f
BLAKE2b-256 checksum
How to use checksums
4b0054426dd8d9710b3630350eaafa42066990517aaccfa57f7f802eead83b5f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 17, 2026.

Transparency log

Release files / spectrochempy_nmr-0.1.15-py3-none-any.whl

Download URL spectrochempy_nmr-0.1.15-py3-none-any.whl
Size 87.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bd92c4916de799820b59f484000cd72c581961f4676f358f49740a0dd81e6b5b
BLAKE2b-256 checksum
How to use checksums
f63d70f0c24e49f72cc098607772245da34bb26d5ac76ea4eae7a6ec5dbb39b8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 17, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.15 This release

2 release files

0.1.13

2 release files

0.1.12

2 release files

0.1.8

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

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