uvex_transients.simulation.event_catalog.EventCatalog.get_events#
- EventCatalog.get_events(ids: int | ndarray | list, transients: dict[str, TransientBase], schedule: SurveySchedule) Event | list[Event][source]#
Reconstruct one or more Event objects from their event_id.
EventCatalog itself holds no live reference to transients/schedule (see the module docstring), so both must be supplied here – typically the same dict/SurveySchedule the catalog was generated from.
- Parameters:
ids (
intorarray_likeofint) – One event id, or several. A scalar ids returns a single Event; anything array-like returns a list of Event, in the order given.transients (
dict[str,TransientBase]) – Transient-type instances, keyed by the same names used in thetransient_typecolumn (e.g. SurveySimulator.transient_collection).schedule (
SurveySchedule) – The survey schedule to check each reconstructed event’s visibility against.
- Returns:
Reconstructed event or events corresponding to the requested event ids.
- Return type:
Eventorlist[Event]- Raises:
KeyError – If an id isn’t present in this catalog, or its
transient_typeisn’t a key of transients.