In [1]:
from __future__ import print_function
import camb
print(camb.__version__)
In [2]:
test_z = 1100.
In [3]:
pars1 = camb.CAMBparams()
pars1.set_cosmology(H0=75.0,mnu=0.06)
pars1.InitPower.set_params()
results1 = camb.get_background(pars1)
We calculate comoving distance to test_z
In [4]:
chi1 = results1.comoving_radial_distance(test_z)
print("Comoving distance for param set 1 : ",chi1)
In [5]:
pars2 = camb.CAMBparams()
pars2.set_cosmology(H0=65.0,mnu=0.180)
pars2.InitPower.set_params()
results2 = camb.get_background(pars2)
We calculate comoving distance for this new cosmology
In [6]:
chi2 = results2.comoving_radial_distance(test_z)
print("Comoving distance for param set 2 : ",chi2)
In [7]:
chi1_again = results1.comoving_radial_distance(test_z)
print("Comoving distance for param set 1 : ",chi1_again)
In [8]:
assert chi1==chi1_again