magic-cta-pipe is under active development. Expect large and rapid changes in functionality.

intersect_time_intervals#

magicctapipe.utils.intersect_time_intervals(intervals1, intervals2)[source]#

Intersects two lists of (TStart, TStop) pairs. Returned list contains the start/stop invervals, common in both input lists.

Parameters:
intervals1list

First list of (TStart, TStop) lists (or tuples).

intervals2list

Second list of (TStart, TStop) lists (or tuples).

Returns:
list

A list of (TStart, TStop) lists, representing the start/stop invervals, common in both input lists.