pynapple.core.time_series.TsdTensor.convolve#

TsdTensor.convolve(array, ep=None, trim='both')#

Return the discrete linear convolution of the time series with a one dimensional sequence.

A parameter ep can control the epochs for which the convolution will apply. Otherwise the convolution is made over the time support.

This function assume a constant sampling rate of the time series.

The only mode supported is full. The returned object is trimmed to match the size of the original object. The parameter trim controls which side the trimming operates. Default is ‘both’.

See the numpy documentation here : https://numpy.org/doc/stable/reference/generated/numpy.convolve.html

Parameters:
  • array (array-like) – 1-D or 2-D array with kernel(s) to be used for convolution. First dimension is assumed to be time.

  • ep (None, optional) – The epochs to apply the convolution

  • trim (str, optional) – The side on which to trim the output of the convolution (‘left’, ‘right’, ‘both’ [default])

Returns:

The convolved time series

Return type:

Tsd, TsdFrame or TsdTensor