Skip to content

Implementation of corrections for projection effects [version:1.0.11]#88

Open
eduardojsbarroso wants to merge 13 commits into
mainfrom
projection_pr
Open

Implementation of corrections for projection effects [version:1.0.11]#88
eduardojsbarroso wants to merge 13 commits into
mainfrom
projection_pr

Conversation

@eduardojsbarroso

Copy link
Copy Markdown
Collaborator

This PR adds support for projection effects in CROW, including a Costanzi-style projected richness model and an optional projection-induced lensing profile correction for stacked DeltaSigma predictions.

Main Changes:

  • Added a new crow.cluster_modules.projection_effects module.
  • Implemented CostanziBaseModel, CostanziBinned, and CostanziUnBinned for projected observed-richness probabilities.
  • Added CostanziLensingBias / bsel for multiplicative selection-bias corrections to stacked DeltaSigma profiles.
  • Extended binned recipes to optionally apply lensing profile corrections after stack integration.
  • Added projection-effect grid construction and caching to GridBinnedClusterRecipe.
  • Added a projection tutorial notebook: notebooks/run_projection.ipynb.
  • Added and expanded tests for projection probabilities, projected counts, grid caching, and DeltaSigma correction behavior.

Implementation Notes:

  • The richness projection model follows the Costanzi projection-effect formalism.
  • The lensing profile correction is explicitly restricted to DeltaSigma predictions and raises an error for reduced shear.
  • Radius conversion for the lensing correction is explicit: either comoving Mpc/h input or physical Mpc converted using reference redshift and h.

yuriuno and others added 13 commits May 22, 2026 19:15
Add Costanzi19 projection model and binned_grid skeleton
…py. Add function comments. Clean the code by isort and black
Implement Costanzi binned and unbinned projection-effect probability calculations for Gaussian richness-mass relations. Add recipe support for projection-effect grid construction and cache handling.

Update tests for binned probabilities, unbinned PDFs, mass-redshift meshing, and projection recipe grid construction.
@github-actions github-actions Bot changed the title Implementation of corrections for projection effects Implementation of corrections for projection effects [version:1.0.11] Jun 19, 2026
@codecov

codecov Bot commented Jun 19, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.53179% with 18 lines in your changes missing coverage. Please review.
✅ Project coverage is 97.99%. Comparing base (82846b4) to head (2a3bdc0).

Files with missing lines Patch % Lines
...cluster_modules/projection_effects/lensing_bias.py 83.60% 10 Missing ⚠️
crow/recipes/binned_grid.py 87.09% 4 Missing ⚠️
crow/recipes/binned_parent.py 88.23% 2 Missing ⚠️
...row/cluster_modules/projection_effects/costanzi.py 99.31% 1 Missing ⚠️
tests/test_recipe_binned_counts.py 98.59% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #88      +/-   ##
==========================================
- Coverage   98.41%   97.99%   -0.42%     
==========================================
  Files          28       32       +4     
  Lines        1826     2341     +515     
  Branches       60       89      +29     
==========================================
+ Hits         1797     2294     +497     
- Misses         29       47      +18     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

3 participants