Skip to content
Snippets Groups Projects
Commit 47e2d241 authored by Prathamesh Joshi's avatar Prathamesh Joshi
Browse files

Prevent adding non-extincted PDFs

parent b0bce3b1
No related branches found
No related tags found
1 merge request!564Online new extinction
Pipeline #582137 passed with warnings
This commit is part of merge request !564. Comments created here will be created in the context of that merge request.
......@@ -253,10 +253,6 @@ def main():
data = pdf.new_with_extinction()
else:
logging.warning(f'Skipping first-round extinction for {pdfs[svd_bin].files[0]}')
if data:
data += pdf
else:
data = pdf
# while looping through registries
# send heartbeat messages
......@@ -264,7 +260,8 @@ def main():
kafka_processor.heartbeat()
# zero out the zerolag after the first round of extinction is finished
data.zero_lag_lr_lnpdf.count.array[:] = 0
if data:
data.zero_lag_lr_lnpdf.count.array[:] = 0
# if we fail to complete more than 1% of the bins,
# this is a serious problem and we should just quit
......@@ -290,7 +287,10 @@ def main():
zerolag_counts_url = url_from_registry("gstlal_ll_inspiral_trigger_counter_registry.txt", zerolag_counts_path)
# add zerolag counts url to marginalized data
data += far.RankingStatPDF.from_xml(ligolw_utils.load_url(zerolag_counts_url, verbose = options.verbose, contenthandler = far.RankingStat.LIGOLWContentHandler), u"gstlal_inspiral_likelihood")
if data:
data += far.RankingStatPDF.from_xml(ligolw_utils.load_url(zerolag_counts_url, verbose = options.verbose, contenthandler = far.RankingStat.LIGOLWContentHandler), u"gstlal_inspiral_likelihood")
else:
data = far.RankingStatPDF.from_xml(ligolw_utils.load_url(zerolag_counts_url, verbose = options.verbose, contenthandler = far.RankingStat.LIGOLWContentHandler), u"gstlal_inspiral_likelihood")
if kafka_processor:
kafka_processor.heartbeat()
......
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