class SelectedFoundTable(table.Table): tableName = "selected_found_injections:table" validcolumns = {} for col_name in column_names: if 'rank_in_' in col_name: validcolumns[col_name] = "int_4u" elif '_duration_' in col_name: validcolumns[col_name] = "real_8" elif 'instruments_on' == col_name: validcolumns[col_name] = lsctables.ExperimentTable.validcolumns['instruments'] elif col_name == 'injected_start_time' or col_name == 'injected_start_time_ns': validcolumns[col_name] = "int_4s" elif col_name == 'injected_gps_time' or col_name == 'injected_gps_time_ns': validcolumns[col_name] = "int_4s" elif col_name == 'injected_decisive_distance': validcolumns[col_name] = "real_8" elif 'injected_' in col_name or col_name == 'simulation_id': validcolumns[col_name] = sqlutils.get_col_type(simulation_table, re.sub('injected_', '', col_name)) elif 'recovered_' in col_name or col_name == 'coinc_event_id': validcolumns[col_name] = sqlutils.get_col_type(recovery_table, re.sub('recovered_', '', col_name)) # if custom columns exist in the database, just set them to lstrings else: validcolumns[col_name] = "lstring" # add FAP columns validcolumns['recovered_fap'] = "real_8" validcolumns['recovered_fap_1yr'] = "real_8"
class MergedTable(table.Table): tableName = summary_table.tableName validcolumns = copy.deepcopy(summary_table.validcolumns) for sngl_col in sngl_table_cols: validcolumns['sngl_'+sngl_col] = sqlutils.get_col_type(sngl_table, sngl_col) validcolumns['sngl_event_time_utc__Px_click_for_daily_ihope_xP_'] = 'lstring' validcolumns['sngl_ifo__Px_click_for_elog_xP_'] = 'lstring'
class CloseMissedTable(table.Table): tableName = "close_missed_injections:table" validcolumns = {} for col_name in column_names: if 'rank' in col_name: validcolumns[col_name] = "int_4u" elif 'instruments_on' == col_name: validcolumns[col_name] = lsctables.ExperimentTable.validcolumns['instruments'] elif 'veto_def_name' == col_name: validcolumns[col_name] = lsctables.ExperimentSummaryTable.validcolumns['veto_def_name'] elif 'decisive_distance' == col_name: validcolumns[col_name] = sqlutils.get_col_type(simulation_table, 'eff_dist_h') elif 'gps_time' == col_name or 'gps_time_ns' == col_name: validcolumns[col_name] = "int_4s" elif 'sim_tag' == col_name: validcolumns[col_name] = "lstring" else: validcolumns[col_name] = sqlutils.get_col_type(simulation_table, col_name, default = 'lstring')
class tmpRecTable(table.Table): tableName = "tmp_rec_table:table" validcolumns = dict([ [col, sqlutils.get_col_type(recovery_table, col)] for col in recovery_table_columns ])
class tmpSimTable(table.Table): tableName = "tmp_sim_table:table" validcolumns = dict([ [col, sqlutils.get_col_type(simulation_table, col)] for col in simulation_table_columns ])