Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix logic for determining frame type in pycbc_make_skymap #4937

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions bin/pycbc_make_skymap
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,6 @@ def main(trig_time, mass1, mass2, spin1z, spin2z, f_low, f_upper, sample_rate,
frame_types = {}
if channel_names is None:
channel_names = {}
for ifo in ifos:
if ifo not in frame_types:
frame_types[ifo] = default_frame_type(mean_trig_time, ifo)
if ifo not in channel_names:
if fake_strain[ifo] is not None:
channel_names[ifo] = ifo + ':FAKE_DATA'
else:
channel_names[ifo] = default_channel_name(mean_trig_time, ifo)

# resulting files will be tagged with this string
file_name_tag = '{:.0f}'.format(mean_trig_time)
Expand Down Expand Up @@ -165,6 +157,12 @@ def main(trig_time, mass1, mass2, spin1z, spin2z, f_low, f_upper, sample_rate,
st_psd_paths = {}
st_out_paths = {}
for ifo in ifos:
if ifo not in channel_names:
if fake_strain[ifo] is not None:
channel_names[ifo] = ifo + ':FAKE_DATA'
else:
channel_names[ifo] = default_channel_name(mean_trig_time, ifo)

# compose the command line for the single-template process
st_psd_paths[ifo] = os.path.join(
tmpdir, 'PSD_{}_{}.txt'.format(file_name_tag, ifo))
Expand Down Expand Up @@ -227,6 +225,8 @@ def main(trig_time, mass1, mass2, spin1z, spin2z, f_low, f_upper, sample_rate,
command.append(str(fake_strain_seed[ifo]))
elif custom_frame_files is None or ifo not in custom_frame_files:
# use default guesses for this ifo
if ifo not in frame_types:
frame_types[ifo] = default_frame_type(mean_trig_time, ifo)
command.append("--frame-type")
command.append(frame_types[ifo])
else:
Expand Down
Loading