Skip to content
Snippets Groups Projects
Commit 17932df9 authored by Kipp Cannon's avatar Kipp Cannon
Browse files

streamthinca: don't couple latency to fapfar

- there is no logical connection between the calculation of latencies and the test to see if FAR/FAR is being assigned.  do not tie one to the other
parent 89d934a0
No related branches found
No related tags found
No related merge requests found
......@@ -278,17 +278,17 @@ class StreamThinca(object):
# assign the FAP and FAR if provided with the data to do so
if fapfar is not None:
coinc_event_index = dict((row.coinc_event_id, row) for row in coinc_event_table)
gps_time_now = float(lal.UTCToGPS(time.gmtime()))
for coinc_inspiral_row in coinc_inspiral_table:
ln_likelihood_ratio = coinc_event_index[coinc_inspiral_row.coinc_event_id].likelihood
coinc_inspiral_row.combined_far = fapfar.far_from_rank(ln_likelihood_ratio)
# FIXME: add a proper column to store this in
coinc_inspiral_row.false_alarm_rate = fapfar.fap_from_rank(ln_likelihood_ratio)
# abuse minimum_duration column to store
# the latency. NOTE: this is nonsensical
# unless running live.
coinc_inspiral_row.minimum_duration = gps_time_now - float(coinc_inspiral_row.end)
# abuse minimum_duration column to store the latency.
# NOTE: this is nonsense unless running live.
gps_time_now = float(lal.UTCToGPS(time.gmtime()))
for coinc_inspiral_row in coinc_inspiral_table:
coinc_inspiral_row.minimum_duration = gps_time_now - float(coinc_inspiral_row.end)
# construct a coinc extractor from the XML document while
# the tree still contains our internal table objects
......
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