pyhctsa.operations.stationarity.local_extrema

pyhctsa.operations.stationarity.local_extrema(y, how_to_window='l', n=None)

How local maximums and minimums vary across the time series.

Finds maximums and minimums within given segments of the time series and analyzes the results.

Parameters:
y : array-like

The input time series

how_to_window : str, optional

Method to determine window size (default is ‘l’):

  • ’l’: windows of a given length (n specifies the window length)

  • ’n’: specified number of windows to break the time series into (n specifies number of windows)

  • ’tau’: sets window length equal to correlation length (first zero-crossing of autocorrelation)

n : int, optional

Specifies either:

  • Window length when how_to_window=’l’ (defaults to 100)

  • Number of windows when how_to_window=’n’ (defaults to 5)

  • Not used when how_to_window=’tau’

Returns:

Statistics about local extrema.

Return type:

dict