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.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.read_topspin(path, expno=1, remove_digital_filter=True)
_ = scp.plot(ndd)
plot read nmr from bruker
/home/runner/micromamba-root/envs/scpy/lib/python3.9/site-packages/spectrochempy/extern/nmrglue.py:1794: UserWarning: (196608,)cannot be shaped into(147, 1024)
  warn(str(data.shape) + "cannot be shaped into" + str(shape))

This ends the example ! The following line can be uncommented if no plot shows when running the .py script

scp.show()

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

Gallery generated by Sphinx-Gallery