Maintenance will be performed on,,, and on the morning of Tuesday 11th August 2020, starting at approximately 9am PDT. It is expected to take around 20 minutes and there will be a short period of downtime (less than five minutes) towards the end of the maintenance window. Please direct any comments, questions, or concerns to

Commit 7a0966f1 authored by Vivien Raymond's avatar Vivien Raymond

Merge branch 'choose_best_roq_bin' into 'master' pick the best roq bin when multiple bins are available

See merge request !854
parents f390ae99 855e91ca
Pipeline #69186 passed with stages
in 75 minutes and 58 seconds
......@@ -344,13 +344,24 @@ def setup_roq(cp):
for mc_prior in mc_priors:
mc_priors[mc_prior] = array(mc_priors[mc_prior])
# find mass bin containing the trigger
trigger_bin = None
for roq in roq_paths:
if mc_priors[roq][0]*roq_mass_freq_scale_factor <= trigger_mchirp <= mc_priors[roq][1]*roq_mass_freq_scale_factor:
trigger_bin = roq
print('Prior in Mchirp will be ['+str(mc_priors[roq][0]*roq_mass_freq_scale_factor)+','+str(mc_priors[roq][1]*roq_mass_freq_scale_factor)+'] to contain the trigger Mchirp '+str(trigger_mchirp))
roq_paths = [trigger_bin]
candidate_roq_paths = \
[roq for roq in roq_paths
if mc_priors[roq][0]*roq_mass_freq_scale_factor
<= trigger_mchirp <= mc_priors[roq][1]*roq_mass_freq_scale_factor]
if candidate_roq_paths:
margins = np.array(
for roq in candidate_roq_paths])
best_path = candidate_roq_paths[np.argmax(margins)]
roq_paths = [best_path]
print('Prior in Mchirp will be [{}, {}] to contain the trigger Mchirp {}.'.format(
print("No roq mass bins containing the trigger")
for mc_prior in mc_priors:
mc_priors[mc_prior] = array(mc_priors[mc_prior])*roq_mass_freq_scale_factor
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