From 1f47fa4faf647b153402d0fab80b851533dfd86c Mon Sep 17 00:00:00 2001
From: Cody Messick <cody.messick@ligo.org>
Date: Thu, 24 May 2018 21:53:28 -0400
Subject: [PATCH] inspiral.py: Added raningstatpdf.is_healthy logic to gracedb
 alert infrastructure

---
 gstlal-inspiral/python/inspiral.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/gstlal-inspiral/python/inspiral.py b/gstlal-inspiral/python/inspiral.py
index 07cedf5df1..9175c6d9c9 100644
--- a/gstlal-inspiral/python/inspiral.py
+++ b/gstlal-inspiral/python/inspiral.py
@@ -837,7 +837,8 @@ class Data(object):
 
 			# do GraceDB alerts
 			if self.gracedb_far_threshold is not None:
-				self.__do_gracedb_alerts()
+				if self.rankingstatpdf is not None and self.rankingstatpdf.is_healthy():
+					self.__do_gracedb_alerts()
 				self.__update_eye_candy()
 
 			# after doing alerts, no longer need per-trigger
@@ -964,7 +965,7 @@ class Data(object):
 					self.zerolag_rankingstatpdf.zero_lag_lr_lnpdf.count[coinc_event.likelihood,] += 1
 
 		# do GraceDB alerts
-		if self.gracedb_far_threshold is not None:
+		if self.gracedb_far_threshold is not None and self.rankingstatpdf is not None and self.rankingstatpdf.is_healthy():
 			self.__do_gracedb_alerts()
 
 		# after doing alerts, no longer need per-trigger SNR data
-- 
GitLab