From c8868acd440770f596147d70a795c1fdb3d4c67e Mon Sep 17 00:00:00 2001
From: Chad Hanna <chad.hanna@ligo.org>
Date: Fri, 23 Nov 2018 17:27:53 -0800
Subject: [PATCH] gstlal_inspiral_mass_model: update ligo mass model. Don't
 normalize by template density

---
 gstlal-inspiral/bin/gstlal_inspiral_mass_model | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/gstlal-inspiral/bin/gstlal_inspiral_mass_model b/gstlal-inspiral/bin/gstlal_inspiral_mass_model
index a792cf22e1..3ddd3f0c9d 100755
--- a/gstlal-inspiral/bin/gstlal_inspiral_mass_model
+++ b/gstlal-inspiral/bin/gstlal_inspiral_mass_model
@@ -106,7 +106,9 @@ for row in sngl_inspiral_table:
 		bns_rate = 916.
 		bbh_rate = 56.
 		other_rate = 20. # made up
-		ids[row.template_id] = (bns_rate * bnsprob + bbh_rate * bbhprob + other_rate * otherprob) / massBA[(mchirp,)] / (bns_rate + bbh_rate + other_rate)
+		# FIXME if the noise is ever normalized over mass then we would need the following, but it isn't
+		#ids[row.template_id] = (bns_rate * bnsprob + bbh_rate * bbhprob + other_rate * otherprob) / massBA[(mchirp,)] / (bns_rate + bbh_rate + other_rate)
+		ids[row.template_id] = (bns_rate * bnsprob + bbh_rate * bbhprob + other_rate * otherprob) / (bns_rate + bbh_rate + other_rate)
 		mchirps.append(mchirp)
 		probs.append(ids[row.template_id])
 	else:
@@ -116,6 +118,7 @@ coefficients = numpy.zeros((1, 1, max(ids)+1), dtype=float)
 for tid in ids:
 	coefficients[0,0,tid] = numpy.log(ids[tid])
 
+#print coefficients.min()
 #import matplotlib
 #matplotlib.use('agg')
 #from matplotlib import pyplot
-- 
GitLab