Closed SergeiDBykov closed 2 years ago
Can it be due to the CCL interpolation of an input angular power spectrum to large ell
values (sect 3.4 in the ccl paper)?
I tried ell
up to 5000 and all the calculations seem to return the same results within 1%!
Hi @SergeiDBykov . This is likely the case. CCL extrapolates the C_ell to a large ell in order to give a converged correlation function. This is likely not a bad thing to do, since power spectra shouldn't magically go to zero after a specific ell, and you can see that it actually ends up mattering at surprisingly large angles.
Have you tried supplying both CCL and your code with a C_ell that is sampled to a very large ell (e.g. 10,000 or 20,000)?
Hi @damonge, thanks!
Indeed, for a very large ell values the codes agree very well. I conclude that this is due to the interpolation.
May be it is worth noting in the docs that the input Cell are interpolated when you use pyccl.correlations. correlation
? In the CCL paper there are just a few sentences about that step, easy to miss.
Anyway, thank you very much for your help.
Hello!
I have been playing with the
pyccl.correlations
and tried to reproducepyccl.correlations.correlation
2pcf for some input angular spectrum. I found difference from the result of CCL and from my implementation of summation over Legendre polynomials. For my implementation see the code below. It uses pyhtools package for calculating Legendre polynomials.Then I tried to check the output of from CAMB's cl2corr function and it matched with my implementation, see the plot below.
Why is that? I tried different
method
argument for CCL function and it has no effect on the 2pcf. The formula I used is eq. (38) from CCL paper.The code is below: (you need
pyhtools
package to run my calculation, but comparison with CAMB is sufficient).