Skip to content
Snippets Groups Projects
Commit 6cf258aa authored by Yifan Wang's avatar Yifan Wang
Browse files

a working waveform module for IMRPhenomParity

parent a999c0cf
Branches
No related tags found
No related merge requests found
import .birefringence_waveform
from pycbc.waveform import get_fd_waveform
#import numpy as np
#import pycbc.conversions
import lal
import pycbc.waveform
def IMRPhenomParity(parity_Amu, **kwds):
def genIMRPhenomParity(**kwds):
from pycbc.waveform import get_fd_waveform
import lal
if 'approximant' in kwds:
kwds.pop("approximant")
hp, hc = get_fd_waveform(approximant="IMRPhenomXPHM", **kwds)
temp = parity_Amu / 1e9 / lal.QE_SI * lal.H_SI * lal.PI * lal.PI / lal.H0_SI
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
......@@ -18,4 +14,9 @@ def IMRPhenomParity(parity_Amu, **kwds):
return hp_parity, hc_parity
pycbc.waveform.add_custom_waveform('IMRPhenomParity', IMRPhenomParity, 'frequency', force=True)
#pycbc.waveform.add_custom_waveform('IMRPhenomParity', IMRPhenomParity, 'frequency', force=True)
def add_me(**kwds):
kwds['cpu_fd']['IMRPhenomParity'] = genIMRPhenomParity
kwds['filter_time_lengths']['IMRPhenomParity'] = kwds['filter_time_lengths']['IMRPhenomXPHM']
from .IMRPhenomParity import *
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment