Source code for shigawire.models

"""Data models for Kafka topics and SQL tables."""

from pydantic import Field


[docs] class EventData: """Metadata for a gravitational-wave candidate detected by a search pipeline.""" far: float = Field(description="False alarm rate") snr: float = Field(description="Signal to noise ratio") mass1: float = Field(description="Primary mass") mass2: float = Field(description="Secondary mass") mtotal: float = Field(description="Total mass") mchirp: float = Field(description="Chirp mass") event_time: float = Field( description="Merger time in milliseconds from the UNIX epoch" ) program: str = Field(description="Program that uploaded the event") instruments: str = Field( description="Comma-separated list of detectors that contributed data to the event" )
[docs] class Event(EventData): """Same as :class:`EventData`, but includes a unique ID.""" event_uuid: str
[docs] class EventXml: """Storage for the original XML file uploaded by a search pipeline.""" event_uuid: str raw: bytes
[docs] class EventMap: """One-to-many mapping between :class:`Superevent` and :class:`Event` records.""" superevent_uuid: str event_uuid: str
[docs] class Superevent: """A collection of events clustered together in time.""" superevent_uuid: str superevent_time: float preferred_event_uuid: str
[docs] class SupereventFits: """Sky map FITS file for a :class:`Superevent` record.""" superevent_uuid: str raw: bytes