diff --git a/bin/pycbc_make_skymap b/bin/pycbc_make_skymap index ad62ce6fb71..60c25fcbc0c 100755 --- a/bin/pycbc_make_skymap +++ b/bin/pycbc_make_skymap @@ -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) @@ -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)) @@ -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: