Firecrown likelihood for the tomographic ξ± layout + CAMB↔CCL cross-check#250
Closed
cailmdaley wants to merge 2 commits into
Closed
Firecrown likelihood for the tomographic ξ± layout + CAMB↔CCL cross-check#250cailmdaley wants to merge 2 commits into
cailmdaley wants to merge 2 commits into
Conversation
The blinding box's theory engine and its validation (PRD #241 §5). blinding_likelihood.py — a minimal firecrown Gaussian likelihood over the tomographic coarse ξ± subset of a sacc_io analysis file. Smokescreen (PR 6) calls only its compute_theory_vector to form the Muir et al. shift t(hidden)−t(fid). Generic over N source bins; extracts the coarse ξ± block (past COSEBIs/pseudo-Cℓ/ρ/τ) with its aligned covariance before handing to firecrown, as firecrown models every point it reads and Smokescreen requires sacc.mean == likelihood data vector. TheoryConfig is the single config surface for the fiducial cosmology + model choices (HMCode2020 via CAMB, NLA IA off by default, normal-hierarchy neutrinos), defaults mirroring the CosmoSIS v1.4.6.3 _A_cell fiducial. theory_vector_sacc_order realigns firecrown's statistic-ordered vector to SACC insertion order via sacc_indices, independent of statistic order. test_camb_ccl_crosscheck.py — firecrown+CCL vs an independent CAMB-P(k)→CCL path predict the same ξ± at fixed cosmology. Settles σ8-vs-A_s inside the test (CAMB A_s iterated to share CCL's σ8; nominal A_s is ~3% off). Observed: ξ+ 0.21% / ξ− 0.10% at fiducial, 0.25%/0.12% at a blind-sized offset; tolerances 0.5%/1.0%. Validates P(k)+amplitude consistency, not CCL's Limber+Hankel independently (documented). Observed green: likelihood 7 fast + 6 slow; cross-check 1 fast + 4 slow. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…10%) Adversarial review measured the fixture floor at xi+ 0.213% / xi- 0.102% - xi- tighter than xi+, inverting the old comment's ~0.3%/~0.6% claim and its rationale. Comments now state the observed floor; the looser xi- tolerance stays as prudential margin, said honestly. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016Ko89uZF84ez6HEDcTWbJe
This was referenced Jul 10, 2026
Collaborator
Author
|
Retiring this PR under the amended plan (see the plan-amendment comment on #241): the SACC/blinding stream now runs on the UNIONS-WL/Smokescreen fork, whose theory entry point is a plain This PR is to be closed without merging (close left to Cail). — Fable on behalf of Cail. |
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.
Closes #248. PR 5 of the PRD #241 series (row 5 of §7); stacked on #245 (
sacc_io).What
A minimal firecrown Gaussian ξ± likelihood (
sp_validation.blinding_likelihood) — the theory engine PR 6's Smokescreen will call — plus a CAMB↔CCL cross-check test validating that the two theory stacks agree on our binning. No blinding wiring in this PR (that's PR 6).Why
Smokescreen shifts the data by
t(hidden) − t(fiducial), computed through firecrown + CCL, while inference runs CosmoSIS + CAMB. The shift only means what we intend if the stacks agree at fixed cosmology (PRD #241 §5). The likelihood is the only code that knows the data vector's exact layout (bin pairs, θ grid), so itscompute_theory_vectoris how theory gets aligned element-wise with the data.How it works
{version}.sacc), extracting the coarse ξ± subset (past COSEBIs/pseudo-Cℓ/ρ/τ) with its aligned covariance — required, since firecrown models every point it reads and Smokescreen enforcessacc.mean == likelihood data vector.sacc_indices, independent of statistic listing order.TheoryConfigis the single config surface: fiducial cosmology + model choices, defaults mirroring the CosmoSIS v1.4.6.3_A_cellfiducial — S8=0.80, Ωm=0.30 (converted to CCL-native σ8/Ωc with the neutrino density correctly subtracted), Ωb=0.0469, h=0.70, nₛ=0.96, mν=0.06 eV, HMCode2020+feedback (logT_AGN=7.5) via CAMB, NLA wired but off by default (the shift nearly cancels IA; flipping to the inference stack's A=1.0 is one config value), normal-hierarchy neutrinos. The PRD's open fiducial choice changes config values, not code.Validated
19 tests. Likelihood: construction from a
sacc_iofile, theory-vector shape/determinism/SACC-alignment (order-independence pinned against a genuinely reversed statistic order), 2-bin N-generality, config fail-fast. Cross-check: firecrown+CCL vs an independent CAMB-P(k)→CCL path agree to 0.21% (ξ+) / 0.10% (ξ−) at fiducial and 0.25%/0.12% at a blind-sized offset (tolerances 0.5%/1.0%). The σ8-vs-A_s convention is settled inside the test — CAMB's A_s is iterated to share CCL's σ8 (a nominal A_s leaves σ8 ~3% off, which would blow the comparison to ~9–10%; the reconciliation is load-bearing and tested). The cross-check validates P(k)-recipe + amplitude consistency, not CCL's Limber+Hankel independently (both paths use it; documented in the module).An independent adversarial review before opening drove the full attack list empirically and found no correctness bugs (verdict: open as-is). Highlights: the Ωm↔(σ8, Ωc, Ων) conversion verified to 5 decimals through firecrown's own CCLFactory path; Smokescreen 1.5.6's actual loader driven end-to-end —
ConcealDataVectorconstruction,_verify_sacc_consistency, concealing-factor calculation and application all succeed against this module, with the applied shift exactly matching the theory difference; extract-covariance alignment stress-tested on a 3-pair file with non-contiguous insertion order. One review note for PR 6: Smokescreen's loader never passestheory_configoverrides — the module's defaults ARE the fiducial in the blinding path (overrides are reachable only from direct callers), and Smokescreen'sshifts_dictvalues replace parameters rather than add (its documented-vs-actual gotcha).Fast tests run in the default suite (~8 s); CCL/CAMB theory tests are
slowwith a fast smoke variant. Full fast suite green up to the two known pre-existing environmental failures (candide data paths from a worktree; snakemake absent from the local venv), both confirmed present at the base commit with this PR's files absent.— Claude (Fable, with Opus implementation agents) on behalf of Cail.
🤖 Generated with Claude Code
https://claude.ai/code/session_016Ko89uZF84ez6HEDcTWbJe