Skip to content
Snippets Groups Projects
Commit fb38b02b authored by Chad Hanna's avatar Chad Hanna
Browse files

gstlal_inspiral_mass_model: choose a minimum number of bins

parent fdea81e0
No related branches found
No related tags found
No related merge requests found
......@@ -55,7 +55,7 @@ sngl_inspiral_table = lsctables.SnglInspiralTable.get_table(xmldoc)
mchirps_of_tmps = chirpmass(sngl_inspiral_table.get_column("mass1"), sngl_inspiral_table.get_column("mass2"))
num_templates = len(mchirps_of_tmps)
num_bins = num_templates / 500
num_bins = max(5, num_templates / 500)
massBA = rate.BinnedDensity(rate.NDBins((rate.LogarithmicBins(min(mchirps_of_tmps)-1e-6, max(mchirps_of_tmps)+1e-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