Difference between CAMB and WMAP

 Posts: 2
 Joined: July 13 2007
 Affiliation: MPE
Difference between CAMB and WMAP
I use CAMB to get the matter power spectrum and I want to compare it to the WMAP matter power spetrum from http://lambda.gsfc.nasa.gov/product/map ... m_wmap.cfm .
The parameter are from the threeyear WMAP oberservation for a \Lambda CDM model. I ran CAMB with these parameters (see below in the params.ini attachment).
I plotted both power spectra in one picture to see the differences and there was a scale dependent difference.
This plot shows the common logarithm (log10) of matter power spectrum with respect to the common logarithm of the wavenumber in untis of h Mpc\^(1).
The next plot shows the matter power spectrum with respect to the wavenumber in the same units as above in a certain range:
The question I have here is, why are there these differences and how can I get CAMB to the WMAP data? (perhaps wrong settings, modifying the code, etc.)
Another difference I realized was between the CAMB online simulation (I will it call CAMB online) from http://lambda.gsfc.nasa.gov/toolbox/tb_camb_form.cfm .
The following picture shows the same difference as above again the common logarithm of the matter power spectrum with respect to the common logarithm of the wavenumber:
Here it is the same question as above. Why are here the same differences with threeyear WMAP data for a \Lambda CDM model?
I noticed also, that there differences between CAMB and CAMB online in computing sigma8 and sigma8 is dependent on the k\_per_logint setting. There are also differences if the k\_per_logint is the same in CAMB and CAMB online.
This picture shows what I mean.
Here common logarithm of the matter power spectrum with respect to the common logarthim of the wavenumber.
Here the matter power spetrum with respect to the wavenumber.
If I choose in CAMB k\_per_logint = 0 and in CAMB online k\_per_logint = 1 because you cannot set it to zero in CAMB online you will get exactly the same shown in the plot below.
Here common logarithm of the matter power spectrum with respect to the common logarthim of the wavenumber.
Here the matter power spetrum with respect to the wavenumber.
Why are there these differences between the CAMB and CAMB online? It seemed to me, that the k\_per_logint = 0 case in CAMB is the k\_per_logint = 1 case in CAMB online.
Hope someone can help me  thanks in advance!
Cheers,
Holger
This is the params.ini file with the settings I had chosen.
#Parameters for CAMB
#output_root is prefixed to output file names
output\_root = test
#What to do
get\_scalar_cls = T
get\_vector_cls = F
get\_tensor_cls = T
get\_transfer = T
#if do_lensing then scalar_output_file contains additional columns of l^4 C_l^{pp} and l^3 C_l^{pT}
#where p is the projected potential. Output lensed CMB Cls (without tensors) are in lensed_output_file below.
do_lensing = F
# 0: linear, 1: nonlinear matter power (HALOFIT), 2: nonlinear CMB lensing (HALOFIT)
do_nonlinear = 0
#Maximum multipole and k*eta.
# Note that C_ls near l\_max are inaccurate (about 5%), go to 50 more than you need
# Lensed power spectra are computed to l\_max_scalar250 where accurate at %level
# For high accuracy lensed spectra set l\_max_scalar = (l you need) + 500
# To get accurate lensed BB need to have l\_max_scalar>2000, k\_eta_max_scalar > 10000
# Otherwise k\_eta_max_scalar=2*l\_max_scalar usually suffices
l\_max_scalar = 2000
k\_eta_max_scalar = 4000
# Tensor settings should be less than or equal to the above
l\_max_tensor = 1500
k\_eta_max_tensor = 3000
#Main cosmological parameters, neutrino masses are assumed degenerate
# If use\_phyical set phyiscal densities in baryone, CDM and neutrinos + Omega\_k
use\_physical = T
ombh2 = 0.02229
omch2 = 0.1054
omnuh2 = 0
omk = 0
hubble = 73.2
#effective equation of state parameter for dark energy, assumed constant
w = 1
#constant comoving sound speed of the dark energy (1=quintessence)
cs2_lam = 1
#if use\_physical = F set parameters as here
#omega_baryon = 0.0462
#omega_cdm = 0.2538
#omega_lambda = 0.7
#omega_neutrino = 0
#massless_neutrinos is the effective number (for QED + noninstantaneous decoupling)
temp_cmb = 2.726
helium_fraction = 0.24
massless_neutrinos = 3.04
massive_neutrinos = 0
#Neutrino mass splittings
nu_mass_eigenstates = 1
#nu_mass_degeneracies = 0 sets nu_mass_degeneracies = massive_neutrinos
#otherwise should be an array
#e.g. for 3 neutrinos with 2 nondegenerate eigenstates, nu_mass_degeneracies = 2 1
nu_mass_degeneracies = 0
#Fraction of total omega_nu h^2 accounted for by each eigenstate, eg. 0.5 0.5
nu_mass_fractions = 1
#Reionization (assumed sharp), ignored unless reionization = T
reionization = T
re_use_optical_depth = T
re_optical_depth = 0.089
#If re_use_optical_depth = F then use following, otherwise ignored
re_redshift = 11
re_ionization_frac = 1
#Initial power spectrum, amplitude, spectral index and running
initial_power_num = 1
scalar_amp(1) = 2.3e9
scalar_spectral_index(1) = 0.958
scalar_nrun(1) = 0
tensor_spectral_index(1) = 0
#ratio is that of the initial tens/scal power spectrum amplitudes
initial_ratio(1) = 1
#note vector modes use the scalar settings above
#Initial scalar perturbation mode (adiabatic=1, CDM iso=2, Baryon iso=3,
# neutrino density iso =4, neutrino velocity iso = 5)
initial_condition = 1
#If above is zero, use modes in the following (totally correlated) proportions
#Note: we assume all modes have the same initial power spectrum
initial_vector = 1 0 0 0 0
#For vector modes: 0 for regular (neutrino vorticity mode), 1 for magnetic
vector_mode = 0
#Normalization
COBE_normalize = F
##CMB_outputscale scales the output Cls
#To get MuK^2 set realistic initial amplitude (e.g. scalar_amp(1) = 2.3e9 above) and
#otherwise for dimensionless transfer functions set scalar_amp(1)=1 and use
#CMB_outputscale = 1
CMB_outputscale = 7.4311e12
#Transfer function settings, transfer_kmax=0.5 is enough for sigma_8
#transfer_k_per_logint=0 sets sensible noneven sampling;
#transfer_k_per_logint=5 samples fixed spacing in logk
transfer_high_precision = T
transfer_kmax = 2
transfer_k_per_logint = 0
transfer_num_redshifts = 1
transfer_redshift(1) = 0
transfer_filename(1) = transfer_out.dat
#Matter power spectrum output against k/h in units of h^{3} Mpc^3
transfer_matterpower(1) = matterpower.dat
#Output files not produced if blank. make camb_fits to use use the FITS setting.
scalar_output_file = scalCls.dat
vector_output_file = vecCls.dat
tensor_output_file = tensCls.dat
total_output_file = totCls.dat
lensed_output_file = lensedCls.dat
FITS_filename = scalCls.fits
##Optional parameters to control the computation speed,accuracy and feedback
#If feedback_level > 0 print out useful information computed about the model
feedback_level = 1
# 1: curved correlation function, 2: flat correlation function, 3: inaccurate harmonic method
lensing_method = 1
accurate_BB = F
#Recombination calculation: 1: RECFAST, 2: RECFAST+astroph/0501672 corrections
recombination = 2
#massive_nu_approx: 0  integrate distribution function
# 1  switch to series in velocity weight once nonrelativistic
# 2  use fast approximate scheme (CMB only accurate for light neutrinos)
# 3  intelligently use the best accurate method
massive_nu_approx = 0
#Whether you are bothered about polarization.
accurate_polarization = T
#Whether you are bothered about percent accuracy on EE from reionization
accurate_reionization = F
#whether or not to include neutrinos in the tensor evolution equations
do_tensor_neutrinos = F
#Whether to turn off smallscale late time radiation hierarchies (save time,v. accurate)
do_late_rad_truncation = T
#Computation parameters
#if number_of_threads=0 assigned automatically
number_of_threads = 0
#Default scalar accuracy is about 0.3% (except lensed BB).
#For 0.1%level try accuracy_boost=2, l_accuracy_boost=2.
#Increase accuracy_boost to decrease time steps, use more k values, etc.
#Decrease to speed up at cost of worse accuracy. Suggest 0.8 to 3.
accuracy_boost = 2
#Larger to keep more terms in the hierarchy evolution.
l_accuracy_boost = 2
#Increase to use more C_l values for interpolation.
#Increasing a bit will improve the polarization accuracy at l up to 200 
#interpolation errors may be up to 3%
#Decrease to speed up nonflat models a bit
l_sample_boost = 1
The parameter are from the threeyear WMAP oberservation for a \Lambda CDM model. I ran CAMB with these parameters (see below in the params.ini attachment).
I plotted both power spectra in one picture to see the differences and there was a scale dependent difference.
This plot shows the common logarithm (log10) of matter power spectrum with respect to the common logarithm of the wavenumber in untis of h Mpc\^(1).
The next plot shows the matter power spectrum with respect to the wavenumber in the same units as above in a certain range:
The question I have here is, why are there these differences and how can I get CAMB to the WMAP data? (perhaps wrong settings, modifying the code, etc.)
Another difference I realized was between the CAMB online simulation (I will it call CAMB online) from http://lambda.gsfc.nasa.gov/toolbox/tb_camb_form.cfm .
The following picture shows the same difference as above again the common logarithm of the matter power spectrum with respect to the common logarithm of the wavenumber:
Here it is the same question as above. Why are here the same differences with threeyear WMAP data for a \Lambda CDM model?
I noticed also, that there differences between CAMB and CAMB online in computing sigma8 and sigma8 is dependent on the k\_per_logint setting. There are also differences if the k\_per_logint is the same in CAMB and CAMB online.
This picture shows what I mean.
Here common logarithm of the matter power spectrum with respect to the common logarthim of the wavenumber.
Here the matter power spetrum with respect to the wavenumber.
If I choose in CAMB k\_per_logint = 0 and in CAMB online k\_per_logint = 1 because you cannot set it to zero in CAMB online you will get exactly the same shown in the plot below.
Here common logarithm of the matter power spectrum with respect to the common logarthim of the wavenumber.
Here the matter power spetrum with respect to the wavenumber.
Why are there these differences between the CAMB and CAMB online? It seemed to me, that the k\_per_logint = 0 case in CAMB is the k\_per_logint = 1 case in CAMB online.
Hope someone can help me  thanks in advance!
Cheers,
Holger
This is the params.ini file with the settings I had chosen.
#Parameters for CAMB
#output_root is prefixed to output file names
output\_root = test
#What to do
get\_scalar_cls = T
get\_vector_cls = F
get\_tensor_cls = T
get\_transfer = T
#if do_lensing then scalar_output_file contains additional columns of l^4 C_l^{pp} and l^3 C_l^{pT}
#where p is the projected potential. Output lensed CMB Cls (without tensors) are in lensed_output_file below.
do_lensing = F
# 0: linear, 1: nonlinear matter power (HALOFIT), 2: nonlinear CMB lensing (HALOFIT)
do_nonlinear = 0
#Maximum multipole and k*eta.
# Note that C_ls near l\_max are inaccurate (about 5%), go to 50 more than you need
# Lensed power spectra are computed to l\_max_scalar250 where accurate at %level
# For high accuracy lensed spectra set l\_max_scalar = (l you need) + 500
# To get accurate lensed BB need to have l\_max_scalar>2000, k\_eta_max_scalar > 10000
# Otherwise k\_eta_max_scalar=2*l\_max_scalar usually suffices
l\_max_scalar = 2000
k\_eta_max_scalar = 4000
# Tensor settings should be less than or equal to the above
l\_max_tensor = 1500
k\_eta_max_tensor = 3000
#Main cosmological parameters, neutrino masses are assumed degenerate
# If use\_phyical set phyiscal densities in baryone, CDM and neutrinos + Omega\_k
use\_physical = T
ombh2 = 0.02229
omch2 = 0.1054
omnuh2 = 0
omk = 0
hubble = 73.2
#effective equation of state parameter for dark energy, assumed constant
w = 1
#constant comoving sound speed of the dark energy (1=quintessence)
cs2_lam = 1
#if use\_physical = F set parameters as here
#omega_baryon = 0.0462
#omega_cdm = 0.2538
#omega_lambda = 0.7
#omega_neutrino = 0
#massless_neutrinos is the effective number (for QED + noninstantaneous decoupling)
temp_cmb = 2.726
helium_fraction = 0.24
massless_neutrinos = 3.04
massive_neutrinos = 0
#Neutrino mass splittings
nu_mass_eigenstates = 1
#nu_mass_degeneracies = 0 sets nu_mass_degeneracies = massive_neutrinos
#otherwise should be an array
#e.g. for 3 neutrinos with 2 nondegenerate eigenstates, nu_mass_degeneracies = 2 1
nu_mass_degeneracies = 0
#Fraction of total omega_nu h^2 accounted for by each eigenstate, eg. 0.5 0.5
nu_mass_fractions = 1
#Reionization (assumed sharp), ignored unless reionization = T
reionization = T
re_use_optical_depth = T
re_optical_depth = 0.089
#If re_use_optical_depth = F then use following, otherwise ignored
re_redshift = 11
re_ionization_frac = 1
#Initial power spectrum, amplitude, spectral index and running
initial_power_num = 1
scalar_amp(1) = 2.3e9
scalar_spectral_index(1) = 0.958
scalar_nrun(1) = 0
tensor_spectral_index(1) = 0
#ratio is that of the initial tens/scal power spectrum amplitudes
initial_ratio(1) = 1
#note vector modes use the scalar settings above
#Initial scalar perturbation mode (adiabatic=1, CDM iso=2, Baryon iso=3,
# neutrino density iso =4, neutrino velocity iso = 5)
initial_condition = 1
#If above is zero, use modes in the following (totally correlated) proportions
#Note: we assume all modes have the same initial power spectrum
initial_vector = 1 0 0 0 0
#For vector modes: 0 for regular (neutrino vorticity mode), 1 for magnetic
vector_mode = 0
#Normalization
COBE_normalize = F
##CMB_outputscale scales the output Cls
#To get MuK^2 set realistic initial amplitude (e.g. scalar_amp(1) = 2.3e9 above) and
#otherwise for dimensionless transfer functions set scalar_amp(1)=1 and use
#CMB_outputscale = 1
CMB_outputscale = 7.4311e12
#Transfer function settings, transfer_kmax=0.5 is enough for sigma_8
#transfer_k_per_logint=0 sets sensible noneven sampling;
#transfer_k_per_logint=5 samples fixed spacing in logk
transfer_high_precision = T
transfer_kmax = 2
transfer_k_per_logint = 0
transfer_num_redshifts = 1
transfer_redshift(1) = 0
transfer_filename(1) = transfer_out.dat
#Matter power spectrum output against k/h in units of h^{3} Mpc^3
transfer_matterpower(1) = matterpower.dat
#Output files not produced if blank. make camb_fits to use use the FITS setting.
scalar_output_file = scalCls.dat
vector_output_file = vecCls.dat
tensor_output_file = tensCls.dat
total_output_file = totCls.dat
lensed_output_file = lensedCls.dat
FITS_filename = scalCls.fits
##Optional parameters to control the computation speed,accuracy and feedback
#If feedback_level > 0 print out useful information computed about the model
feedback_level = 1
# 1: curved correlation function, 2: flat correlation function, 3: inaccurate harmonic method
lensing_method = 1
accurate_BB = F
#Recombination calculation: 1: RECFAST, 2: RECFAST+astroph/0501672 corrections
recombination = 2
#massive_nu_approx: 0  integrate distribution function
# 1  switch to series in velocity weight once nonrelativistic
# 2  use fast approximate scheme (CMB only accurate for light neutrinos)
# 3  intelligently use the best accurate method
massive_nu_approx = 0
#Whether you are bothered about polarization.
accurate_polarization = T
#Whether you are bothered about percent accuracy on EE from reionization
accurate_reionization = F
#whether or not to include neutrinos in the tensor evolution equations
do_tensor_neutrinos = F
#Whether to turn off smallscale late time radiation hierarchies (save time,v. accurate)
do_late_rad_truncation = T
#Computation parameters
#if number_of_threads=0 assigned automatically
number_of_threads = 0
#Default scalar accuracy is about 0.3% (except lensed BB).
#For 0.1%level try accuracy_boost=2, l_accuracy_boost=2.
#Increase accuracy_boost to decrease time steps, use more k values, etc.
#Decrease to speed up at cost of worse accuracy. Suggest 0.8 to 3.
accuracy_boost = 2
#Larger to keep more terms in the hierarchy evolution.
l_accuracy_boost = 2
#Increase to use more C_l values for interpolation.
#Increasing a bit will improve the polarization accuracy at l up to 200 
#interpolation errors may be up to 3%
#Decrease to speed up nonflat models a bit
l_sample_boost = 1

 Posts: 1435
 Joined: September 23 2004
 Affiliation: University of Sussex
 Contact:
