pyhctsa.operations.correlation.first_crossing

pyhctsa.operations.correlation.first_crossing(y, corr_fun='ac', threshold=0.0, what_out='both')

The first crossing of a given autocorrelation function across a given threshold.

Parameters:
y : array-like

The input time series.

corr_fun : str, optional

The self-correlation function to measure: ‘ac’: normal linear autocorrelation function. Default is 'ac'.

threshold : float, optional

Threshold to cross. Examples: 0 [first zero crossing], 1/np.e [first 1/e crossing]. Default is 0.

what_out : str, optional

Specifies the output format: ‘both’, ‘discrete’, or ‘continuous’. Default is 'both'.

Returns:

The first crossing information, format depends on what_out.

Return type:

dict or float