Skip to content

CAMB and CLASS disagree on lensing-polarization cross spectrum #645

@hersle

Description

@hersle

Hi!

I am unable to make CAMB and CLASS to agree on $C_l$ for lensing-polarization with default-ish precision parameters. Here is a script to reproduce my comparison (run in an empty directory, and modify class and camb to executable paths if not in $PATH):

echo '
output_root = camb
scalar_covariance_output_file = cl.dat
feedback_level = 1
get_scalar_cls = T
get_transfer = F
do_lensing = T
l_max_scalar = 2500
CMB_outputscale = 7.42835025e12

# recommended in inifiles/params.ini
k_eta_max_scalar = 10000
accuracy_boost = 2
l_accuracy_boost = 2

# same minimal model parameters as CLASS
hubble = 70.0
temp_cmb = 2.7
ombh2 = 0.02
omch2 = 0.12
omk = 0
massless_neutrinos = 0.0
omnuh2 = 0.0
massive_neutrinos = 0
scalar_amp = 2e-9
scalar_spectral_index = 1.0
helium_fraction = 0.25
reionization = F
recombination_model = Recfast
' > camb.ini

echo '
root = class
overwrite_root = yes
background_verbose = 2
output = tCl,pCl,lCl
format = camb

# same minimal model parameters as CAMB
H0 = 70.0
T_cmb = 2.7
omega_b = 0.02
omega_cdm = 0.12
omega_k = 0.0
N_ur = 0
N_ncdm = 0
A_s = 2e-9
n_s = 1.0
YHe = 0.25
reio_parametrization = reio_none
recombination = recfast
' > class.ini

echo "Running CLASS:"
class class.ini

echo -e "\nRunning CAMB:"
camb camb.ini

echo -e "\nPlotting CLASS vs CAMB to out.png:"
gnuplot -e "
	set terminal png size 1600, 800;
	set output 'out.png';
	set xlabel 'l';
	set ylabel 'Dₗ (lensing × polarization)';
	plot 'camb_cl.dat' using 1:9 with lines, 'class_cl.dat' using 1:8 with lines;
"
xdg-open out.png

Output:

Running CLASS:
Running CLASS version v3.2.3
Computing background
Chose ndf15 as generic_evolver
 -> age = 13.648033 Gyr
 -> conformal age = 14230.579653 Mpc
 -> N_eff = 0 (summed over all species that are non-relativistic at early times) 
 -> radiation/matter equality at z = 5877.103771
    corresponding to conformal time = 86.574974 Mpc
 ---------------------------- Budget equation ----------------------- 
 ---> Nonrelativistic Species 
-> Bayrons                        Omega = 0.0408163       , omega = 0.02           
-> Cold Dark Matter               Omega = 0.244898        , omega = 0.12           
 ---> Relativistic Species 
-> Photons                        Omega = 4.86065e-05     , omega = 2.38172e-05    
 ---> Other Content 
-> Cosmological Constant          Omega = 0.714237        , omega = 0.349976       
 ---> Total budgets 
 Radiation                        Omega = 4.86065e-05     , omega = 2.38172e-05     
 Non-relativistic                 Omega = 0.285714        , omega = 0.14            
 Other Content                    Omega = 0.714237        , omega = 0.349976        
 TOTAL                            Omega = 1               , omega = 0.49            
 -------------------------------------------------------------------- 

Running CAMB:
Om_b h^2             =  0.020000
Om_c h^2             =  0.120000
Om_nu h^2            =  0.000000
Om_darkenergy        =  0.714237
Om_K                 =  0.000000
Om_m (inc Om_u)      =  0.285714
100 theta (CosmoMC)  =  1.195719
Age of universe/GYr  =  13.648
zstar                =  1101.75
r_s(zstar)/Mpc       =  165.07
100*theta            =  1.186388
DA(zstar)/Gpc        =  13.91371
zdrag                =  1064.92
r_s(zdrag)/Mpc       =  168.56
k_D(zstar) Mpc       =  0.1307
100*theta_D          =  0.172743
z_EQ (if v_nu=1)     =  5877.11
k_EQ Mpc (if v_nu=1) =  0.013532
100*theta_EQ         =  0.622227
100*theta_rs_EQ      =  0.350612
tau_recomb/Mpc       =  317.21  tau_now/Mpc =  14230.6

Plotting CLASS vs CAMB to out.png:
Image

Do you know the reason for this disagreement and/or how it can be resolved? Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions