camb version variance
-
- Posts: 24
- Joined: January 11 2019
- Affiliation: University of Michigan
camb version variance
Hi all,
I was writing a wrapper for camb-1.0.3, and in the test comparing to previous wrapper for camb-Jan15, there was a ~5% difference in pk at high k>10^-2 regime. Is this expected as version variance or it's possibly due to some parameter setting difference?
Thanks,
Angela
I was writing a wrapper for camb-1.0.3, and in the test comparing to previous wrapper for camb-Jan15, there was a ~5% difference in pk at high k>10^-2 regime. Is this expected as version variance or it's possibly due to some parameter setting difference?
Thanks,
Angela
-
- Posts: 1944
- Joined: September 23 2004
- Affiliation: University of Sussex
- Contact:
Re: camb version variance
Sounds high, more likely a parameter difference (e.g. different Halofit version).
-
- Posts: 24
- Joined: January 11 2019
- Affiliation: University of Michigan
Re: camb version variance
it was the linear power spectrum difference. Linear power difference transited around k~0.1 from 0 to 5%Antony Lewis wrote: ↑July 12 2019Sounds high, more likely a parameter difference (e.g. different Halofit version).
-
- Posts: 24
- Joined: January 11 2019
- Affiliation: University of Michigan
Re: camb version variance
One thing I was concerned about is that in the older version of the wrapper, transfer_redshift was set by hand, while in newer version transfer_redshifts are treated as cambdata and calculated by pk_redshifts inputs. could that be the cause of the difference?Antony Lewis wrote: ↑July 12 2019Sounds high, more likely a parameter difference (e.g. different Halofit version).
-
- Posts: 24
- Joined: January 11 2019
- Affiliation: University of Michigan
Re: camb version variance
it seems that the difference is correlated to massive neutrino. when setting omnuh2=0 the difference is <0.2%. Could it due to the evolution of camb's treatment for massive nu?
-
- Posts: 1944
- Joined: September 23 2004
- Affiliation: University of Sussex
- Contact:
Re: camb version variance
Is this a linear effect, or nonlinear? Check settings are the same, and if so please give full reproducing settings.
-
- Posts: 24
- Joined: January 11 2019
- Affiliation: University of Michigan
Re: camb version variance
after some debugging now the difference goes down to ~1.2%, still raising only higher than k/h~0.01. Also, this difference is correlated with massive neutrino, when fixing omnuh2=0 the difference is only 0.2%. Does it sound normal now?Antony Lewis wrote: ↑July 14 2019Is this a linear effect, or nonlinear? Check settings are the same, and if so please give full reproducing settings.
-
- Posts: 1944
- Joined: September 23 2004
- Affiliation: University of Sussex
- Contact:
Re: camb version variance
Sounds quite large, what are your settings? Do you get exactly the same background quantities? (zstar, rdrag etc)
-
- Posts: 24
- Joined: January 11 2019
- Affiliation: University of Michigan
Re: camb version variance
Is there a subroutine to print the settings out when not running from a ini file? just asking to save potentially wasted time to write a new one, I only found the subroutine that writes out the ini objects so far.Antony Lewis wrote: ↑July 21 2019Sounds quite large, what are your settings? Do you get exactly the same background quantities? (zstar, rdrag etc)
background quantities output:
camb_1.0.3
Reion redshift = 10.129
Om_b h^2 = 0.02215894
Om_c h^2 = 0.11690264
Om_nu h^2 = 0.00061550
Om_darkenergy = 0.70494777
Om_K = 0.00000000
Om_m (inc Om_u) = 0.29500000
100 theta (CosmoMC) = 1.04220342
N_eff (total) = 3.046000
3 nu, g= 3.0460 m_nu*c^2/k_B/T_nu0= 113.33 (m_nu= 0.019 eV)
Reion opt depth = 0.0800
Age of universe/GYr = 13.760
zstar = 1089.91
r_s(zstar)/Mpc = 145.41
100*theta = 1.042433
DA(zstar)/Gpc = 13.94891
zdrag = 1059.22
r_s(zdrag)/Mpc = 148.16
k_D(zstar) Mpc = 0.1396
100*theta_D = 0.161359
z_EQ (if v_nu=1) = 3323.12
k_EQ Mpc (if v_nu=1) = 0.010142
100*theta_EQ = 0.828116
100*theta_rs_EQ = 0.457323
tau_recomb/Mpc = 282.43 tau_now/Mpc = 14231.1
camb_jan15
Reion redshift = 10.130
Om_b h^2 = 0.022159
Om_c h^2 = 0.116903
Om_nu h^2 = 0.000616
Om_Lambda = 0.705000
Om_K = 0.000000
Om_m (1-Om_K-Om_L) = 0.295000
100 theta (CosmoMC) = 1.042209
N_eff (total) = 3.046000
3 nu, g= 3.0460 m_nu*c^2/k_B/T_nu0= 113.39 (m_nu= 0.019 eV)
Reion opt depth = 0.0800
Age of universe/GYr = 13.760
zstar = 1089.91
r_s(zstar)/Mpc = 145.41
100*theta = 1.042418
DA(zstar)/Gpc = 13.94883
zdrag = 1059.21
r_s(zdrag)/Mpc = 148.16
k_D(zstar) Mpc = 0.1396
100*theta_D = 0.161356
z_EQ (if v_nu=1) = 3323.12
k_EQ Mpc (if v_nu=1) = 0.010142
100*theta_EQ = 0.828121
100*theta_rs_EQ = 0.457308
tau_recomb/Mpc = 282.43 tau_now/Mpc = 14231.0
-
- Posts: 24
- Joined: January 11 2019
- Affiliation: University of Michigan
Re: camb version variance
Here are the cosmological parameters
[cosmological_parameters]
omega_m = 0.3
h0 = 0.7
omega_b = 0.05
n_s = 0.95
A_s = 2.3e-09
omnuh2 = 0.0006
w = -1.0
massive_nu = 1
massless_nu = 2.046
omega_k = 0.0
tau = 0.08
wa = 0.0
;Helium mass fraction. Needed for Planck
yhe = 0.25
[cosmological_parameters]
omega_m = 0.3
h0 = 0.7
omega_b = 0.05
n_s = 0.95
A_s = 2.3e-09
omnuh2 = 0.0006
w = -1.0
massive_nu = 1
massless_nu = 2.046
omega_k = 0.0
tau = 0.08
wa = 0.0
;Helium mass fraction. Needed for Planck
yhe = 0.25
-
- Posts: 1944
- Joined: September 23 2004
- Affiliation: University of Sussex
- Contact:
Re: camb version variance
Cosmologies look consistent then. In python you can just do print(params). Which variable (or combination) are you calculating P(k) spectrum for?
-
- Posts: 24
- Joined: January 11 2019
- Affiliation: University of Michigan
Re: camb version variance
cold dark matter only. the difference showed a positive correlation with omnuh2, so I'm looking into the neutrino settings now. Could you tell me if there's any change in the massive neutrino related parameter definitions since Jan 2015?Antony Lewis wrote: ↑July 23 2019Cosmologies look consistent then. In python you can just do print(params). Which variable (or combination) are you calculating P(k) spectrum for?
-
- Posts: 1944
- Joined: September 23 2004
- Affiliation: University of Sussex
- Contact:
Re: camb version variance
I don't recall the exact situation in 2015. I would check both spectra actually are cold dark matter only.
The neutrino settings certainly look odd, with mnu=0.02eV rather than one with 0.06eV.
The neutrino settings certainly look odd, with mnu=0.02eV rather than one with 0.06eV.
-
- Posts: 24
- Joined: January 11 2019
- Affiliation: University of Michigan
Re: camb version variance
Hi Antony, you were right, I made mistake on transfer variable settings. now they agree at level ~0.1%. Thank you so much! and sorry for bugging you so long for this trivial mistake.Antony Lewis wrote: ↑July 31 2019I don't recall the exact situation in 2015. I would check both spectra actually are cold dark matter only.
The neutrino settings certainly look odd, with mnu=0.02eV rather than one with 0.06eV.