Repository navigation
b_modes: work from plain arrays; fix the MC pure-E/B covariance - #351
Merged
Merged
Conversation
calculate_pure_eb_correlation returns a self-describing results dict (theta, bin edges, xi+/- on both grids, n_eff) in place of the gg/gg_int objects, so calculate_eb_statistics, the plot helpers and save_pure_eb_results work from values alone. New seams: bins_from_edges, log_bin_edges, pure_eb_from_xi, pure_eb_covariance_mc and cosebis_scan_from_xi. The pure-E/B .npz stores n_eff (the realisation count behind the covariance) instead of npatch. Callers in cosmo_val, the bmodes calculate_pure_eb_ptes script, its claims rule and PTE sweep driver are adapted. No numbers change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HeMhD6yCyrgBz5oz87bCtR
cs_util's get_theo_xi returns {pair: (xi+, xi-)}, so concatenating its
return value raised TypeError and the semi-analytic pure-E/B covariance
(pure_eb_covariance_mc, and the paper's precompute_pure_eb_chunk.py) could
not run. One n(z) is one tracer pair: unpack that single entry, which also
fails loudly if a tomographic n(z) is passed. The new test stubs the
kernel and checks the draws centre on the binned theory mean.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HeMhD6yCyrgBz5oz87bCtR
cailmdaley
added a commit
that referenced
this pull request
Sep 25, 2026
…val-sacc Brings in #351 (b_modes arrays API + get_theo_xi unpack) and #352 (dead scripts, doc paths). b_modes.py and test_b_modes.py resolve to develop's side, which is this branch's version plus the unpack fix and its test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HeMhD6yCyrgBz5oz87bCtR
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
b_modes.pynow works from plain arrays instead of TreeCorrGGCorrelationobjects. This is the part of #251 that doesn't depend on SACC, split out so #251's diff covers only the SACC migration. #251 is built on top of this PR.calculate_pure_eb_correlationreturns a dict that carries everything its consumers need: θ, bin edges, ξ± on both grids, andn_eff.calculate_eb_statistics, the plot helpers andsave_pure_eb_resultsread from that dict. New array helpers:bins_from_edges,log_bin_edges,pure_eb_from_xi,pure_eb_covariance_mc,cosebis_scan_from_xi.cosmo_val, pure E/B, COSEBIs andsummarize_bmodes. In the bmodes paper,calculate_pure_eb_ptes.py, its claims rule, andrun_pure_eb_ptes_sweep.sh(which passed flags the script no longer accepts). The pure-E/B.npzkeynpatchis nown_eff; nothing reads it.get_theo_xireturns{pair: (ξ+, ξ−)}, so the Monte Carlo pure-E/B covariance raisedTypeErrorondevelop(inb_modesand in the paper'sprecompute_pure_eb_chunk.py). It now unpacks the single pair. A new test covers it.No numbers change. On the same synthetic inputs,
develop's and this branch'sb_modesagree bit-for-bit in 162 of 162 comparisons. These covered COSEBIs with both jackknife and analytic covariances, the PTE matrices, and a seeded MC covariance; the MC comparison ran with the unpack fix applied todevelop.— Claude (Opus) on behalf of Cail.
🤖 Generated with Claude Code
https://claude.ai/code/session_01HeMhD6yCyrgBz5oz87bCtR