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")
plot read IR from omnic
/home/runner/work/spectrochempy/spectrochempy/src/spectrochempy/plotting/backends/matplotlib_backend.py:117: 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()
plot read IR from omnic

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.492 seconds)