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
windowparameter documentation forscipy.signal.get_windowfunction 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.detrendRemove linear trend along axis from data.
scipy.signal.get_windowReturn a window of a given length and type.