spectrochempy.BaselineCorrection

class BaselineCorrection(**kwargs)[source]

Baseline Correction processor.

2 methods are proposed :

  • sequential (default) = classical polynom fit or spline interpolation with separate fitting of each row (spectrum)

  • multivariate = SVD modeling of baseline, polynomial fit of PC’s and calculation of the modelled baseline spectra.

Interactive mode is proposed using the interactive function : run.

Parameters

dataset (|NDDataset|) – The dataset to be transformed.

See also

abc

Automatic baseline correction.

Examples

from spectrochempy import *
nd = NDDataset.read_omnic('irdata/nh4y-activation.spg')
ndp = nd[:, 1291.0:5999.0]
bc = BaselineCorrection(ndp)
ranges=[[5996., 5998.], [1290., 1300.],
        [2205., 2301.], [5380., 5979.],
        [3736., 5125.]]
span = bc.compute(*ranges,method='multivariate',
                  interpolation='pchip', npc=8)
_ = bc.corrected.plot_stack()
show()

(Source code)

Methods

BaselineCorrection.compute(*ranges, **kwargs)

Base function for dataset baseline correction.

BaselineCorrection.run(*ranges, **kwargs)

Interactive version of the baseline correction.

Examples using spectrochempy.BaselineCorrection

NDDataset baseline correction

NDDataset baseline correction