Skip to content
Snippets Groups Projects
Commit 7a5c52e4 authored by Shio Sakon's avatar Shio Sakon
Browse files

gstlal_inspiral_mass_model: add salpeter_primary

parent d1b410b5
No related branches found
No related tags found
1 merge request!159updated gstlal-inspiral/bin/gstlal_inspiral_mass_model with "salpeter_primary"
Pipeline #358218 passed with warnings
......@@ -47,7 +47,7 @@ parser.add_argument("--template-bank", metavar='name', type=str, help='The input
parser.add_argument("--reference-psd", metavar='filename', help = "Load the spectrum from this LIGO light-weight XML file")
parser.add_argument("--output", metavar='name', type=str, help='The output file name', default = "inspiral_mass_model.h5")
parser.add_argument("--min-instrument", metavar='name', type=int, default=2, help='Minimum instruments operating. Specified for calculating horizon distance in uniform in template model.')
parser.add_argument("--model", metavar='name', type=str, help='Mass model. Options are: ligo, narrow-bns, ligo-bns, bbh, uniform-template, tom. If you want another one, submit a patch.')
parser.add_argument("--model", metavar='name', type=str, help='Mass model. Options are: ligo, narrow-bns, ligo-bns, bbh, uniform-template, salpeter-primary. If you want another one, submit a patch.')
parser.add_argument("--verbose", help='Be verbose', action="store_true")
options = parser.parse_args()
......@@ -84,11 +84,11 @@ bbh_peak = 100
bbh_alpha = -1.5
bbhnorm = schechter_norm(bbh_min, bbh_max, bbh_peak, bbh_alpha)
tom_min = 1
tom_max = 600
tom_peak = 600
tom_alpha = -2.35
tom_norm = schechter_norm(tom_min, tom_max, tom_peak, tom_alpha)
salpeter_primary_min = 1
salpeter_primary_max = 600
salpeter_primary_peak = 600
salpeter_primary_alpha = -2.35
salpeter_primary_norm = schechter_norm(salpeter_primary_min, salpeter_primary_max, salpeter_primary_peak, salpeter_primary_alpha)
for row in sngl_inspiral_table:
assert row.template_id not in prob
......@@ -154,12 +154,12 @@ for row in sngl_inspiral_table:
# Divide out the template density
prob[row.template_id] /= TEMPDENS(mchirp)
elif options.model == "tom":
elif options.model == "salpeter-primary":
#
# For Tom's mass moodel found here: https://wiki.ligo.org/CBC/RatesPop/O4PastroPlan
#
prob[row.template_id] = schechter(row.mass1, tom_peak, tom_alpha) / tom_norm
prob[row.template_id] = schechter(row.mass1, salpeter_primary_peak, salpeter_primary_alpha) / salpeter_primary_norm
# Divide out the template density
prob[row.template_id] /= TEMPDENS(mchirp)
......
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