pyhctsa.operations.symbolic.binary_stretch¶
-
pyhctsa.operations.symbolic.binary_stretch(x, stretch_what=
'lseq1')¶ Characterize stretches of 0s or 1s in a binarized time series.
This function binarizes the input time series based on its mean: values above the mean are converted to 1, and values below to 0. It then computes a statistic related to the lengths of consecutive 0s or 1s in the resulting binary sequence, depending on the stretch_what argument.
Note: Due to an implementation error in the original version, this function does not correctly compute the longest stretch of 0s or 1s, but still produces a potentially interesting statistic.