uvex_transients.simulation.logical_ops.intersection#

uvex_transients.simulation.logical_ops.intersection(catalogs: list[EventCatalog]) → EventCatalog[source]#

Restrict catalogs[0] to events (by event_id) present in every other input too.

Parameters:

catalogs (list of EventCatalog) – Two or more catalogs to intersect. Order doesn’t affect the resulting rows (intersection is commutative), only which input’s own columns/metadata the result carries (catalogs[0]’s).

Returns:

A new catalog over catalogs[0]’s rows whose event_id also appears in every other input.

Return type:

EventCatalog

Raises:

ValueError – If catalogs is empty, any two disagree on nside/order, or two that carry pre_cut_counts disagree on them.