Maintenance will be performed on,,, and on Tuesday 7th July 2020 starting at approximately 10am PDT and lasting for around 15 minutes. There will be a short period of downtime towards the end of the maintenance window. Please direct any comments, questions, or concerns to

Commit f29a2613 authored by Kipp Cannon's avatar Kipp Cannon Committed by Patrick Godwin

lloidhandler: reduce size of ranking stat to gracedb

- temporarily clip the horizon distance history to just the last week when
  uploading to gracedb.  this will be reverted when a more efficient
  encoding scheme can be found
parent 84e9a42e
......@@ -1259,7 +1259,7 @@ class Handler(simplehandler.Handler):
return outstr
def __get_rankingstat_xmldoc(self):
def __get_rankingstat_xmldoc(self, clipped = False):
# generate a ranking statistic output document. NOTE: if
# we are in possession of ranking statistic PDFs then those
# are included in the output. this allows a single
......@@ -1273,11 +1273,34 @@ class Handler(simplehandler.Handler):
xmldoc = ligolw.Document()
process = ligolw_process.register_to_xmldoc(xmldoc, u"gstlal_inspiral", paramdict = {}, ifos = self.rankingstat.instruments)
far.gen_likelihood_control_doc(xmldoc, self.rankingstat, self.rankingstatpdf)
# FIXME: don't do this. find a way to reduce the storage
# requirements of the horizon distance history and then go
# back to uploading the full file to gracedb
if clipped:
rankingstat = self.rankingstat.copy()
endtime = rankingstat.numerator.horizon_history.maxkey()
except ValueError:
# empty horizon history
# keep the last week of history
endtime -= 86400. * 7
for history in rankingstat.numerator.horizon_history.values():
del history[:endtime]
rankingstat = self.rankingstat
far.gen_likelihood_control_doc(xmldoc, rankingstat, self.rankingstatpdf)
return xmldoc
def __get_rankingstat_xmldoc_for_gracedb(self):
# FIXME: remove this wrapper when the horizon history
# encoding is replaced with something that uses less space
return self.__get_rankingstat_xmldoc(clipped = True)
def web_get_rankingstat(self):
with self.lock:
output = StringIO.StringIO()
......@@ -1337,7 +1360,7 @@ class Handler(simplehandler.Handler):
assert self.fapfar is not None
# do alerts
self.gracedbwrapper.do_alerts(last_coincs, self.psds, self.__get_rankingstat_xmldoc, self.segmentstracker.seglistdicts)
self.gracedbwrapper.do_alerts(last_coincs, self.psds, self.__get_rankingstat_xmldoc_for_gracedb, self.segmentstracker.seglistdicts)
def web_get_sngls_snr_threshold(self):
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment