My question is regarding the calculation of the sound horizon which is encoded in function dsound_da_exact in results.f90 (fortran version of CAMB)
function dsound_da_exact(this,a)
class(CAMBdata) :: this
real(dl) dsound_da_exact,a,R,cs
R = 3*this%grhob*a / (4*this%grhog)
cs=1.0d0/sqrt(3*(1+R))
dsound_da_exact=dtauda(this,a)*cs
end function dsound_da_exact
I checked several papers and books and from this R should be
R = 3*this%grhob / (4*this%grhog)
in stead of
R = 3*this%grhob*a / (4*this%grhog)
I checked to make the change for a specifici cosmological model and resulting Cl's are the same. Could you confirm this? thank very much in advanced for making this clear.
Sound horizon

 Posts: 20
 Joined: December 10 2004
 Affiliation: Buenos Aires University

 Posts: 1636
 Joined: September 23 2004
 Affiliation: University of Sussex
 Contact:
Re: Sound horizon
The sound horizon calculation is not used to calculate the CL. rhob and rhog are constants, so to the $a$ is needed to calculate the density ratio at the relevant time.