Skip to content

gh-268: including CMB lensing#422

Merged
gcanasherrera merged 18 commits into
mainfrom
feature/cmb-lensing
Apr 10, 2026
Merged

gh-268: including CMB lensing#422
gcanasherrera merged 18 commits into
mainfrom
feature/cmb-lensing

Conversation

@raphkou

@raphkou raphkou commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

🚀 Pull Request Checklist

✅ Summary

This PR allows computing CMB lensing power spectrum and cross-correlations with position and shear tracers.

🔄 Changes

  • I added a new observable cmb.py which allows computing CMB lensing window function.
  • I modified angular_two_point.py to compute CMB lensing power spectrum and cross-correlations. In particular, I modified the variable C_ell_out to handle the case where the tracers have different numbers of bins. This is the case of CMB lensing, which has only one redshift bin.
  • I modified several cosmology files (camb, class, jax) to compute z_star which is required to compute the CMB lensing window function.
  • I added a few unit tests in test_cmb.py, allowing to check the computation of the CMB lensing window function, power spectrum, and cross-correlations.

🛠 How to Test

I added the notebook cmb.ipynb in the playground (see PR cloe-org/playground#116), which shows how to compute the CMB lensing power spectrum and cross-correlations, and performs a benchmark against CAMB and CCL.

📝 Documentation

  • This PR updates documentation

🏗 Related Issues

Resolves #268.

📌 Additional Notes

Pseudo-cl computation not implemented yet.


✅ PR Checklist for Developers

  • I have titled this PR before merging as "gh-#:", where "#" represents the task it closes
  • I have run locally pre-commit using pre-commit run --all-files
  • I have tested my changes locally
  • No new warnings or errors introduced
  • I have updated documentation (if applicable)
  • My changes do not introduce breaking changes (i.e: the package still gets installed)
  • I have added unit tests (if applicable)
  • I have consistently updated the GitHub information for the project, including milestones, task types, and other relevant details.

✅ PR Checklist for Reviewers

  • The next PR targets the correct branch
  • CI tests have run and passed for the latest commit on the source branch
  • Check that the code can still be installed if new packages are imported
  • If necessary, the notebooks in the playground will be updated in a corresponding follow-up PR
  • Coverage percentage is retained or increased
  • Quality of new/changed code is acceptable
  • Quality of new/changed unit tests is acceptable
  • No data files have been included in the commits
  • Implementation follows the agreed task description point by point
  • Check that any added folder/file has been added to the README.md file
  • Check that the documentation has been updated accordantly
  • Check that the corresponding branch has been deleted after merging. If not, delete it

@raphkou raphkou linked an issue Feb 4, 2026 that may be closed by this pull request
3 tasks
@raphkou
raphkou marked this pull request as ready for review February 4, 2026 16:15
@arthurmloureiro arthurmloureiro added the cmb Tasks related to the cmb-x observables label Feb 5, 2026

@arthurmloureiro arthurmloureiro left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent stuff @raphkou !

Just a few questions and comments!

Comment thread cloelib/cosmology/derived_cosmology.py Outdated
Comment thread cloelib/observables/cmb.py
Comment thread cloelib/summary_statistics/angular_two_point.py
@gcanasherrera gcanasherrera added this to the v0.10 milestone Feb 5, 2026
@gcanasherrera gcanasherrera changed the title gh-268: Feature/cmb lensing gh-268: including CMB lensing Feb 5, 2026
Comment thread cloelib/cosmology/cosmology.py
@gcanasherrera gcanasherrera modified the milestones: v0.11, v0.10.1 Mar 21, 2026
@gcanasherrera

Copy link
Copy Markdown
Member

Hey @raphkou , I was reviewing this more in detail, and I guess it is fine the way that it is, but, could we please update the docs and make sure that we are compatible with numpy>2 before merging? Thanks

@raphkou

raphkou commented Apr 1, 2026

Copy link
Copy Markdown
Contributor Author

Hi @gcanasherrera, thanks for reviewing this PR. I have updated the code so that it is indeed compatible with numpy>2. It seems to be alright now.

@gcanasherrera

Copy link
Copy Markdown
Member

For Guada to remember: this is being well taken care of, just on hold due to holidays.

@gcanasherrera gcanasherrera added the priority For PM purposes label Apr 8, 2026

@gcanasherrera gcanasherrera left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many thanks @raphkou

@gcanasherrera

Copy link
Copy Markdown
Member

@all-contributors please add @raphkou for code, ideas, docs

@allcontributors

Copy link
Copy Markdown
Contributor

@gcanasherrera

I've put up a pull request to add @raphkou! 🎉

@gcanasherrera
gcanasherrera merged commit b26d310 into main Apr 10, 2026
7 checks passed
@gcanasherrera
gcanasherrera deleted the feature/cmb-lensing branch April 10, 2026 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cmb Tasks related to the cmb-x observables priority For PM purposes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement CMB Lensing Tracer

3 participants