Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Tito Dal Canton <[email protected]>
  • Loading branch information
GarethCabournDavies and titodalcanton authored Oct 10, 2023
1 parent cd39987 commit e701152
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions bin/all_sky_search/pycbc_prepare_xml_for_gracedb
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,7 @@ for ts_key in snr_timeseries_time_match:
psds_curr_event = {}
psddict = {}
for ifo in ifos:
try:
psd = psds[ifo]
except KeyError:
parser.error(
"--psd-files {0}: no PSDs found for detector {1}".format(
" ".join(args.psd_files), ifo))
psd = psds[ifo]

try:
psd = psd[psd.find(time)].psd
Expand All @@ -192,7 +187,7 @@ for sngl in sngl_inspiral_table:
sngl.channel = args.channel_name[sngl.ifo]

# Two versions of the PSD dictionary have useful info here
psd = psds_curr_event[ifo]
psd = psds_curr_event[sngl.ifo]
psd_fs = psddict[sngl.ifo]

flow = psd.file.attrs['low_frequency_cutoff']
Expand Down

0 comments on commit e701152

Please sign in to comment.