Skip to content

Commit 3940f90

Browse files
Added eccentricity to TaylorF2
1 parent c61b8dc commit 3940f90

File tree

3 files changed

+60
-20
lines changed

3 files changed

+60
-20
lines changed

README.md

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,12 @@ To install the package without cloning the git repository simply run
8080
pip install git+https://github.com/CosmoStatGW/WF4Py
8181
```
8282
## Available models
83-
* (v1) <span style="color:green">```TaylorF2_RestrictedPN```</span> (1., 2., 3., 4.)
84-
* (v1) <span style="color:green">```IMRPhenomD```</span> (5., 6.)
85-
* (v1) <span style="color:green">```IMRPhenomD_NRTidalv2```</span> (5., 6., 7.)
86-
* (v1) <span style="color:green">```IMRPhenomHM```</span> (8., 9.)
87-
* (v1) <span style="color:green">```IMRPhenomNSBH```</span> (7., 10.)
88-
* (v1) <span style="color:green">```IMRPhenomXAS```</span> (11.)
83+
* (v1) <span style="color:green">```TaylorF2_RestrictedPN```</span> (1., 2., 3., 4., 5.)
84+
* (v1) <span style="color:green">```IMRPhenomD```</span> (6., 7.)
85+
* (v1) <span style="color:green">```IMRPhenomD_NRTidalv2```</span> (6., 7., 8.)
86+
* (v1) <span style="color:green">```IMRPhenomHM```</span> (9., 10.)
87+
* (v1) <span style="color:green">```IMRPhenomNSBH```</span> (8., 11.)
88+
* (v1) <span style="color:green">```IMRPhenomXAS```</span> (12.)
8989

9090
## Testing
9191
The adherence of all the models with their implementation in [LALSuite](<https://git.ligo.org/lscsoft/lalsuite>) is accuratly tested. As an example, we here report the comparison in the implementations of ```IMRPhenomXAS```
@@ -97,10 +97,11 @@ The adherence of all the models with their implementation in [LALSuite](<https:/
9797
2. P. Ajith (2011) [arXiv:1107.1267](<https://arxiv.org/abs/1107.1267>)
9898
3. C. K. Mishra et al. (2016) [arXiv:1601.05588](<https://arxiv.org/abs/1601.05588>)
9999
4. L. Wade et al. (2014) [arXiv:1402.5156](<https://arxiv.org/abs/1402.5156>)
100-
5. S. Husa et al. (2015) [arXiv:1508.07250](<https://arxiv.org/abs/1508.07250>)
101-
6. S. Khan et al. (2015) [arXiv:1508.07253](<https://arxiv.org/abs/1508.07253>)
102-
7. T. Dietrich et al. (2019) [arXiv:1905.06011](<https://arxiv.org/abs/1905.06011>)
103-
8. L. London et al. (2018) [arXiv:1708.00404](<https://arxiv.org/abs/1708.00404>)
104-
9. C. Kalaghatgi et al. (2019) [arXiv:1909.10010](<https://arxiv.org/abs/1909.10010>)
105-
10. F. Pannarale et al. (2015) [arXiv:1509.00512](<https://arxiv.org/abs/1509.00512>)
106-
11. G. Pratten et al. (2020) [arXiv:2001.11412](https://arxiv.org/abs/2001.11412)
100+
5. B. Moore et al. (2016) [arXiv:1605.00304](<https://arxiv.org/abs/1605.00304>)
101+
6. S. Husa et al. (2015) [arXiv:1508.07250](<https://arxiv.org/abs/1508.07250>)
102+
7. S. Khan et al. (2015) [arXiv:1508.07253](<https://arxiv.org/abs/1508.07253>)
103+
8. T. Dietrich et al. (2019) [arXiv:1905.06011](<https://arxiv.org/abs/1905.06011>)
104+
9. L. London et al. (2018) [arXiv:1708.00404](<https://arxiv.org/abs/1708.00404>)
105+
10. C. Kalaghatgi et al. (2019) [arXiv:1909.10010](<https://arxiv.org/abs/1909.10010>)
106+
11. F. Pannarale et al. (2015) [arXiv:1509.00512](<https://arxiv.org/abs/1509.00512>)
107+
12. G. Pratten et al. (2020) [arXiv:2001.11412](https://arxiv.org/abs/2001.11412)

WF4Py/waveform_models/TaylorF2_RestrictedPN.py

Lines changed: 42 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class TaylorF2_RestrictedPN(WaveFormModel):
2121
'''
2222

2323
# This waveform model is restricted PN (the amplitude stays as in Newtonian approximation) up to 3.5 PN
24-
def __init__(self, fHigh=None, is_tidal=False, use_3p5PN_SpinHO=False, phiref_vlso=False, **kwargs):
24+
def __init__(self, fHigh=None, is_tidal=False, use_3p5PN_SpinHO=False, phiref_vlso=False, is_eccentric=False, fRef_ecc=None, **kwargs):
2525

2626
# Setting use_3p5PN_SpinHO=True SS and SSS contributions at 3.5PN are added (not present in LAL)
2727
# Setting is_tidal=True tidal contributions to the waveform at 10 and 12 PN are added
@@ -35,7 +35,8 @@ def __init__(self, fHigh=None, is_tidal=False, use_3p5PN_SpinHO=False, phiref_vl
3535
objectT = 'BBH'
3636
self.use_3p5PN_SpinHO = use_3p5PN_SpinHO
3737
self.phiref_vlso = phiref_vlso
38-
super().__init__(objectT, fHigh, is_tidal=is_tidal, **kwargs)
38+
self.fRef_ecc=fRef_ecc
39+
super().__init__(objectT, fHigh, is_tidal=is_tidal, is_eccentric=is_eccentric, **kwargs)
3940

4041
def Phi(self, f, **kwargs):
4142
# From A. Buonanno, B. Iyer, E. Ochsner, Y. Pan, B.S. Sathyaprakash - arXiv:0907.0700 - eq. (3.18) plus spins as in arXiv:1107.1267 eq. (5.3) up to 2.5PN and PhysRevD.93.084054 eq. (6) for 3PN and 3.5PN
@@ -79,17 +80,53 @@ def Phi(self, f, **kwargs):
7980
else:
8081
TF2coeffs['seven'] = 77096675.*np.pi/254016. + 378515.*np.pi*eta/1512.- 74045.*np.pi*eta2/756. + (-25150083775./3048192. + 10566655595.*eta/762048. - 1042165.*eta2/3024. + 5345.*eta2*eta/36.)*chi_s + Seta*((-25150083775./3048192. + 26804935.*eta/6048. - 1985.*eta2/48.)*chi_a)
8182

83+
if self.is_eccentric:
84+
# These are the eccentricity dependent coefficients up to 3 PN order, in the low-eccentricity limit, from arXiv:1605.00304
85+
ecc = kwargs['ecc']
86+
if self.fRef_ecc is None:
87+
v0ecc = np.amin(v, axis=0)
88+
else:
89+
v0ecc = (np.pi*Mtot_sec*self.fRef_ecc)**(1./3.)
90+
91+
TF2EccCoeffs = {}
92+
93+
TF2EccOverallAmpl = -2.355/1.462*ecc*ecc*((v0ecc/v)**(19./3.))
94+
95+
TF2EccCoeffs['zero'] = 1.
96+
TF2EccCoeffs['one'] = 0.
97+
TF2EccCoeffs['twoV'] = 29.9076223/8.1976608 + 18.766963/2.927736*eta
98+
TF2EccCoeffs['twoV0'] = 2.833/1.008 - 19.7/3.6*eta
99+
TF2EccCoeffs['threeV'] = -28.19123/2.82600*np.pi
100+
TF2EccCoeffs['threeV0'] = 37.7/7.2*np.pi
101+
TF2EccCoeffs['fourV4'] = 16.237683263/3.330429696 + 241.33060753/9.71375328*eta+156.2608261/6.9383952*eta2
102+
TF2EccCoeffs['fourV2V02'] = 84.7282939759/8.2632420864-7.18901219/3.68894736*eta-36.97091711/1.05398496*eta2
103+
TF2EccCoeffs['fourV04'] = -1.193251/3.048192 - 66.317/9.072*eta +18.155/1.296*eta2
104+
TF2EccCoeffs['fiveV5'] = -28.31492681/1.18395270*np.pi - 115.52066831/2.70617760*np.pi*eta
105+
TF2EccCoeffs['fiveV3V02'] = -79.86575459/2.84860800*np.pi + 55.5367231/1.0173600*np.pi*eta
106+
TF2EccCoeffs['fiveV2V03'] = 112.751736071/5.902315776*np.pi + 70.75145051/2.10796992*np.pi*eta
107+
TF2EccCoeffs['fiveV05'] = 76.4881/9.0720*np.pi - 94.9457/2.2680*np.pi*eta
108+
TF2EccCoeffs['sixV6'] = -436.03153867072577087/1.32658535116800000 + 53.6803271/1.9782000*np.euler_gamma + 157.22503703/3.25555200*np.pi*np.pi +(2991.72861614477/6.89135247360 - 15.075413/1.446912*np.pi*np.pi)*eta +345.5209264991/4.1019955200*eta2 + 506.12671711/8.78999040*eta2*eta + 384.3505163/5.9346000*np.log(2.) - 112.1397129/1.7584000*np.log(3.)
109+
TF2EccCoeffs['sixV4V02'] = 46.001356684079/3.357073133568 + 253.471410141755/5.874877983744*eta - 169.3852244423/2.3313007872*eta2 - 307.833827417/2.497822272*eta2*eta
110+
TF2EccCoeffs['sixV3V03'] = -106.2809371/2.0347200*np.pi*np.pi
111+
TF2EccCoeffs['sixV2V04'] = -3.56873002170973/2.49880440692736 - 260.399751935005/8.924301453312*eta + 15.0484695827/3.5413894656*eta2 + 340.714213265/3.794345856*eta2*eta
112+
TF2EccCoeffs['sixV06'] = 265.31900578691/1.68991764480 - 33.17/1.26*np.euler_gamma + 12.2833/1.0368*np.pi*np.pi + (91.55185261/5.48674560 - 3.977/1.152*np.pi*np.pi)*eta - 5.732473/1.306368*eta2 - 30.90307/1.39968*eta2*eta + 87.419/1.890*np.log(2.) - 260.01/5.60*np.log(3.)
113+
114+
phi_Ecc = TF2EccOverallAmpl*(TF2EccCoeffs['zero'] + TF2EccCoeffs['one']*v + (TF2EccCoeffs['twoV']*v*v + TF2EccCoeffs['twoV0']*v0ecc*v0ecc) + (TF2EccCoeffs['threeV']*v*v*v + TF2EccCoeffs['threeV0']*v0ecc*v0ecc*v0ecc) + (TF2EccCoeffs['fourV4']*v*v*v*v + TF2EccCoeffs['fourV2V02']*v*v*v0ecc*v0ecc + TF2EccCoeffs['fourV04']*v0ecc*v0ecc*v0ecc*v0ecc) + (TF2EccCoeffs['fiveV5']*v*v*v*v*v + TF2EccCoeffs['fiveV3V02']*v*v*v*v0ecc*v0ecc + TF2EccCoeffs['fiveV2V03']*v*v*v0ecc*v0ecc*v0ecc + TF2EccCoeffs['fiveV05']*v0ecc*v0ecc*v0ecc*v0ecc*v0ecc) + ((TF2EccCoeffs['sixV6'] + 53.6803271/3.9564000*np.log(16.*v*v))*(v**6) + TF2EccCoeffs['sixV4V02']*v*v*v*v*v0ecc*v0ecc + TF2EccCoeffs['sixV3V03']*v*v*v*v0ecc*v0ecc*v0ecc + TF2EccCoeffs['sixV2V04']*v*v*v0ecc*v0ecc*v0ecc*v0ecc + (TF2EccCoeffs['sixV06'] - 33.17/2.52*np.log(16.*v0ecc*v0ecc))*(v0ecc**6)))
115+
116+
else:
117+
phi_Ecc = 0.
118+
82119
if self.is_tidal:
83120
# Add tidal contribution if needed, as in PhysRevD.89.103012
84121
Lambda1, Lambda2 = kwargs['Lambda1'], kwargs['Lambda2']
85122
Lam_t, delLam = utils.Lamt_delLam_from_Lam12(Lambda1, Lambda2, eta)
86123

87124
phi_Tidal = (-0.5*39.*Lam_t)*(v**10.) + (-3115./64.*Lam_t + 6595./364.*Seta*delLam)*(v**12.)
88125

89-
phase = TF2OverallAmpl*(TF2coeffs['zero'] + TF2coeffs['one']*v + TF2coeffs['two']*v*v + TF2coeffs['three']*v**3 + TF2coeffs['four']*v**4 + (TF2coeffs['five'] + TF2coeffs['five_log']*np.log(v))*v**5 + (TF2coeffs['six'] + TF2coeffs['six_log']*np.log(v))*v**6 + TF2coeffs['seven']*v**7 + phi_Tidal)/(v**5.)
90-
91126
else:
92-
phase = TF2OverallAmpl*(TF2coeffs['zero'] + TF2coeffs['one']*v + TF2coeffs['two']*v*v + TF2coeffs['three']*v**3 + TF2coeffs['four']*v**4 + (TF2coeffs['five'] + TF2coeffs['five_log']*np.log(v))*v**5 + (TF2coeffs['six'] + TF2coeffs['six_log']*np.log(v))*v**6 + TF2coeffs['seven']*v**7)/(v**5.)
127+
phi_Tidal = 0.
128+
129+
phase = TF2OverallAmpl*(TF2coeffs['zero'] + TF2coeffs['one']*v + TF2coeffs['two']*v*v + TF2coeffs['three']*v**3 + TF2coeffs['four']*v**4 + (TF2coeffs['five'] + TF2coeffs['five_log']*np.log(v))*v**5 + (TF2coeffs['six'] + TF2coeffs['six_log']*np.log(v))*v**6 + TF2coeffs['seven']*v**7 + phi_Tidal + phi_Ecc)/(v**5.)
93130

94131
return phase + phiR - np.pi*0.25
95132

WF4Py/waveform_models/WFclass_definition.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,15 @@ class WaveFormModel(ABC):
2323
Abstract class to compute waveforms.
2424
'''
2525

26-
def __init__(self, objType, fcutPar, is_tidal=False, is_HigherModes=False):
26+
def __init__(self, objType, fcutPar, is_tidal=False, is_HigherModes=False, is_Precessing=False, is_eccentric=False):
2727
# The kind of system the wf model is made for, can be 'BBH', 'BNS' or 'NSBH'
2828
self.objType = objType
2929
# The cut frequency factor of the waveform, in Hz, to be divided by Mtot (in units of Msun). The method fcut can be redefined, as e.g. in the IMRPhenomD implementation, and fcutPar can be passed as an adimensional frequency (Mf)
3030
self.fcutPar = fcutPar
31-
self.is_tidal=is_tidal
31+
self.is_tidal = is_tidal
3232
self.is_HigherModes = is_HigherModes
33+
self.is_Precessing = is_Precessing
34+
self.is_eccentric = is_eccentric
3335

3436
@abstractmethod
3537
def Phi(self, f, **kwargs):

0 commit comments

Comments
 (0)