spectrochempy.abc

abc(dataset, dim=-1, **kwargs)[source]

Automatic baseline correction.

Various algorithms are provided to calculate the baseline automatically.

Parameters
  • dataset (a [NDDataset| instance) – The dataset where to calculate the baseline.

  • dim (str or int, optional) – The dataset dimentsion where to calculate the baseline. Default is -1.

  • **kwargs – Optional keyword parameters (see Other Parameters).

Returns

  • baseline_corrected – A baseline corrected dataset.

  • baseline_only – Only the baseline (apply must be set to False).

  • baseline_points – Points where the baseline is calculated (return_points must be set to True).

Other Parameters
  • basetype (string, optional, default: ‘linear’) – See notes - available = linear, basf, …

  • window (float/int, optional, default is 0.05) – If float <1 then the corresponding percentage of the axis size is taken as window.

  • nbzone (int, optional, default is 32) – Number of zones. We will divide the size of the last axis by this number to determine the number of points in each zone (nw).

  • mult (int) – A multiplicator. determine the number of point for the database calculation (nw*mult<n base points).

  • nstd (int, optional, default is 2 times the standard error) – Another multiplicator. Multiply the standard error to determine the region in which points are from the baseline.

  • polynom (bool, optional, default is True) – If True a polynom is computed for the base line, else an interpolation is achieved betwwen points.

  • porder (int, default is 6) – Order of the polynom to fit on the baseline points

  • return_points (bool, optional, default is False) – If True, the points abscissa used to determine the baseline are returned.

  • apply (bool, optional, default is True) – If apply is False, the data are not modified only the baseline is returned.

  • return_pts (bool, optional, default is False) – If True, the baseline reference points are returned.

See also

BaselineCorrection

Manual baseline corrections.

basc

Manual baseline correction.

Notes

#TODO: description of these algorithms * linear - * basf -

Examples

To be done