spectrochempy.smooth
- smooth(dataset, size=5, window='avg', **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.**kwargs (keyword arguments, optional) – Additional keyword arguments passed to the filter.
- Returns:
NDDataset– Smoothed data.- Other Parameters:
dim (
int, optional, default: -1) – Axis along which to apply the filter.mode (
str, optional, default: ‘nearest’) – The mode parameter determines how the array borders are handled.cval (
float, optional, default: 0.0) – Value to fill past edges of input if mode is ‘constant’.log_level (
str, optional, default: ‘WARNING’) – The log level for the filter.
See also
FilterFilter processing.