spectrochempy.smooth
- smooth(dataset, size=5, window='avg', dim=-1, **kwargs)[source]
Smooth the data using a window with requested size.
This method is based on the convolution of a scaled kernel window with the signal.
- Parameters:
dataset (
NDDataset) – Input dataset to smooth.size (
int, optional, default: 5) – The size of the smoothing window.window (
str, optional, default:’flat’) – The type of window from ‘flat’ or ‘avg’, ‘han’ or ‘hanning’, ‘hamming’, ‘bartlett’, ‘blackman’.avgwindow will produce a moving average smoothing.dim (
intorstr, optional, default: -1) – Axis along which to apply the filter. Accepts a dimension name (e.g."x") or an integer index (e.g.-1for the last axis).**kwargs (keyword arguments, optional) – Additional keyword arguments passed to the filter.
- Returns:
NDDataset– Smoothed data.- Other Parameters:
See also
FilterFilter processing.