Setting DE params in PyCAMB
Posted: November 21 2017
Hi Antony et al,
I'm playing with the devel branch python wrapper as I want to call CAMB for different (w0,wa).
I realized that if you initialize two cosmologies as done below
then the background quantities computed for the two cosmologies are the same, for example data.angular_diameter_distance(0.3) will be equal to data2.angular_diameter_distance(0.3).
Am I missing something trivial or is this behaviour expected?
What is the best way to initialize different cosmologies and avoid the overwriting?
Thanks for any inputs!
I'm playing with the devel branch python wrapper as I want to call CAMB for different (w0,wa).
I realized that if you initialize two cosmologies as done below
Code: Select all
pars = camb.CAMBparams()
pars.set_cosmology(H0=67.5, ombh2=0.022, omch2=0.122)
pars.InitPower.set_params(As=2e-9, ns=0.95)
pars.set_dark_energy(w=-1, cs2=1., wa=0, dark_energy_model='fluid')
data = camb.get_background(pars)
pars2 = camb.CAMBparams()
pars2.set_cosmology(H0=67.5, ombh2=0.022, omch2=0.122)
pars2.InitPower.set_params(As=2e-9, ns=0.95)
pars2.set_dark_energy(w=-0.5, cs2=1., wa=0.1, dark_energy_model='ppf')
data2 = camb.get_background(pars2)
Am I missing something trivial or is this behaviour expected?
What is the best way to initialize different cosmologies and avoid the overwriting?
Thanks for any inputs!