lesgourg / class_public

Public repository of the Cosmic Linear Anisotropy Solving System (master for the most recent version of the standard code; GW_CLASS to include Cosmic Gravitational Wave Background anisotropies; classnet branch for acceleration with neutral networks; ExoCLASS branch for exotic energy injection; class_matter branch for FFTlog)
234 stars 289 forks source link

Matching CLASS and CAMB lensing potential Cls #167

Closed aoifeboyle closed 4 years ago

aoifeboyle commented 7 years ago

Hello,

This will probably be a straightforward question for someone familiar with the code. I have produced phi-phi power spectra using both CLASS and CAMB, and the results don't really seem to match. This is my input file for CLASS:

output = tCl, pCl, lCl lensing = yes modes = s k_max_tau0_over_l_max = 6 write warnings = yes write background = yes N_ncdm = 1 N_ur = 2.0328 omega_b = 0.02225 omega_cdm = 0.1198 h = 0.6705 m_ncdm = 0.06 ln10^{10}A_s = 3.094 n_s = 0.9645 tau_reio = 0.079

... and for CAMB: output_root = aoife get_scalar_cls = T get_vector_cls = F get_tensor_cls = T want_CMB = T Do21cm = F get_transfer = F accuracy_boost = 1 l_accuracy_boost = 1 high_accuracy_default = T l_max_scalar = 2500 k_eta_max_scalar = 12000.0000000000000 do_lensing = T lensing_method = 1 l_max_tensor = 2000 k_eta_max_tensor = 12000. w = -1 wa = 0 cs2_lam = 1 hubble = 67.05 use_physical = T ombh2 = 0.02225 omch2 = 0.1198 omnuh2 = 0.0006445 omk = 0 helium_fraction = 0.24 massless_neutrinos = 0.046 nu_mass_eigenstates = 1 massive_neutrinos = 1 share_delta_neff = T nu_mass_fractions = 1 reionization = T re_use_optical_depth = T re_optical_depth = 0.079 pivot_scalar = 0.05 pivot_tensor = 0.05 initial_power_num = 1 tensor_parameterization = 1 scalar_spectral_index(1) = 0.9645 scalar_nrun(1) = 0 scalar_nrunrun(1) = 0.0000000000000000 tensor_spectral_index(1) = 0 tensor_nrun(1) = 0.0000000000000000 initial_ratio(1) = 1 scalar_amp(1) = 2.2065e-9

I was reading the CLASS paper that discusses comparisons between the two codes for LCDM, and there it said to try increasing k-tau-0. I did that and it seemed to help but the results are still not quite the same. What am I missing?

Thanks,

Aoife

ThomasTram commented 7 years ago

I may have spotted one problem: In CLASS you are using "N_ur = 2.0328" while in CAMB you are using "massless_neutrinos = 0.046". I think it is easier to start matching the temperature power spectra and then match the phi-phi spectra by the way.

Cheers, Thomas

aoifeboyle commented 7 years ago

@ThomasTram I redid the calculations without massive neutrinos and the results were much closer! So thanks. That must have been the issue :) I think when I reintroduce the massive neutrinos I'll follow your advice.