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 imrphenomtphm_length_in_time(**kwargs): from pycbc.waveform import waveform """Estimates the duration of IMRPhenom waveforms that include higher modes. """ # Default maximum node number for IMRPhenomHM is 4 # However, the maximum mode number for IMRPhenomTPHM is 5 # The relevant lower order approximant here is IMRPhenomD return waveform.get_hm_length_in_time("IMRPhenomD", 5, **kwargs)