11# Third-party imports
22import numpy as np
3- import camb
3+ from camb import CAMBdata
44
55# Parameters
66a_init = 1e-4 # Initial scale-factor for growth ODE integration
77
8- def _w (a :float , CAMB_results :camb . CAMBdata , LCDM = False ) -> float :
8+ def _w (a :float , CAMB_results :CAMBdata , LCDM = False ) -> float :
99 '''
1010 Dark energy equation of state for w0, wa models
1111 '''
1212 w0 , wa = (- 1. , 0. ) if LCDM else (CAMB_results .Params .DarkEnergy .w , CAMB_results .Params .DarkEnergy .wa )
1313 return w0 + (1. - a )* wa
1414
1515
16- def _X_w (a :float , CAMB_results :camb . CAMBdata , LCDM = False ) -> float :
16+ def _X_w (a :float , CAMB_results :CAMBdata , LCDM = False ) -> float :
1717 '''
1818 Cosmological dark energy density for w0, wa models
1919 '''
2020 w0 , wa = (- 1. , 0. ) if LCDM else (CAMB_results .Params .DarkEnergy .w , CAMB_results .Params .DarkEnergy .wa )
2121 return a ** (- 3. * (1. + w0 + wa ))* np .exp (- 3. * wa * (1. - a ))
2222
2323
24- def _Omega_m (a :float , CAMB_results :camb . CAMBdata , LCDM = False ) -> float :
24+ def _Omega_m (a :float , CAMB_results :CAMBdata , LCDM = False ) -> float :
2525 '''
2626 Evolution of Omgea_m with scale-factor ignoring radiation
2727 '''
@@ -32,7 +32,7 @@ def _Omega_m(a:float, CAMB_results:camb.CAMBdata, LCDM=False) -> float:
3232 return Om_m * a ** - 3 / _Hubble2 (a , CAMB_results , LCDM )
3333
3434
35- def _Hubble2 (a :float , CAMB_results :camb . CAMBdata , LCDM = False ) -> float :
35+ def _Hubble2 (a :float , CAMB_results :CAMBdata , LCDM = False ) -> float :
3636 '''
3737 Squared Hubble parameter ignoring radiation
3838 Massive neutrinos are counted as 'matter'
@@ -47,7 +47,7 @@ def _Hubble2(a:float, CAMB_results:camb.CAMBdata, LCDM=False) -> float:
4747 return H2
4848
4949
50- def _AH (a :float , CAMB_results :camb . CAMBdata , LCDM = False ) -> float :
50+ def _AH (a :float , CAMB_results :CAMBdata , LCDM = False ) -> float :
5151 '''
5252 Acceleration parameter ignoring radiation
5353 Massive neutrinos are counted as 'matter'
@@ -61,7 +61,7 @@ def _AH(a:float, CAMB_results:camb.CAMBdata, LCDM=False) -> float:
6161 return AH
6262
6363
64- def get_growth_interpolator (CAMB_results :camb . CAMBdata , LCDM = False ) -> callable :
64+ def get_growth_interpolator (CAMB_results :CAMBdata , LCDM = False ) -> callable :
6565 '''
6666 Solve the linear growth ODE and returns an interpolating function for the solution
6767 LCDM = True forces w = -1 and imposes flatness by modifying the dark-energy density
0 commit comments