SAZED.detect#

static SAZED.detect(data, window_func='boxcar', detrend_func='linear', method='optimal')#

Detect a period in the input data using the SAZED ensemble method.

Parameters:
dataarray_like

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

window_funcfloat, str, tuple, default = ‘boxcar’

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.

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

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

method{‘optimal’, ‘majority’}, default = ‘optimal’

The ensemble method to use. ‘optimal’ uses correlation-based period selection, while ‘majority’ uses voting.

Returns:
int or None

The detected period length in samples, or None if no valid period is found.

Raises:
ValueError
  • If input data contains NaN or Inf values

  • If method is neither ‘optimal’ nor ‘majority’

See also

scipy.signal.detrend

Remove linear trend along axis from data.

scipy.signal.get_window

Return a window of a given length and type.