Note
Go to the end to download the full example code.
Loading of experimental NMR data
In this example, we load a NMR dataset (in the Bruker format) and plot it.
Requires the official spectrochempy-nmr plugin.
Install with: pip install spectrochempy[nmr].
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.nmr.read_topspin(path, expno=1, remove_digital_filter=True)
view it…

Now load a 2D dataset

/home/runner/work/spectrochempy/spectrochempy/plugins/spectrochempy-nmr/src/spectrochempy_nmr/nmrglue.py:1023: UserWarning: (196608,)cannot be shaped into(147, 1024)
_, data = read_binary(f, shape=shape, cplex=cplex, big=big, isfloat=isfloat)
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.373 seconds)