def gen(**kwds): from pycbc.waveform import get_fd_waveform import lal if 'approximant' in kwds: kwds.pop("approximant") hp, hc = get_fd_waveform(approximant="IMRPhenomTPHM", **kwds) temp = kwds['parity_amu'] / 1e9 / lal.QE_SI * lal.H_SI * lal.PI * lal.PI / lal.H0_SI hp_parity = hp + hc * temp * hp.sample_frequencies **2 hc_parity = hc - hp * temp * hp.sample_frequencies **2 return hp_parity, hc_parity def add_me(**kwds): kwds['cpu_fd']['IMRPhenomTPHMParity'] = gen # kwds['filter_time_lengths']['IMRPhenomPv2Parity'] = kwds['filter_time_lengths']['IMRPhenomPv2']