Skip to content

Commit

Permalink
Comprehension for dictionary generation
Browse files Browse the repository at this point in the history
  • Loading branch information
pannarale committed Nov 21, 2024
1 parent ef7c8e1 commit 380b32f
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions bin/pygrb/pycbc_pygrb_plot_coh_ifosnr
Original file line number Diff line number Diff line change
Expand Up @@ -247,11 +247,9 @@ found_injs, *_ = ppu.apply_vetoes_to_found_injs(
logging.info("Plotting...")

# Order the IFOs by sensitivity
ifo_sensitivity = {}
for ifo in ifos:
sensitivity = \
found_trigs[ifo+'/f_resp_mean'] * found_trigs[ifo+'/sigma_mean']
ifo_sensitivity.update({ifo: sensitivity})
ifo_sensitivity = {
ifo: found_trigs[ifo+'/f_resp_mean'] * found_trigs[ifo+'/sigma_mean'] for ifo in ifos
}
ifo_sensitivity = collections.OrderedDict(
sorted(ifo_sensitivity.items(), key=operator.itemgetter(1), reverse=True)
)
Expand Down

0 comments on commit 380b32f

Please sign in to comment.