eomatch.finder.sat2insitu.Sat2InSituMUFinder.parse_matchup_events

eomatch.finder.sat2insitu.Sat2InSituMUFinder.parse_matchup_events#

Sat2InSituMUFinder.parse_matchup_events(products: scrappi.ProductItemSet) → List[int][source]#

Split products into clusters by time gap, returning cluster boundary indices.

products must already be sorted by start_time (as returned by run_scrappi()). A new cluster starts whenever the gap between one product’s stop_time and the next’s start_time exceeds time_diff_threshold (context config, seconds).

Parameters:

products – time-sorted products, e.g. a ProductItemSet.

Returns:

boundary indices such that cluster i is products[boundary[i]:boundary[i + 1]], e.g. [0, 3, 5] for two clusters of sizes 3 and 2. [0] (no clusters) if products is empty.