Warning

You are reading the documentation related to the development version. Go here if you are looking for the documentation of the stable release.

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/envs/scpy_docs/lib/python3.10/site-packages/spectrochempy/extern/nmrglue.py:1840: 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 with python

# scp.show()

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

Gallery generated by Sphinx-Gallery