Note
Go to the end to download the full example code.
Loading an IR (omnic SPG) experimental file#
Here we load an experimental SPG file (OMNIC) and plot it.
import spectrochempy as scp
Load and display the dataset#
dataset = scp.read_omnic("irdata/nh4y-activation.spg")
_ = dataset.plot_stack(style="paper")

/home/docs/checkouts/spectrochempy/checkouts/stable/src/spectrochempy/plotting/backends/matplotlib_backend.py:116: DeprecationWarning: The `method="stack"` plotting alias is deprecated. Use `method="lines"` instead. It will not be removed before the SpectroChemPy deprecation policy is satisfied.
method = normalize_backend_method(method, warned_aliases=_WARNED_ALIASES)
Adjust axis metadata#
dataset.y.to("hour")
dataset.y -= dataset.y[0]
dataset.y.title = "acquisition time"
_ = dataset.plot_stack()

Uncomment the following line to display all figures when running the script directly with Python.
# scp.show()
Total running time of the script: (0 minutes 0.338 seconds)