CAMB: 1% error at l = 16?

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

CAMB: 1% error at l = 16?

Hello,

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

Code: Select all

if &#40;CP%AccurateReionization&#41; then
do lvar=11, 37,2

to

Code: Select all

if &#40;CP%AccurateReionization&#41; 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 $l=16$, 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 $l$ except $l=16$?

Thanks
Alex

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

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

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)