Loading of experimental 1D NMR data

In this example, we load a NMR dataset (in the Bruker format) and plot it.

import spectrochempy as scp

datadir.path contains the path to a default data directory.

datadir = scp.preferences.datadir

path = datadir / "nmrdata" / "bruker" / "tests" / "nmr" / "topspin_1d"

load the data in a new dataset

ndd = scp.NDDataset.read_topspin(path, expno=1, remove_digital_filter=True)

view it…

plot read nmr from bruker

Now load a 2D dataset

path = datadir / "nmrdata" / "bruker" / "tests" / "nmr" / "topspin_2d"
ndd = scp.NDDataset.read_topspin(path, expno=1, remove_digital_filter=True)
_ = scp.plot(ndd)

# scp.show()  # uncomment to show plot if needed (not necessary in jupyter notebook)
plot read nmr from bruker
/home/runner/micromamba-root/envs/scpy/lib/python3.9/site-packages/spectrochempy/extern/nmrglue.py:1796: UserWarning: (196608,)cannot be shaped into(147, 1024)
  warn(str(data.shape) + "cannot be shaped into" + str(shape))

Total running time of the script: ( 0 minutes 1.629 seconds)

Gallery generated by Sphinx-Gallery