Repository navigation
Tomographic SACC writers: one SACC per catalogue version, every statistic per bin pair - #447
Merged
Merged
Conversation
Co-Authored-By: GPT-6.1 Terra <noreply@openai.com>
Co-Authored-By: GPT-6.1 Terra <noreply@openai.com>
Co-Authored-By: GPT-6.1 Terra <noreply@openai.com>
Co-Authored-By: GPT-6.1 Terra <noreply@openai.com>
Co-Authored-By: GPT-6.1 Terra <noreply@openai.com>
Co-Authored-By: GPT-6.1 Terra <noreply@openai.com>
Co-Authored-By: GPT-6.1 Terra <noreply@openai.com>
Co-Authored-By: GPT-6.1 Terra <noreply@openai.com>
Co-Authored-By: GPT-6.1 Terra <noreply@openai.com>
Co-Authored-By: GPT-6.1 Terra <noreply@openai.com>
Co-Authored-By: GPT-6.1 Terra <noreply@openai.com>
Co-Authored-By: GPT-6.1 Terra <noreply@openai.com>
The PSF-only ρ shared across source bins was reused whenever its FITS and covariance existed, bypassing the measurement metadata check, so a cache from other means settings was republished. Drop the patched-correlation copy fed to estimate_multi_cov: TreeCorr builds jackknife realisations from the per-patch results, which the means pass leaves intact. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JK7o9FFN33ALe6iizjiJMa
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JK7o9FFN33ALe6iizjiJMa
cailmdaley
marked this pull request as ready for review
October 30, 2026 03:01
cailmdaley
added a commit
that referenced
this pull request
Oct 30, 2026
…entry A tomographic covariance reads cov_th.tomo (per-bin n_e, sigma_e) and the entry's multi-bin n(z). A non-tomographic covariance of an entry that declares shear.tomo_bin_col reads the whole-sample cov_th and the bin-summed n(z) written by nz_bin_sum. Without this, such an entry's non-tomographic covariance was silently built on the 4-bin n(z). From run/tomo1030 (80d2bc2, 5e5f313), without #432's pair-count inputs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JK7o9GEqa7euoocPk5aSTT
For an entry that declares shear.tomo_bin_col, a _tomo covariance without cov_th.tomo got single whole-sample n_e and sigma_e standing in for every bin. It now raises at DAG build. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JK7o9GEqa7euoocPk5aSTT
The whole-sample n(z) is the sum of the bins' columns, so each column must carry its bin's weight fraction. A file whose every column integrates to one would weight the bins equally; nz_bin_sum refuses it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JK7o9GEqa7euoocPk5aSTT
get_onecov_cat_params returns per-bin comma-separated strings for both sigma_e and n_e. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JK7o9GEqa7euoocPk5aSTT
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.
Every tomographic statistic now lands in one SACC file per catalogue version, and blinded tomographic catalogues are concealed rather than refused. This is the last step before tomographic cosmo_val can run on the blinded catalogues.
Relation to #402. #402 brought the tomographic pseudo-Cℓ measurement. Its output was per-pair FITS files, and cosmo_val refused to run it on a blinded catalogue (
_refuse_blinded_tomography). This PR adds the concealed per-pair SACC: the same measurement, sealed and blinded where it is computed.#306 did this for ξ± and its OneCovariance covariance. This PR does the same for pseudo-Cℓ, COSEBIs, pure-E/B and ρ/τ, and the assembly writes
{version}_tomo.saccnext to{version}.sacc.What changes
*_to_saccwriter takes(bins, payload)pairs, asxi_pairs_to_saccdoes. Each bin has onesource_itracer carrying its n(z). The data vector is pair-major in OneCovariance's order (0,0), (0,1), …; the order within a pair is as before.calculate_pseudo_cl. The per-pair FITS files and_refuse_blinded_tomographyare gone, and the measurement helpers are private, so raw spectra can't be returned from outside.(source_i, psf_stars).namaster_cl_covarianceputs the iNKA FITS into the part's order, asonecov_xi_covariancedoes for ξ±. Both read the order from the part's own point labels.{tomo_suffix}wildcard now reaches pseudo-Cℓ, COSEBIs, pure-E/B, ρ/τ and assembly. An empty suffix leaves every existing path unchanged.shear.tomo_bin_colgives its_tomocovariance the per-bin n(z) andcov_th.tomo(per-binn_e,sigma_e), and its whole-sample covariance the whole-samplecov_thand a bin-summed n(z) (localrulenz_bin_sum). A_tomocovariance of such an entry withoutcov_th.tomois refused at DAG build, so single whole-sample values never stand in for every bin. The per-bin n(z) are summed asCosmologyValidation.get_redshiftsums them, so each bin's column must integrate to its weight fraction; a file whose every column integrates to one is refused.Analysis choices
No ASTRA spec covers the data-vector layout yet, so the choices are recorded here.
Validation
estimate_multi_covin reversed pair order. One assembly test checks that every statistic's block sits at its own rows and that blocks across statistics are zero._tomo.sacc. The Blind leak gate: no cosmo_val run on a blinded catalogue writes an unblinded value #445 tests that asserted refusal now assert concealment.test_iotmpdir andtest_plot_workflowalso fail on develop); workflow DAG 19 passed. Two Sol reviews raised a public raw-spectrum path, a KeyError in a fresh covariance job, and stale ρ reuse; all three are fixed here. Mutation checks confirm the extended leak gate rejects unsealed tomographic signal.Layout of the tomographic analysis file (synthetic leak-gate run, 2 bins). The gate's ξ± and pseudo-Cℓ covariance inputs are diagonal stand-ins, so this shows where each block sits; the tests above check its values.
Blinding shift per bin pair on the tomographic pseudo-Cℓ_EE (synthetic twin catalogues, throwaway test blind). The shift grows with the pair's redshift because each pair is shifted with its own n(z). BB and EB are unchanged (|Δ| < 10⁻¹⁵).
The white τ₅+ rows in the layout figure are negative variances, about −2×10⁻⁹, that CovTauTh itself returns for one synthetic bin. The writer copies them unchanged. Real catalogues should be checked for the same.
Closes #376
🤖 Generated with Claude Code
https://claude.ai/code/session_01JK7o9FFN33ALe6iizjiJMa