Re: Difference between CAMB and WMAP
My guess is because they are using pivot scale of k=0.002 Mpc^{1} but you are using the default 0.05 Mpc^{1} (see power_tilt.f90).
Setting k_per_logint=0 is not the same as k_per_logint=1: it sets an uneven spacing to try to optimally sample the baryon oscillations while remaining fast.
Setting k_per_logint=0 is not the same as k_per_logint=1: it sets an uneven spacing to try to optimally sample the baryon oscillations while remaining fast.

 Posts: 2
 Joined: July 13 2007
 Affiliation: MPE
Difference between CAMB and WMAP
Thanks for your fast help. It worked well the pivot scale was the problem.

 Posts: 1
 Joined: August 27 2012
 Affiliation: Institute for Theoretical Physics, Heidelberg
 Contact:
Difference between CAMB and WMAP
Hi,
anyway there is a difference between the latest version of CAMB October 2012 and Camb Online.
Using exactly the same input parameters, I get a slightly different value of sigma8 and other output parameters.
I know the Online version is not mantained by the same people and that versions differ, but can somebody tell me the exact reasons for the discrepancy? (changes in which caluclations have been done?)
Thanks,
Santiago Casas
anyway there is a difference between the latest version of CAMB October 2012 and Camb Online.
Using exactly the same input parameters, I get a slightly different value of sigma8 and other output parameters.
I know the Online version is not mantained by the same people and that versions differ, but can somebody tell me the exact reasons for the discrepancy? (changes in which caluclations have been done?)
Thanks,
Santiago Casas