flagged_intervals¶
- flagged_intervals(vec: list | NDArray[generic]) list[source]¶
Idendity isnads of ones in input array or list.
This utility function finds islands of ones in array or list provided in argument. Used to find contiguous flagged channels in a given spw. Returns a list of tuples with the start and end channels.
Examples: >>> flagged_intervals([0, 1, 0, 1, 1]) [(1, 1), (3, 4)]