Metadata-Version: 2.4
Name: spectrochempy-nmr
Version: 0.1.8
Summary: NMR readers and tools plugin for SpectroChemPy
Requires-Python: >=3.11
Description-Content-Type: text/markdown
Requires-Dist: spectrochempy<0.12,>=0.10
Requires-Dist: numpy
Provides-Extra: hypercomplex
Requires-Dist: spectrochempy-hypercomplex>=0.1.0; extra == "hypercomplex"

# 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 contributes
the Bruker TopSpin reader, exposed through `scp.nmr.read(...)` and registered
under the reader name `topspin`.

Future NMR readers or processing helpers can be added here without creating a
new plugin package for each vendor format.

## Installation

```bash
pip install spectrochempy[nmr]
```

For development inside the SpectroChemPy repository:

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

## Usage

```python
import spectrochempy as scp

dataset = scp.nmr.read("path/to/1/fid")
dataset = scp.nmr.read("path/to/2rr")
dataset = scp.nmr.read("path/to/experiment", expno=1, procno=1)
```

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

```python
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

```bash
python -m pytest tests/ -v
```
