Skip to content
Snippets Groups Projects
Commit 1fef910d authored by Heather Fong's avatar Heather Fong
Browse files

gstlal_inspiral_mass_model: Add template ID for mapping

parent bd0bae8c
No related branches found
No related tags found
No related merge requests found
......@@ -57,8 +57,10 @@ rate.filter_array(massBA.array, rate.gaussian_window(1.5, 1.5, sigma = 5))
# Assign the proper mass probabilities
ids = {}
tmplt_ids = []
for row in sngl_inspiral_table:
assert row.template_id not in ids
tmplt_ids.append(int(row.template_id))
if options.model == "salpeter":
ids[row.template_id] = numpy.log(row.mass1**-2.35 / massBA[row.mass1, row.mass2])
else:
......@@ -73,4 +75,5 @@ f = h5py.File(options.output, "w")
# put in a dummy interval for the piecewise polynomials in SNR
f.create_dataset("SNR", data = numpy.array([0., 100.]))
f.create_dataset("coefficients", data = coefficients, compression="gzip")
f.create_dataset("event_id", data = numpy.array(tmplt_ids).astype(int))
f.close()
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