Skip to content
Snippets Groups Projects
Commit 8cf05a60 authored by Patrick Godwin's avatar Patrick Godwin
Browse files

gstlal_inspiral_mass_model: ensure num_bins is an int

parent da31cd06
No related branches found
No related tags found
No related merge requests found
Pipeline #156874 passed
......@@ -61,7 +61,7 @@ if options.model in ("uniform-template"):
mchirps_of_tmps = chirpmass(sngl_inspiral_table.getColumnByName("mass1").asarray(), sngl_inspiral_table.getColumnByName("mass2").asarray())
num_templates = len(mchirps_of_tmps)
num_bins = max(10, num_templates / 10000)
num_bins = max(10, num_templates // 10000)
massBA = rate.BinnedDensity(rate.NDBins((rate.LogarithmicBins(min(mchirps_of_tmps)-5e-6, max(mchirps_of_tmps)+5e-6, num_bins),)))
for m in mchirps_of_tmps:
massBA.count[(m,)] += 1
......
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