Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
#
# =============================================================================
#
# multi_burst:table
#
# =============================================================================
#
#
# FIXME: I think extra columns have been added here that aren't in other
# places where this table is defined.
#
class MultiBurstTable(table.Table):
tableName = "multi_burst:table"
validcolumns = {
"creator_db": "int_4s",
"process_id": "ilwd:char",
"filter_id": "ilwd:char",
"ifos": "lstring",
"start_time": "int_4s",
"start_time_ns": "int_4s",
"duration": "real_4",
"peak_time": "int_4s",
"peak_time_ns": "int_4s",
"central_freq": "real_4",
"bandwidth": "real_4",
"amplitude": "real_4",
"snr": "real_4",
"confidence": "real_4",
__slots__ = ExperimentSummaryTable.validcolumns.keys()
ExperimentSummaryTable.RowType = ExperimentSummary
#
# =============================================================================
#
# experiment_map:table
#
# =============================================================================
#
class ExperimentMapTable(table.Table):
tableName = "experiment_map:table"
validcolumns = {
"experiment_summ_id": "ilwd:char",
"coinc_event_id": "ilwd:char",
}
how_to_index = {
"em_esi_index": ("experiment_summ_id",),
"em_cei_index": ("coinc_event_id",)
}
def get_experiment_summ_ids( self, coinc_event_id ):
"""
Gets all the experiment_summ_ids that map to a given coinc_event_id.
"""
experiment_summ_ids = []
for row in self:
SimBurstTable.RowType = SimBurst
#
# =============================================================================
#
# sim_ringdown:table
#
# =============================================================================
#
SimRingdownID = ilwd.get_ilwdchar_class(u"sim_ringdown", u"simulation_id")
class SimRingdownTable(table.Table):
tableName = "sim_ringdown:table"
validcolumns = {
"process_id": "ilwd:char",
"waveform": "lstring",
"coordinates": "lstring",
"geocent_start_time": "int_4s",
"geocent_start_time_ns": "int_4s",
"h_start_time": "int_4s",
"h_start_time_ns": "int_4s",
"l_start_time": "int_4s",
"l_start_time_ns": "int_4s",
"v_start_time": "int_4s",
"v_start_time_ns": "int_4s",
"start_time_gmst": "real_8",
"longitude": "real_4",
"latitude": "real_4",
SegmentTable.RowType = Segment
#
# =============================================================================
#
# segment_definer:table
#
# =============================================================================
#
SegmentDefID = ilwd.get_ilwdchar_class(u"segment_definer", u"segment_def_id")
class SegmentDefTable(table.Table):
tableName = "segment_definer:table"
validcolumns = {
"creator_db": "int_4s",
"process_id": "ilwd:char",
"segment_def_id": "ilwd:char",
"ifos": "lstring",
"name": "lstring",
"version": "int_4s",
"comment": "lstring",
"insertion_time": "int_4s"
}
constraints = "PRIMARY KEY (segment_def_id)"
next_id = SegmentDefID(0)
interncolumns = ("process_id",)
ExperimentMapTable.RowType = ExperimentMap
#
# =============================================================================
#
# gds_trigger:table
#
# =============================================================================
#
GDSTriggerID = ilwd.get_ilwdchar_class(u"gds_trigger", u"event_id")
class GDSTriggerTable(table.Table):
tableName = "gds_trigger:table"
validcolumns = {
"creator_db": "int_4s",
"process_id": "ilwd:char_u",
"filter_id": "ilwd:char",
"name": "lstring",
"subtype": "lstring",
"ifo": "lstring",
"start_time": "int_4s",
"start_time_ns": "int_4s",
"duration": "real_4",
"priority": "int_4s",
"disposition": "int_4s",
"size": "real_4",
"significance": "real_4",
"frequency": "real_4",
__slots__ = LfnTable.validcolumns.keys()
LfnTable.RowType = Lfn
#
# =============================================================================
#
# process_params:table
#
# =============================================================================
#
class ProcessParamsTable(table.Table):
tableName = "process_params:table"
validcolumns = {
"program": "lstring",
"process_id": "ilwd:char",
"param": "lstring",
"type": "lstring",
"value": "lstring"
}
# FIXME: these constraints break ID remapping in the DB backend.
# an index is used instead. switch back to the constraints when I
# can figure out how not to break remapping.
#constraints = "PRIMARY KEY (process_id, param)"
how_to_index = {
"pp_pip_index": ("process_id", "param"),
}
ExtTriggersTable.RowType = ExtTriggers
#
# =============================================================================
#
# filter:table
#
# =============================================================================
#
FilterID = ilwd.get_ilwdchar_class(u"filter", u"filter_id")
class FilterTable(table.Table):
tableName = "filter:table"
validcolumns = {
"process_id": "ilwd:char",
"program": "lstring",
"start_time": "int_4s",
"filter_name": "lstring",
"filter_id": "ilwd:char",
"param_set": "int_4s",
"comment": "lstring"
}
constraints = "PRIMARY KEY (filter_id)"
next_id = FilterID(0)
class Filter(object):
__slots__ = FilterTable.validcolumns.keys()
SimInspiralTable.RowType = SimInspiral
#
# =============================================================================
#
# sim_burst:table
#
# =============================================================================
#
SimBurstID = ilwd.get_ilwdchar_class(u"sim_burst", u"simulation_id")
class SimBurstTable(table.Table):
tableName = "sim_burst:table"
validcolumns = {
"process_id": "ilwd:char",
"waveform": "lstring",
"ra": "real_8",
"dec": "real_8",
"psi": "real_8",
"time_geocent_gps": "int_4s",
"time_geocent_gps_ns": "int_4s",
"time_geocent_gmst": "real_8",
"duration": "real_8",
"frequency": "real_8",
"bandwidth": "real_8",
"q": "real_8",
"pol_ellipse_angle": "real_8",
"pol_ellipse_e": "real_8",
ExperimentTable.RowType = Experiment
#
# =============================================================================
#
# experiment_summary:table
#
# =============================================================================
#
ExpSummID = ilwd.get_ilwdchar_class(u"experiment_summary", u"experiment_summ_id")
class ExperimentSummaryTable(table.Table):
tableName = "experiment_summary:table"
validcolumns = {
"experiment_summ_id": "ilwd:char",
"experiment_id": "ilwd:char",
"time_slide_id": "ilwd:char",
"veto_def_name": "lstring",
"datatype": "lstring",
"sim_proc_id": "ilwd:char",
"duration": "int_4s",
"nevents": "int_4u"
}
constraints = "PRIMARY KEY (experiment_summ_id)"
how_to_index = {
"es_ei_index": ("experiment_id",),
"es_dt_index": ("datatype",)
}
self.instruments = ifos_from_instrument_set(instruments)
CoincTable.RowType = Coinc
#
# =============================================================================
#
# coinc_event_map:table
#
# =============================================================================
#
class CoincMapTable(table.Table):
tableName = "coinc_event_map:table"
validcolumns = {
"coinc_event_id": "ilwd:char",
"table_name": "char_v",
"event_id": "ilwd:char"
}
interncolumns = ("table_name",)
how_to_index = {
"cem_tn_ei_index": ("table_name", "event_id"),
"cem_cei_index": ("coinc_event_id",)
}
class CoincMap(object):
__slots__ = CoincMapTable.validcolumns.keys()