pybaselines.Baseline2D.mor
- Baseline2D.mor(data, half_window=None, window_kwargs=None, **kwargs)[source]
A Morphological based (Mor) baseline algorithm.
- Parameters:
- dataarray_like, shape (M, N)
The y-values of the measured data.
- half_window
int
or sequence[int
,int
], optional The half-window used for the rows and columns, respectively, for the morphology functions. If a single value is given, rows and columns will use the same value. Default is None, which will optimize the half-window size using
optimize_window()
and window_kwargs.- window_kwargs
dict
, optional A dictionary of keyword arguments to pass to
optimize_window()
for estimating the half window if half_window is None. Default is None.- **kwargs
Deprecated since version 1.2.0: Passing additional keyword arguments is deprecated and will be removed in version 1.4.0. Pass keyword arguments using window_kwargs.
- Returns:
- baseline
numpy.ndarray
, shape (M, N) The calculated baseline.
dict
A dictionary with the following items:
- 'half_window': np.ndarray[int, int]
The half windows used for the morphological calculations.
- baseline
References
Perez-Pueyo, R., et al. Morphology-Based Automated Baseline Removal for Raman Spectra of Artistic Pigments. Applied Spectroscopy, 2010, 64, 595-600.