Skip to content

Cluster counts pk3pt - #1315

Open
rreischke wants to merge 2 commits into
masterfrom
cluster_counts_pk3pt
Open

rreischke wants to merge 2 commits into
masterfrom
cluster_counts_pk3pt

Conversation

@rreischke

Copy link
Copy Markdown
Contributor

Summary

Halo-model ingredients for the covariance between angular power spectra $C_\ell$ and the number counts of selected halos (e.g., clusters), based on Takada & Bridle (2007).

New API

  • halos.HaloProfileSelection(mass_def, selection, f_off=0, r_off=0): a point-like profile of selected halos, where selection(M, a) is the selection probability. Mass–observable scatter and redshift bins enter through selection. Optional miscentering: 2D Gaussian offset with dispersion r_off·R_Δ.
  • halos.Profile2ptSelection(joint_selection=None): the 1-halo two-point moment of selected halos. It returns $S$ for the same selection, and a user-supplied joint selection $S_{12}$ for different selections (e.g. 0 for disjoint bins).
  • HMCalculator.I_0_3: analogous to I_1_3.
  • halos.halomod_bispectrum_squeezed and halos.halomod_Pk2D_bispectrum_squeezed: the 1h + 2h squeezed bispectrum.
  • halos.halomod_bispectrum_squeezed_SSC and halos.halomod_Pk2D_bispectrum_squeezed_SSC: the super-sample term, $I^1_1(N),\partial P_{uv}/\partial\delta_L$. It uses the same response as halomod_Tk3D_SSC, including the number-count counter-terms.
  • angular_cl_cov_counts and angular_cl_cov_counts_SSC: the projected covariances.
    • The local part is angular_cl(B) / (4π f_sky).
    • The SSC part is a Limber integral.
    • Both take fsky and sigma2_B in the same way as angular_cl_cov_SSC.

Validation (pyccl/tests/test_pk3pt.py)

  • Reproduces the plots in Takada & Bridle by eye
  • Consistency: with $S = M/\bar\rho_m$, the SSC term equals the halomod_Tk3D_SSC response, both for NFW and for HOD with counter-terms.
  • Output shapes, both Pk2D wrappers, $\sigma^2_B$ passed as arrays, and the error paths are also tested.
  • Tested against OneCovariance

@coveralls

coveralls commented Oct 26, 2026 •

Copy link
Copy Markdown

Coverage Report for CI Build 40332004325

Coverage decreased (-0.04%) to 97.431%

Details

  • Coverage decreased (-0.04%) from the base build.
  • Patch coverage: 8 uncovered changes across 2 files (200 of 208 lines covered, 96.15%).
  • No coverage regressions found.

Uncovered Changes

File Changed Covered %
pyccl/halos/pk_3pt.py 115 108 93.91%
pyccl/halos/halo_model.py 10 9 90.0%
Total (7 files) 208 200 96.15%

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 7006
Covered Lines: 6826
Line Coverage: 97.43%
Coverage Strength: 4.87 hits per line

💛 - Coveralls

@carlosggarcia

Copy link
Copy Markdown
Collaborator

Question: is the test against OneCovariance in the PR? I couldn't find it. Before merging, we should add a benchmark against a external code.

This branch has not been deployed

No deployments
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