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 def genIMRPhenomParity(**kwds):
#import numpy as np from pycbc.waveform import get_fd_waveform
#import pycbc.conversions import lal
import lal
import pycbc.waveform
def IMRPhenomParity(parity_Amu, **kwds):
if 'approximant' in kwds: if 'approximant' in kwds:
kwds.pop("approximant") kwds.pop("approximant")
hp, hc = get_fd_waveform(approximant="IMRPhenomXPHM", **kwds) 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 hp_parity = hp + hc * temp * hp.sample_frequencies **2
hc_parity = hc - hp * temp * hp.sample_frequencies **2 hc_parity = hc - hp * temp * hp.sample_frequencies **2
...@@ -18,4 +14,9 @@ def IMRPhenomParity(parity_Amu, **kwds): ...@@ -18,4 +14,9 @@ def IMRPhenomParity(parity_Amu, **kwds):
return hp_parity, hc_parity 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