FFTPeriodicityDetector.detect#

static FFTPeriodicityDetector.detect(data, window_func='boxcar', detrend_func='linear', max_period_count=None)#

Find periods in the given series.

Parameters:
dataarray_like

Data to be investigated. Must be squeezable to 1-d.

max_period_countint, optional, default = None

Maximum number of periods to look for.

detrend_func{‘constant’, ‘linear’}, optional, default = ‘linear’

The kind of detrending to be applied on the signal. If None, no detrending is applied.

window_funcfloat, str, tuple, optional, default = None

Window function to be applied to the time series. Check window parameter documentation for scipy.signal.get_window function for more information on the accepted formats of this parameter.

Returns:
numpy.ndarray

Array of detected periods sorted by their amplitude strength in descending order. Only unique periods are returned, limited by max_period_count if specified. Each period represents the length (in samples) of a detected periodicity.

See also

numpy.fft

Discrete Fourier Transform.

scipy.signal.detrend

Remove linear trend along axis from data.

scipy.signal.get_window

Return a window of a given length and type.