pyrfu.pyrf.ts_convolve module#
- pyrfu.pyrf.ts_convolve.ts_convolve(inp, kernel, mode: str = 'nearest')[source]#
Compute the convolution of a time series of N-dimensional data with a N-dimensional kernel. *Right now has only been tested for calculating moving averages of 1D time series *
The convolution is done using scipy.ndimage.convolve, with mode = “nearest” (read documentation for scipy.ndimage.convolve for more information).
Parameters:#
- inpxarray.DataArray
The time series to be convolved with the kernel.
- kernel: nd.array
The kernel to apply to inp for the convolution.
Returns:#
- outxarray.DataArray
An array containing the convolution of inp with kernel. Mode “valid” is applied from numpy.convolve, which does not affect the edges of the time series.