From fa1e2689db79676b5e742d63cbe1a0a53b142de2 Mon Sep 17 00:00:00 2001 From: "chad.hanna" <crh184@psu.edu> Date: Tue, 13 Nov 2018 10:49:14 -0800 Subject: [PATCH] inspiral.py: allow a shortcut if gracedb far threshold less than or equal to zero --- gstlal-inspiral/python/inspiral.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gstlal-inspiral/python/inspiral.py b/gstlal-inspiral/python/inspiral.py index 201f097c9e..6c95d34a14 100644 --- a/gstlal-inspiral/python/inspiral.py +++ b/gstlal-inspiral/python/inspiral.py @@ -500,7 +500,11 @@ class GracedBWrapper(object): gracedb_ids = [] # no-op short circuit - if self.far_threshold is None or not last_coincs: + # NOTE the value is tested for less than or equeal to zero so + # that people can disable it through the web interface by + # setting e.g., -1. None is also less than zero so this works + # out. + if self.far_threshold <= 0 or not last_coincs: return gracedb_ids coinc_inspiral_index = last_coincs.coinc_inspiral_index -- GitLab