uvex_transients.simulation.logical_ops#

Set operations between two or more named EventCatalog objects, keyed by event_id.

Unlike ~uvex_transients.simulation.core.cut (a predicate that narrows one catalog), these combine several already-produced catalogs – e.g. the events a magnitude cut kept intersected with the events an independent SNR-based branch kept, or the events one branch caught that another didn’t. LOGICAL_OPS is a small, fixed dict rather than a @cut/@action-style open registry: these three set operations are the whole space of what “combine catalogs by event_id” can mean, not something users are expected to add bespoke variants of.

Attributes

LOGICAL_OPS

{op name: implementation}, dispatched by name from a config-driven logical_op step (see uvex_transients.cli.steps).

LOGICAL_OP_ARITY

Minimum/maximum number of inputs each op in LOGICAL_OPS accepts, for upfront arity validation.

Functions

difference(catalogs)

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

intersection(catalogs)

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

union(catalogs)

Combine two or more EventCatalog objects, deduplicating by event_id.