resistics.common.smooth module

resistics.common.smooth.smooth1d(x: numpy.ndarray, winLen: int = 11, window: str = 'hann')[source]

Smooth in 1 dimension

Parameters
xnp.ndarray

The data array to be smoothed

winLenint

The number of samples to smooth across

windowstr

The window function. Default is “hann”.

Notes

The data is padded before the smoothing to ensure that the output data is the same size as the input.

todo: The window parameter could be the window itself if an array instead of a string

resistics.common.smooth.smooth2d(x: numpy.ndarray, winLen: List[int] = [5, 5], window: str = 'hann')[source]

Smooth in 2-D

This smooths in a window and across windows too

Parameters
xnp.ndarray

A 2-D array to be smoothed

winLenList[int]

A two element list with winLen[0] being smoothing across windows and winLen[1] the smoothing within a window

windowstr

The window function to use. Default is hann.