uvex_transients.simulation.logical_ops.union#

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

Combine two or more EventCatalog objects, deduplicating by event_id.

Parameters:

catalogs (list of EventCatalog) – One or more catalogs to combine. Order doesn’t matter (union is commutative); where the same event_id appears in more than one input, the first occurrence (in catalogs order) is kept.

Returns:

A new catalog over the union of every input’s rows, carrying catalogs[0]’s own nside/order/time_bins/seed/sampling_factor.

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.