Skip to content

Curved-sky kernels and bin-averaging for angular correlation functions#1296

Open
DhayaaAnbajagane wants to merge 14 commits into
LSSTDESC:masterfrom
DhayaaAnbajagane:master
Open

Curved-sky kernels and bin-averaging for angular correlation functions#1296
DhayaaAnbajagane wants to merge 14 commits into
LSSTDESC:masterfrom
DhayaaAnbajagane:master

Conversation

@DhayaaAnbajagane
Copy link
Copy Markdown

CCL currently provides FFTLog, Legendre, and Bessel routines to go from C_ells to two-point angular correlations for spin-0 and spin-2 fields. The Legendre method is the only accurate one for wide-angle curved-sky predictions, where the latter very much matters for DESC analyses. However, this method is currently not implemented for weak lensing, and the one implemented for GG-lensing is quite slow.

This PR does the following:

  1. Vectorize the legendre polynomial calculation in the GGL curved-sky kernel (the previous run was drastically slower due to GSL's recurvsive calculation of the polynomials) by using the array method we'd already been using for wtheta.
  2. Implement the curved-sky kernel for weak lensing (xi_plus and xi_minus) based on: https://arxiv.org/abs/astro-ph/9609149
  3. Implement bin-averaging by integrating the polynomials, following https://arxiv.org/abs/2012.08568. This is done for wtheta, GGL, and cosmic shear (NN, NG, and GG+/GG- in CCL's language).

==============

The API needed some thinking since now we have a theta_min and theta_max. In order to be as non-intrusive as possible, we currently keep the correlation() function but simply add a new input theta_max = None. When it is not None, it is treated as the upper edge of the theta bin, and the existing theta arg is treated as the lower edge of the bin. If theta_max is not passed, then everything works as usual.

The unit tests are still in prep with help from @junzhou502 , but wanted to start this PR so I can at least check if the API is acceptable before I move further.

@coveralls
Copy link
Copy Markdown

coveralls commented May 21, 2026

Coverage Report for CI Build 26308510639

Coverage increased (+0.002%) to 97.473%

Details

  • Coverage increased (+0.002%) from the base build.
  • Patch coverage: 9 of 9 lines across 1 file are fully covered (100%).
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 6807
Covered Lines: 6635
Line Coverage: 97.47%
Coverage Strength: 4.87 hits per line

💛 - Coveralls

@DhayaaAnbajagane
Copy link
Copy Markdown
Author

With significant help from @junzhou502 , I've now included a benchmark against COCOA, which shows that our curved sky implementation agrees within 1% of COCOA's for various calculations of cosmic shear, GGL, and wtheta. This is the main benchmark we had in mind, and has now been completed on the CCL side. All other standard tests have passed as well.

From my vantage, this PR is now ready for review! @carlosggarcia

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants