NOTE: The expressions in this notebook are not yet validated. I have no reason to believe they are wrong, but I can't make any guarantees. All other notebooks in this directory have been validated, however, and at least agree with all results I know of in the literature.
In [1]:
# Always run this first
# NOTE: Do not define new basic variables in this notebook;
# define them in Variables_Q.ipynb. Use this notebook
# to define new expressions built from those variables.
from __future__ import division # This needs to be here, even though it's in Variables_Q.ipynb
import sys
sys.path.insert(0, '..') # Look for modules in directory above this one
execfile('../Utilities/ExecNotebook.ipy')
try: execnotebook(VariablesNotebook)
except: execnotebook('Variables_Q.ipynb')
The following PNCollection
objects will contain all the terms in the different parts of the waveform modes.
In [2]:
WaveformModes_NoSpin = PNCollection()
WaveformModes_Spin_Symm = PNCollection()
WaveformModes_Spin_Asymm = PNCollection()
In this notebook, every term will be multiplied by the following coefficient.
In [3]:
WaveformModes_NoSpin.AddDerivedVariable('rhOverM_coeff', (2*nu*v**2)*sqrt(16*pi/5), datatype='std::complex<double>')
Note that fractions need to be entered as, e.g., frac(3,4)
so that they are not converted to finite-precision decimals.
The following expressions are taken from Eqs. (9.3) and (9.4) of Blanchet et al. (2008), except the final term in the $(2,2)$ expression, which is taken from Eq. (6.5) of Faye et al. (2012), and the final terms in the $(3,3)$ and $(3,1)$ expressions, which are taken from Eqs. (4.18) of Faye et al. (2014).
In [4]:
# ell=2
WaveformModes_NoSpin.AddDerivedConstant('hHat_2_0_0', -5/(14*sqrt(6)), datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_2_1_1', (I/3)*delta, datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_2_1_3', (I/84)*delta*(-17 + 20*nu), datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_2_1_4', (delta*(1 + (2*I)*pi + log(16)))/6, datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_2_1_5', (I/1512)*delta*(-172 + nu*(-2036 + 237*nu)), datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_2_1_6', (delta*((-34*I)*pi - 17*(1 + log(16)) + 2*nu*(353 + (6*I)*pi + log(4096))))/168, datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_2_2_0', 1, datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_2_2_2', (-107 + 55*nu)/42, datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_2_2_3', 2*pi, datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_2_2_4', (-2173 + nu*(-7483 + 2047*nu))/1512, datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_2_2_5', (-24*I)*nu + ((-107 + 34*nu)*pi)/21, datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_2_2_6', frac(27027409,646800) - (856*EulerGamma)/105 + (nu*(-834555 + nu*(-729396 + 114635*nu)))/99792 + (41*nu*pi**2)/96 + (2*pi*(214*I + 35*pi))/105 - (428*log(16))/105, datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_2_2_lnv_6', -frac(856,105), datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_2_2_7', ((-2*I)*nu*(-501655 + 24396*nu) + 15*(-2173 + 2*nu*(-2459 + 560*nu))*pi)/11340, datatype='std::complex<double>')
# ell=3
WaveformModes_NoSpin.AddDerivedConstant('hHat_3_0_5', ((-2*I)/5)*sqrt(frac(6,7))*nu, datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_3_1_1', ((I/12)*delta)/sqrt(14), datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_3_1_3', ((-I/18)*delta*(4 + nu))/sqrt(14), datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_3_1_4', (delta*(7 + (5*I)*pi + log(1024)))/(60*sqrt(14)), datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_3_1_5', ((-I/2376)*delta*(-607 + nu*(272 + 247*nu)))/sqrt(14), datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_3_1_6', (delta*((-5*I)*(16 + 7*nu)*pi + 2*(-56 + nu - 5*(16 + 7*nu)*log(2))))/(360*sqrt(14)), datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_3_1_lnv_7', (I*delta/(12*sqrt(14))) * (-frac(13,21)*2), datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_3_1_7', (I*delta/(12*sqrt(14))) * (frac(10753397,1513512) - 2*log(2)*(frac(212,105) + log(2)) - frac(26,21) * EulerGamma + (pi**2/6) - 2*I*pi*(frac(41,105) + log(2)) + (nu/8)*(-frac(1738843,19305) + frac(41,8)*pi**2) + frac(327059,30888)*nu**2 - frac(17525,15444)*nu**3), datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_3_2_2', (sqrt(frac(5,7))*(1 - 3*nu))/3, datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_3_2_4', (-193 + 5*(145 - 73*nu)*nu)/(54*sqrt(35)), datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_3_2_5', (-15*I + (66*I)*nu + 10*pi - 30*nu*pi)/(3*sqrt(35)), datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_3_2_6', (-1451 + nu*(-17387 + 3*(33342 - 5341*nu)*nu))/(2376*sqrt(35)), datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_3_3_1', ((-3*I)/4)*sqrt(frac(15,14))*delta, datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_3_3_3', ((-3*I)/2)*sqrt(frac(15,14))*delta*(-2 + nu), datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_3_3_4', (9*sqrt(frac(3,70))*delta*(-7 - (5*I)*pi + 10*log(frac(3,2))))/4, datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_3_3_5', (-I/88)*sqrt(frac(3,70))*delta*(369 + nu*(-3676 + 887*nu)), datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_3_3_6', (delta*((-3645*I)*(-8 + 3*nu)*pi + 2*(20412 - 48103*nu + 3645*(-8 + 3*nu)*log(frac(3,2)))))/(216*sqrt(210)), datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_3_3_lnv_7', ((-3*I)/4)*sqrt(frac(15,14))*delta * (-frac(39,7)*2*log(4)), datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_3_3_7', ((-3*I)/4)*sqrt(frac(15,14))*delta * (frac(19388147,280280) + frac(492,35)*ln(frac(3,2)) - 18*(ln(frac(3,2)))**2 - frac(78,7)*EulerGamma + frac(3,2)*pi**2 + 6*I*pi*(-frac(41,35) + 3*log(frac(3,2)) ) + (nu/8)*(-frac(7055,429) + frac(41,8)*pi**2) - frac(318841,17160)*nu**2 + frac(8237,2860)*nu**3 ), datatype='std::complex<double>')
# ell=4
WaveformModes_NoSpin.AddDerivedConstant('hHat_4_0_0', -1/(504*sqrt(2)), datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_4_1_3', ((I/84)*delta*(1 - 2*nu))/sqrt(10), datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_4_1_5', ((-I/11088)*delta*(404 + nu*(-1011 + 332*nu)))/sqrt(10), datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_4_1_6', (delta*(64 - 1661*nu - (30*I)*(-1 + 2*nu)*pi + 60*(1 - 2*nu)*log(2)))/(2520*sqrt(10)), datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_4_2_2', (sqrt(5)*(1 - 3*nu))/63, datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_4_2_4', (-1311 + 5*(805 - 57*nu)*nu)/(4158*sqrt(5)), datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_4_2_5', (-21*I + nu*(84*I - 30*pi) + 10*pi)/(63*sqrt(5)), datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_4_2_6', (9342351 + 7*nu*(-5460759 + 115*nu*(34822 + 3363*nu)))/(22702680*sqrt(5)), datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_4_3_3', (((9*I)/4)*delta*(-1 + 2*nu))/sqrt(70), datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_4_3_5', (((3*I)/176)*delta*(468 + nu*(-1267 + 524*nu)))/sqrt(70), datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_4_3_6', (delta*(-5184 + 16301*nu + (2430*I)*(-1 + 2*nu)*pi + 4860*(1 - 2*nu)*log(frac(3,2))))/(360*sqrt(70)), datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_4_4_2', (8*sqrt(frac(5,7))*(-1 + 3*nu))/9, datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_4_4_4', (4*(1779 + 5*nu*(-1273 + 525*nu)))/(297*sqrt(35)), datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_4_4_5', (160*(-1 + 3*nu)*pi + I*(336 - 1193*nu + 320*(-1 + 3*nu)*log(2)))/(9*sqrt(35)), datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_4_4_6', (-9618039 + 7*nu*(9793071 + 5*nu*(-3231338 + 678291*nu)))/(405405*sqrt(35)), datatype='std::complex<double>')
# ell=5
WaveformModes_NoSpin.AddDerivedConstant('hHat_5_1_3', ((I/288)*delta*(1 - 2*nu))/sqrt(385), datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_5_1_5', ((-I/11232)*delta*(179 + 4*(-88 + nu)*nu))/sqrt(385), datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_5_1_6', (delta*(181 - (70*I)*(-1 + 2*nu)*pi + 140*log(2) - 28*nu*(313 + log(1024))))/(20160*sqrt(385)), datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_5_2_4', (2*(1 + 5*(-1 + nu)*nu))/(27*sqrt(55)), datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_5_2_6', (-3911 + 7*nu*(3079 + 35*nu*(-118 + 33*nu)))/(12285*sqrt(55)), datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_5_3_3', ((9*I)/32)*sqrt(frac(3,110))*delta*(-1 + 2*nu), datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_5_3_5', ((3*I)/416)*sqrt(frac(3,110))*delta*(207 + 8*nu*(-58 + 11*nu)), datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_5_3_6', (delta*(-395847 + 1171828*nu + (153090*I)*(-1 + 2*nu)*pi - 306180*(-1 + 2*nu)*log(frac(3,2))))/(60480*sqrt(330)), datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_5_4_4', (-32*(1 + 5*(-1 + nu)*nu))/(9*sqrt(165)), datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_5_4_6', (16*(4451 - 7*nu*(3619 + 5*nu*(-1042 + 339*nu))))/(4095*sqrt(165)), datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_5_5_3', (((-625*I)/96)*delta*(-1 + 2*nu))/sqrt(66), datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_5_5_5', (((-625*I)/3744)*delta*(263 + 16*nu*(-43 + 16*nu)))/sqrt(66), datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_5_5_6', (delta*(565625 - 1481676*nu - (218750*I)*(-1 + 2*nu)*pi + 437500*(-1 + 2*nu)*log(frac(5,2))))/(6720*sqrt(66)), datatype='std::complex<double>')
# ell=6
WaveformModes_NoSpin.AddDerivedConstant('hHat_6_1_5', ((I/8316)*delta*(-1 + nu)*(-1 + 3*nu))/sqrt(26), datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_6_2_4', (2*(1 + 5*(-1 + nu)*nu))/(297*sqrt(65)), datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_6_2_6', (-81 + 7*nu*(59 + nu*(-64 + 7*nu)))/(2079*sqrt(65)), datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_6_3_5', (((-81*I)/616)*delta*(-1 + nu)*(-1 + 3*nu))/sqrt(65), datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_6_4_4', (-128*sqrt(frac(2,39))*(1 + 5*(-1 + nu)*nu))/495, datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_6_4_6', (-64*sqrt(frac(2,39))*(-93 + 7*nu*(71 + nu*(-88 + 19*nu))))/3465, datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_6_5_5', (((3125*I)/504)*delta*(-1 + nu)*(-1 + 3*nu))/sqrt(429), datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_6_6_4', (54*(1 + 5*(-1 + nu)*nu))/(5*sqrt(143)), datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_6_6_6', (27*(-113 + 7*nu*(91 + nu*(-128 + 39*nu))))/(35*sqrt(143)), datatype='std::complex<double>')
# ell=7
WaveformModes_NoSpin.AddDerivedConstant('hHat_7_1_5', ((I/864864)*delta*(-1 + nu)*(-1 + 3*nu))/sqrt(2), datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_7_2_6', (1 - 7*(-1 + nu)**2*nu)/(3003*sqrt(3)), datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_7_3_5', ((-243*I)/160160)*sqrt(frac(3,2))*delta*(-1 + nu)*(-1 + 3*nu), datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_7_4_6', (128*sqrt(frac(2,33))*(-1 + 7*(-1 + nu)**2*nu))/1365, datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_7_5_5', (((15625*I)/26208)*delta*(-1 + nu)*(-1 + 3*nu))/sqrt(66), datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_7_6_6', (-81*sqrt(frac(3,143))*(-1 + 7*(-1 + nu)**2*nu))/35, datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_7_7_5', ((-16807*I)/1440)*sqrt(frac(7,858))*delta*(-1 + nu)*(-1 + 3*nu), datatype='std::complex<double>')
# ell=8
WaveformModes_NoSpin.AddDerivedConstant('hHat_8_2_6', (1 - 7*(-1 + nu)**2*nu)/(9009*sqrt(85)), datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_8_4_6', (128*sqrt(frac(2,187))*(-1 + 7*(-1 + nu)**2*nu))/4095, datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_8_6_6', (-243*sqrt(frac(3,17017))*(-1 + 7*(-1 + nu)**2*nu))/35, datatype='std::complex<double>')
WaveformModes_NoSpin.AddDerivedConstant('hHat_8_8_6', (16384*sqrt(frac(2,85085))*(-1 + 7*(-1 + nu)**2*nu))/63, datatype='std::complex<double>')
Note that the Will & Wiseman paper uses the same notation as CQG 13 (1996) 575-584, which demonstrates the same results (to lower order) as arXiv:0802.1249v2 used above. Thus, the conventions are compatible. Additional 2pN terms come from Buonanno, Faye, and Hinderer arXiv:1209.6349v1. The (2,2) mode is the same as the 2pN term appearing in Will & Wiseman.
In [5]:
WaveformModes_Spin_Asymm.AddDerivedVariable('hHat_spin_Asymm_2_2_2',
-(Sigma_lambda + I*Sigma_n)/(2*M**2),
datatype='std::complex<double>')
WaveformModes_Spin_Symm.AddDerivedVariable('hHat_spin_Symm_2_2_3',
-(6*S_ell + 2*Sigma_ell*delta)/(3*M**2),
datatype='std::complex<double>')
WaveformModes_Spin_Symm.AddDerivedVariable('hHat_spin_Symm_2_2_4',
(12*S1_ell*S2_ell + 10*S1_lambda*S2_lambda - 15*I*S1_lambda*S2_n - 15*I*S1_n*S2_lambda - 22*S1_n*S2_n)/(6*M**4*nu),
datatype='std::complex<double>')
WaveformModes_Spin_Asymm.AddDerivedVariable('hHat_spin_Asymm_2_2_4',
(19*S_lambda*delta + 182*I*S_n*delta - 43*Sigma_lambda*nu + 5*Sigma_lambda - 280*I*Sigma_n*nu + 98*I*Sigma_n)/(84*M**2),
datatype='std::complex<double>')
WaveformModes_Spin_Symm.AddDerivedVariable('hHat_spin_Symm_2_1_2',
I*Sigma_ell/(2*M**2),
datatype='std::complex<double>')
WaveformModes_Spin_Asymm.AddDerivedVariable('hHat_spin_Asymm_2_1_3',
(4*I*S_lambda + 25*S_n + 4*I*Sigma_lambda*delta + 13*Sigma_n*delta)/(6*M**2),
datatype='std::complex<double>')
WaveformModes_Spin_Symm.AddDerivedVariable('hHat_spin_Symm_2_1_4',
I*(-86*S_ell*delta + Sigma_ell*(139*nu - 79))/(42*M**2),
datatype='std::complex<double>')
WaveformModes_Spin_Asymm.AddDerivedVariable('hHat_spin_Asymm_2_1_4',
-(3*S1_ell*S2_n + 3*S1_n*S2_ell)/(2*M**4*nu),
datatype='std::complex<double>')
WaveformModes_Spin_Asymm.AddDerivedVariable('hHat_spin_Asymm_2_0_2',
sqrt(6)*I*Sigma_n/(6*M**2),
datatype='std::complex<double>')
WaveformModes_Spin_Symm.AddDerivedVariable('hHat_spin_Symm_2_0_4',
sqrt(6)*(-S1_lambda*S2_lambda + S1_n*S2_n)/(3*M**4*nu),
datatype='std::complex<double>')
WaveformModes_Spin_Asymm.AddDerivedVariable('hHat_spin_Asymm_2_0_4',
sqrt(6)*I*(255*S_n*delta - Sigma_n*(506*nu - 45))/(126*M**2),
datatype='std::complex<double>')
WaveformModes_Spin_Asymm.AddDerivedVariable('hHat_spin_Asymm_3_3_3',
sqrt(210)*I*(S_lambda + I*S_n + delta*(Sigma_lambda + I*Sigma_n))/(21*M**2),
datatype='std::complex<double>')
WaveformModes_Spin_Symm.AddDerivedVariable('hHat_spin_Symm_3_3_4',
3*sqrt(210)*I*(7*S_ell*delta - 3*Sigma_ell*(3*nu - 1))/(112*M**2),
datatype='std::complex<double>')
WaveformModes_Spin_Symm.AddDerivedVariable('hHat_spin_Symm_3_2_3',
2*sqrt(35)*(S_ell + Sigma_ell*delta)/(21*M**2),
datatype='std::complex<double>')
WaveformModes_Spin_Asymm.AddDerivedVariable('hHat_spin_Asymm_3_2_4',
sqrt(35)*(-Sigma_lambda*(83*nu - 17) + 4*I*Sigma_n*(55*nu - 13) + 25*delta*(S_lambda - 4*I*S_n))/(168*M**2),
datatype='std::complex<double>')
WaveformModes_Spin_Asymm.AddDerivedVariable('hHat_spin_Asymm_3_1_3',
sqrt(14)*(I*S_lambda + S_n + delta*(I*Sigma_lambda + Sigma_n))/(21*M**2),
datatype='std::complex<double>')
WaveformModes_Spin_Symm.AddDerivedVariable('hHat_spin_Symm_3_1_4',
sqrt(14)*I*(S_ell*delta - 5*Sigma_ell*(3*nu - 1))/(336*M**2),
datatype='std::complex<double>')
WaveformModes_Spin_Asymm.AddDerivedVariable('hHat_spin_Asymm_3_0_4',
sqrt(42)*(-17*S_lambda*delta + Sigma_lambda*(35*nu - 9))/(168*M**2),
datatype='std::complex<double>')
WaveformModes_Spin_Asymm.AddDerivedVariable('hHat_spin_Asymm_4_4_4',
9*sqrt(35)*(-3*Sigma_lambda*nu + Sigma_lambda - I*Sigma_n*(3*nu - 1) + delta*(S_lambda + I*S_n))/(56*M**2),
datatype='std::complex<double>')
WaveformModes_Spin_Symm.AddDerivedVariable('hHat_spin_Symm_4_3_4',
9*sqrt(70)*I*(-S_ell*delta + 3*Sigma_ell*nu - Sigma_ell)/(112*M**2),
datatype='std::complex<double>')
WaveformModes_Spin_Asymm.AddDerivedVariable('hHat_spin_Asymm_4_2_4',
sqrt(5)*(-13*Sigma_lambda*(3*nu - 1) + 14*I*Sigma_n*(3*nu - 1) + delta*(13*S_lambda - 14*I*S_n))/(168*M**2),
datatype='std::complex<double>')
WaveformModes_Spin_Symm.AddDerivedVariable('hHat_spin_Symm_4_1_4',
sqrt(10)*I*(S_ell*delta - 3*Sigma_ell*nu + Sigma_ell)/(336*M**2),
datatype='std::complex<double>')
WaveformModes_Spin_Asymm.AddDerivedVariable('hHat_spin_Asymm_4_0_4',
sqrt(2)*I*(S_n*delta - 3*Sigma_n*nu + Sigma_n)/(168*M**2),
datatype='std::complex<double>')
We automatically find the largest $\ell$ value above, so that we don't need to remember to redefine it when adding new terms:
In [6]:
import re
ellRE = re.compile(r'.*?_(?P<ell>[0-9]*)_.*')
ellMax = max([int(ellRE.search(val).group('ell'))
for Terms in [WaveformModes_NoSpin, WaveformModes_Spin_Symm, WaveformModes_Spin_Asymm]
for key,val in Terms.items()
if ellRE.match(val)
])
In [7]:
def SymmetricWaveformModes(LM=[2,2], WaveformModeTerms=[WaveformModes_NoSpin, WaveformModes_Spin_Symm], PNOrder=frac(7,2)):
if(LM[1]<0) :
return (-1)**LM[0]*conjugate(SymmetricWaveformModes([LM[0],-LM[1]], WaveformModeTerms, PNOrder)).simplify()
# We have to play some tricks with the log terms so that `horner` works
def logterm(key,val):
if 'lnv' in val:
return logv
else:
return 1
return rhOverM_coeff*horner(sum([key*(v**n)*logterm(key,val)
for Terms in WaveformModeTerms
for n in range(2*PNOrder+1)
for key,val in Terms.items()
if (val.endswith('_{0}'.format(n))
and '_{0}_{1}_'.format(LM[0],LM[1]) in val)])).subs(logv, ln(v))
In [8]:
def AsymmetricWaveformModes(LM=[2,2], PNOrder=frac(7,2)):
if(LM[1]<0) :
return (-1)**(LM[0]+1)*conjugate(AsymmetricWaveformModes([LM[0],-LM[1]], PNOrder)).simplify()
# We have to play some tricks with the log terms so that `horner` works
def logterm(key,val):
if 'lnv' in val:
return logv
else:
return 1
return rhOverM_coeff*horner(sum([key*(v**n)*logterm(key,val)
for n in range(2*PNOrder+1)
for key,val in WaveformModes_Spin_Asymm.items()
if (val.endswith('_{0}'.format(n))
and '_{0}_{1}_'.format(LM[0],LM[1]) in val)])).subs(logv, ln(v))
In [9]:
# display(SymmetricWaveformModes(PNOrder=frac(8,2)))
In [10]:
# display(SymmetricWaveformModes([2,1], PNOrder=frac(8,2)))
In [11]:
# display(AsymmetricWaveformModes(PNOrder=frac(8,2)))
In [12]:
# display(AsymmetricWaveformModes([2,1], PNOrder=frac(8,2)))