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)
221 stars 293 forks source link

galaxy lensing potentials sCls #157

Open mo323 opened 7 years ago

mo323 commented 7 years ago

Hello all,

I was just wondering if you could possibly address the following for me please?

--The equation defining the relation between lensing C_l^phiphi and Cl^gamma-gamma given in explanatory.ini file is not correct (e.g. see equation A11 in Hu W.(2000) PRD 62,043007). The conversion factor is correct for deriving convergence Cls from Cl_phiphi but not for deriving shear Cls. The conversion factor for shear Cls is (1/4)*(l+2)!/(l-2)!.

-- Also I need to take the derivatives of Cl_phiphi and I would very much like to use Automatic differentiation tools to do that. I just wanted to know if there is any plan to make this feature available in Class or if you know anything about what the best way of doing this would be?

Thanks for your help.

Malak

ThomasTram commented 7 years ago

Hi Malak

I agree that the factor is wrong, although not by much - the difference will only show up at l<10 or so. The optimal solution for taking derivatives is to construct it directly from the cubic spline computed internally by CLASS. This will require a bit of coding of course. Alternatively you could just spline the output again (e.g. in Python) and compute the derivative from that spline.

For increasing the l-sampling, see this post: https://github.com/lesgourg/class_public/issues/156

Cheers, Thomas

mo323 commented 7 years ago

Hi Thomas,

Many thanks for the reply. I was just wondering if you could possibly point me to where these splines are calculated in CLASS?

Thanks again

Malak