uvex_transients.simulation.logical_ops.difference#

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

Restrict catalogs[0] to events (by event_id) not present in catalogs[1].

Parameters:

catalogs (list of EventCatalog) – Exactly two catalogs, [a, b]; the result is a minus b (unlike union/intersection, this is order-sensitive, so no n-ary form is offered).

Returns:

A new catalog over catalogs[0]’s rows whose event_id does not appear in catalogs[1].

Return type:

EventCatalog

Raises:

ValueError – If catalogs doesn’t have exactly two entries, they disagree on nside/order, or both carry pre_cut_counts and those disagree.