Commit cc9ca581 authored by Chad Hanna's avatar Chad Hanna

gstlal_inspiral_mass_model: work with cdf not pdf

parent 4ee8d725
Pipeline #182231 failed with stages
in 28 minutes and 27 seconds
......@@ -68,7 +68,7 @@ for m in mchirps_of_tmps:
massBA.count[(m,)] += 1
# Does weird stuff at edges :(
#TEMPDENS = rate.InterpBinnedArray(massBA)
TEMPDENS = lambda x: massBA[x,]
TEMPDENS = lambda x: massBA.count[x,]
# Assign the proper mass probabilities
prob = {}
......@@ -122,7 +122,7 @@ for row in sngl_inspiral_table:
prob[row.template_id] /= TEMPDENS(mchirp)
elif options.model == "logmc":
prob[row.template_id] = numpy.log(mchirp)
prob[row.template_id] = 1 / row.mass1 + 1. / row.mass2
# Divide out the template density
prob[row.template_id] /= TEMPDENS(mchirp)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment