CAMB: 1% error at l = 16?

Use of Healpix, camb, CLASS, cosmomc, compilers, etc.
Post Reply
Alexander van Engelen
Posts: 1
Joined: March 27 2008
Affiliation: McGill University

CAMB: 1% error at l = 16?

Post by Alexander van Engelen » July 30 2008


With the "accurate_reionization" flag turned on, CAMB will ordinarily calculate [tex]C_l[/tex] for the odd values of [tex]l[/tex] between 11 and 37, as prescribed in the "initlval" routine. The even values of [tex]l[/tex] are then interpolated. I would like to obtain the Cls for all [tex]l[/tex] without interpolation, so to get them (between 11 and 37) I simply changed the lines (modules.f90:563)

Code: Select all

if (CP%AccurateReionization) then
 do lvar=11, 37,2


Code: Select all

if (CP%AccurateReionization) then
 do lvar=11, 37,1

After making this change, the value of lSet%l0 and the lSet%l array seem to have been set properly. The calculated Cls look okay, with the exception of the single multipole [tex]l=16[/tex], which is off by around 1%. Here are the contents of iCl_scalar(*,i,in) for i=1 (i.e. the temperature Cl, prior to the spline interpolation), from the June 08 version with gfortran 4.3.1:


The relative error seems to get worse with increasing accuracy_boost. Is there a reason my kludge should work for all even [tex]l[/tex] except [tex]l=16[/tex]?


Antony Lewis
Posts: 1615
Joined: September 23 2004
Affiliation: University of Sussex

Re: CAMB: 1% error at l = 16?

Post by Antony Lewis » August 29 2008

Sounds reasonable, the interpolation will give some error. 1% is well below cosmic variance there, but I'll put in a switch to do every l if lSampleBoost>1 and accurate_reionization = T.

I'm not sure why your results look offset as you change accuracy boost, it seems to be pretty stable for me (at least with accurate_reionization = T)

Post Reply