eelbrain.find_intervals¶
-
eelbrain.
find_intervals
(ndvar, interpolate=False)¶ Find intervals from a boolean NDVar
Parameters: - ndvar : boolean NDVar (time,)
Data which to convert to intervals.
- interpolate : bool
By default,
start
values reflect the first sample that isTrue
andstop
values reflect the first sample that isFalse
. Withinterpolate=True
, time points are shifted half a sample to the left. This is desirable for example when marking regions in a plot.
Returns: - intervals : iterator over tuples
Intervals represented as
(start, stop)
tuples