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')
execnotebook('Flux.ipynb')
This collection of absorption terms is possibly incomplete; only Alvi (2001) is used.
See also (the last three referenced by Marsat et al.)
In [2]:
AlviTerms = PNCollection()
In [3]:
AlviTerms.AddDerivedVariable('MDot_Alvi_5',
-((M1/M)**3*(1+3*chi1chi1)*chi1_ell + (M2/M)**3*(1+3*chi2chi2)*chi2_ell)/4)
AlviTerms.AddDerivedConstant('MDot_Alvi_8',
(M1/M)**4*(1+3*chi1chi1)*(1+sqrt(1-chi1chi1))/2 + (M2/M)**4*(1+3*chi2chi2)*(1+sqrt(1-chi2chi2))/2)
In [4]:
def AbsorptionExpression(AbsorptionTerms=[AlviTerms], PNOrder=frac(7,2)):
# The following two lines should be removed together
print("WARNING: Absorption term in EnergyAbsorption.ipynb temporarily disabled.")
return sympify('0')
if not AbsorptionTerms:
return sympify('0')
return Fcal_coeff*horner(sum([key*(v**n)
for Terms in AbsorptionTerms
for n in range(2*PNOrder+1)
for key,val in Terms.items()
if val.endswith('_{0}'.format(n))]))
In [5]:
# AbsorptionExpression([AlviTerms], frac(7,2))
Out[5]: