diff --git a/bin/pygrb/pycbc_pygrb_efficiency b/bin/pygrb/pycbc_pygrb_efficiency index e889f537ebb..174b63d1fc9 100644 --- a/bin/pygrb/pycbc_pygrb_efficiency +++ b/bin/pygrb/pycbc_pygrb_efficiency @@ -573,7 +573,7 @@ if opts.background_output_file: ax.legend() ax.grid() ax.set_ylim([0, 1]) - ax.set_xlim(0, 2.*upper_dist - lower_dist) + ax.set_xlim(0, 1.3*upper_dist) ax.set_ylabel("Fraction of injections found louder than loudest background") ax.set_xlabel("Distance (Mpc)") plot_title = "Detection efficiency - "+inj_set_name @@ -655,13 +655,13 @@ if opts.onsource_output_file: ax.get_legend().get_frame().set_alpha(0.5) ax.grid() ax.set_ylim([0, 1]) - ax.set_xlim(0, 2.*upper_dist - lower_dist) + ax.set_xlim(0, 1.3*upper_dist) ax.set_ylabel("Fraction of injections found louder than " + "loudest foreground") ax.set_xlabel("Distance (Mpc)") ax.plot([excl_dist], [0.9], 'gx') ax.set_ylim([0, 1]) - ax.set_xlim(0, 2.*upper_dist - lower_dist) + ax.set_xlim(0, 1.3*upper_dist) plot_title = "Exclusion distance - "+inj_set_name plot_caption = "Injection recovery efficiency using " plot_caption += "BestNR as detection statistic. " diff --git a/bin/pygrb/pycbc_pygrb_results_workflow b/bin/pygrb/pycbc_pygrb_results_workflow index eed24aff93f..a29b4392e61 100644 --- a/bin/pygrb/pycbc_pygrb_results_workflow +++ b/bin/pygrb/pycbc_pygrb_results_workflow @@ -206,8 +206,15 @@ logging.info("Offtrials: %s", [f.storage_path for f in offtrial_files]) bank_file = os.path.join(start_rundir, args.bank_file) bank_file = _workflow.resolve_url_to_file(bank_file) -# File instances of the input injection files +# Sanity check and File instances of the input injection files inj_sets = wflow.cp.get_subsections('injections') +eff_secs = wflow.cp.get_subsections('pygrb_efficiency') +if not set(inj_sets).issubset(eff_secs): + err_msg = "Each [injections] subsection requires at " + err_msg += "least one dedicated [pygrb_efficiency] subsection. " + err_msg += "[injections] subsections found: %s. " + err_msg += "[pygrb_efficiency] subsections found: %s. " + logging.error(err_msg, inj_sets, eff_secs) inj_sets = [i.upper() for i in inj_sets] inj_files = labels_in_files_metadata(inj_sets, start_rundir, args.inj_files) @@ -532,6 +539,7 @@ for stat in stats: out_dir, trig_file=offsource_file, inj_file=inj_file, + seg_files=seg_files, tags=[stat], ) plotting_nodes.append(plot_node)