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(...).
Future NMR readers or processing helpers can be added here without creating a new plugin package for each vendor format. Multi-dimensional NMR remains under active characterization and is not currently part of the public supported processing workflow.
Installation
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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file spectrochempy_nmr-0.1.10.tar.gz.
File metadata
- Download URL: spectrochempy_nmr-0.1.10.tar.gz
- Upload date:
- Size: 106.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2713eaac27145137712dba6606d5533d275d70e93ff99355ddc73bbf9a5ce520
|
|
| MD5 |
29370cc567979fae58959269a76c8d47
|
|
| BLAKE2b-256 |
27d0f84e35eac6381b385bdfad6bbb6c76a3a3789cc3b9908c0dbb7d3050ce7c
|
Provenance
The following attestation bundles were made for spectrochempy_nmr-0.1.10.tar.gz:
Publisher:
publish_plugins.yml on spectrochempy/spectrochempy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
spectrochempy_nmr-0.1.10.tar.gz -
Subject digest:
2713eaac27145137712dba6606d5533d275d70e93ff99355ddc73bbf9a5ce520 - Sigstore transparency entry: 2348127239
- Sigstore integration time:
-
Permalink:
spectrochempy/spectrochempy@47d550a6d01431460b6f19511d40facfd3effbc0 -
Branch / Tag:
refs/tags/spectrochempy-nmr-v0.1.10 - Owner: https://github.com/spectrochempy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish_plugins.yml@47d550a6d01431460b6f19511d40facfd3effbc0 -
Trigger Event:
release
-
Statement type:
File details
Details for the file spectrochempy_nmr-0.1.10-py3-none-any.whl.
File metadata
- Download URL: spectrochempy_nmr-0.1.10-py3-none-any.whl
- Upload date:
- Size: 84.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cfd730b609ddc198580534ae0aefe5088a7f7a9b290637c6ecbba4df636cf9cb
|
|
| MD5 |
3155753136fc06ab8442a6478934f525
|
|
| BLAKE2b-256 |
873751c91c1d913c7ba9865c8bc668d39e6c00238a278c23a7e7bd9e6e613506
|
Provenance
The following attestation bundles were made for spectrochempy_nmr-0.1.10-py3-none-any.whl:
Publisher:
publish_plugins.yml on spectrochempy/spectrochempy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
spectrochempy_nmr-0.1.10-py3-none-any.whl -
Subject digest:
cfd730b609ddc198580534ae0aefe5088a7f7a9b290637c6ecbba4df636cf9cb - Sigstore transparency entry: 2348127491
- Sigstore integration time:
-
Permalink:
spectrochempy/spectrochempy@47d550a6d01431460b6f19511d40facfd3effbc0 -
Branch / Tag:
refs/tags/spectrochempy-nmr-v0.1.10 - Owner: https://github.com/spectrochempy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish_plugins.yml@47d550a6d01431460b6f19511d40facfd3effbc0 -
Trigger Event:
release
-
Statement type: