Skip to content
Snippets Groups Projects
Commit b04c6509 authored by Rebecca Ewing's avatar Rebecca Ewing
Browse files

gstlal_inspiral: pass f-final into eye candy as a kafka tag

parent 146546c2
No related branches found
No related tags found
1 merge request!287gstlal_inspiral: pass f-final into eye candy as a kafka tag
Pipeline #461997 passed
......@@ -754,6 +754,8 @@ for output_file_number, (svd_bank_url_dict, output_url, ranking_stat_output_url,
output.close()
return outstr
template_ids = frozenset(row.template_id for row in sngl_inspiral_table)
# take max in case not all templates have the same f_final
f_final = max(sngl_inspiral_table.getColumnByName("f_final"))
# switch between normal and time reverse background collector
background_collector_type = "time_reverse" if use_time_reverse else "normal"
assert len(template_ids) == len(sngl_inspiral_table), "template IDs are not unique within the template bank"
......@@ -1016,6 +1018,7 @@ for output_file_number, (svd_bank_url_dict, output_url, ranking_stat_output_url,
track_latency = stream.source.is_live,
template_id_time_map = options.upload_time_before_merger,
background_collector_type = background_collector_type,
f_final = f_final,
verbose = options.verbose
)
......
......@@ -358,6 +358,7 @@ for n, svd in enumerate(svd_groups, start=svd_bin_start):
"median_dur": numpy.median(svd_durs),
"min_dur": numpy.min(svd_durs),
"max_dur": numpy.max(svd_durs),
"f_final": options.f_final,
}
if options.psd_xml:
bin_metadata["min_bw"] = numpy.min(svd_bw)
......
......@@ -134,14 +134,14 @@ def subdir_from_T050017_filename(fname):
class EyeCandy(object):
def __init__(self, instruments, kafka_server, analysis_tag, job_tag, stream, segmentstracker, latencytracker, node_id=None):
def __init__(self, instruments, kafka_server, analysis_tag, job_tag, stream, segmentstracker, latencytracker, f_final, node_id=None):
self.kafka_server = kafka_server
self.analysis = analysis_tag
if job_tag:
# online jobs have job tag of the form
# {SVDBIN}_inj_{TAG} or {SVDBIN}_noninj
self.tag = [job_tag.split('_')[0], '_'.join(job_tag.split('_')[1:])]
self.tag = [job_tag.split('_')[0], '_'.join(job_tag.split('_')[1:]), str(f_final)]
if 'noninj' in self.tag[1]:
self.topic_prefix = ''
else:
......@@ -765,7 +765,7 @@ class LLOIDTracker:
dumps of segment information, trigger files and background
distribution statistics.
"""
def __init__(self, stream, coincs_document, rankingstat, horizon_distance_func, gracedbwrapper, zerolag_rankingstatpdf_url = None, rankingstatpdf_url = None, ranking_stat_output_url = None, ranking_stat_input_url = None, likelihood_snapshot_interval = None, sngls_snr_threshold = None, analysis_tag = "test", job_tag = "", kafka_server = "10.14.0.112:9092", cluster = False, cap_singles = False, FAR_trialsfactor = 1.0, activation_counts = None, track_latency = False, template_id_time_map = None, background_collector_type = "normal", node_id=None, verbose = False):
def __init__(self, stream, coincs_document, rankingstat, horizon_distance_func, gracedbwrapper, zerolag_rankingstatpdf_url = None, rankingstatpdf_url = None, ranking_stat_output_url = None, ranking_stat_input_url = None, likelihood_snapshot_interval = None, sngls_snr_threshold = None, analysis_tag = "test", job_tag = "", kafka_server = "10.14.0.112:9092", cluster = False, cap_singles = False, FAR_trialsfactor = 1.0, activation_counts = None, track_latency = False, template_id_time_map = None, background_collector_type = "normal", node_id=None, f_final = 1024., verbose = False):
"""!
@param dataclass A Data class instance
@param job_tag The tag to use for naming file snapshots, e.g.
......@@ -815,7 +815,7 @@ class LLOIDTracker:
# set up metric collection
#
self.eye_candy = EyeCandy(rankingstat.instruments, kafka_server, self.analysis, self.tag, stream, self.segmentstracker, self.latencytracker, node_id=node_id)
self.eye_candy = EyeCandy(rankingstat.instruments, kafka_server, self.analysis, self.tag, stream, self.segmentstracker, self.latencytracker, f_final, node_id=node_id)
# FIXME: detangle this
self.eye_candy.lock = self.lock
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment