Skip to content

Check that '{}_time' exists when generating waveforms

Charlie Hoy requested to merge detector_time into master

The purpose of this MR is to prevent the waveform generator from failing when projecting the waveform onto a specific detector when {}_time is not in the posterior table:

ht = samples_dict[f"C01:{approximant}"].maxL_td_waveform(approximant, delta_t, f_low, f_ref=f_low, project="H1")
.
.
.
/cvmfs/oasis.opensciencegrid.org/ligo/sw/conda/envs/igwn-py37/lib/python3.7/site-packages/pesummary/utils/samples_dict.py in td_waveform(self, approximant, delta_t, f_low, f_ref, project, ind, longAscNodes, eccentricity, LAL_parameters)
    726         ht.times = (
    727             Quantity(ht.times, unit="s")
--> 728             + Quantity(_samples["{}_time".format(project)], unit="s")
    729         )
    730         return ht

KeyError: 'H1_time'

cc @philip.relton.

Merge request reports

Loading