spectrochempy.BaselineCorrector
- class BaselineCorrector(X=None, initial_ranges=None)[source][source]
Launch a GUI for baseline corrections.
Wrapper of BaselineCorrection(X), with widgets for dataset slicing, input parameters and graphical output. Should be run in jupyter notebook (does not always run properly in jupyter lab) with the widget backend (magic
%matplotlib widget
).- Parameters:
See also
BaselineCorrection
Baseline correction method.
Notes
The
BaselineCorrector()
widget can be used in jupyter notebook and jupyter lab.- The GUI buttons are the following:
upload
: allows uploading files. Uploading file will trigger the reading and processing with default parameters (linear baseline with ranges of 5% of the x-axis at both ends). If a NDDataset has been passed or a file has been previously loaded, BaselineCorrector will be reset with the new file(s).process
: triggers baseline correct and plotting of original dataset + baseline and corrected datasetssave as
: save the baseline corrected dataset
The
x slice
andy slice
textboxes can be used to slice the initial dataset with the usual[start:stop:step]
format. In both dimensions, coordinates or indexes can be used (for example, [3000.0::2] or [:100:5] are valid entries).Method
andInterpolation
dropdown fields are self explaining, see BaselineCorrection() for details.Ranges should be entered as a series of intervals or wavenumbers, e.g.
` [5900.0, 5400.0], 2000.0, [1550.0, 1555.0], `
Examples
Runs only in Jupyter notebook/ipython environment. See : User’s Guide > Processing > Baseline corrections for an example.
- [In 2] X = scp.read_omnic(“irdata/nh4y-activation.spg”)
out = scp.BaselineCorrector(X)
Examples using spectrochempy.BaselineCorrector