Skip to content

Merge the tomography branch into develop #375

Open
1 of 2 issues completed
Open

Description

@cailmdaley

develop (D) and feature/sp_validation-extend-to-tomography (T) have diverged since #249.

New D fixes keep landing on the old API (#366, #372). This epic brings the two lines back together.

Merge order and review gates

Step What Lands on Merges once State
1 Pause D PRs that touch the analysis code (cosmo_val/{pseudo_cl,real_space,psf_systematics,pure_eb}.py, rho_tau.py, pseudo_cl.py); #366 and #367 wait — — lifted
2a #253 (blinding) D Sacha approves. It is independent of T and already approved by Lisa. merged (cf9010c) after merging develop in; blinded catalogues refuse tomographic pairs until tomographic SACC parts exist (#376)
2b #307 (tomographic leakage) T Cail approves (it is Sacha's PR). merged
3 Merge D into T, porting #366 and #367 (#374) T Sacha approves, and Lisa approves the real-space/ξ± part. merged (2ff1b50)
4 Merge T into D, then retire T D Cail approves. It contains only what steps 2b and 3 already reviewed. merged (#402, 5d9ef27)
5 Rebase #306 and #256 onto D D Normal review. #306 extends D's xi_to_sacc to tomographic bins rather than adding a second writer. unblocked: rebase onto D

T is retired once #306, #256 and #399 are retargeted to D. #366 and #367 are closed: their content arrived through #394.

#372 is closed: T already has that fix.

— Claude on behalf of Cail

Activity

  1. LisaGoh commented on Oct 20, 2026

    @LisaGoh
    Member

    With the previous merges into develop and the work on defining the sacc output format, #256 and #306 have become quite messy and their scopes overlap with some of what has already been done in develop. I ran Claude to try to disentangle everything, and this was what we worked out together:

    Step 5: how #256 and #306 split, and the path to tomographic real-space 2PCFs in SACC

    The two PRs are split by product: #256 computes the covariance, #306 builds the data vector and writes both into SACC. They only meet through a shared naming and bin-order contract.

    #256 (covariance) #306 (data vector + SACC)
    Produces OneCovariance ξ± matrix .dat (CosmoCov removed) one SACC file with ξ± per bin pair, carrying the OneCovariance covariance
    Files rules/covariance.smk, common.py real_space.py, run_2pcf.py, rules/twopoint.smk, sacc_writers.py / assemble_sacc.py
    Tomography {tomo_suffix} = _tomo {tomo_suffix} = _tomo
    State develop merged in; dry runs pass to merge develop, then rescope to tomographic SACC (#376)

    #306 takes on the OneCovariance → SACC step. #256 stops at the dense .dat matrix. #306 extends xi_to_sacc to tomographic bins, and also reads the OneCovariance matrix into the SACC covariance block in the same bin-pair order. It replaces the jackknife/shot-noise estimate in the analysis file, as assemble_sacc does today for the non-tomographic case.

    The contract between the two

    • Same _tomo suffix in both file names.
    • Bin-pair order (1,1), (1,2), …, (n,n) (itertools.combinations_with_replacement over bin IDs > 0), ξ+ then ξ−, by θ, in both the SACC data points and the covariance.
    • Per-bin n(z) from the same multi-column file: the catalogue entry's shear.redshift_path.

    Workflow once both land

    1. Catalogue entry in cat_config.yaml:
      • shear.tomo_bin_col, a multi-column shear.redshift_path, per-bin cov_th values;
      • blind: set.
    2. Data vector: rule xi → run_2pcf.py → calculate_2pcf_version(compute_tomography=True) measures every bin pair with TreeCorr → …_npatch=…_tomo.sacc.
    3. Covariance: covariance_tomo → covariance_ini writes the OneCovariance .ini → covariance_run → covariance_…_tomo.dat.
    4. SACC (Feature/305 adapt tomographic 2pcf script to sacc io format #306): the OneCovariance matrix goes into the SACC covariance block, and the part is sealed under the catalogue's blind.
    5. Inference reads the single SACC file.

    Merge order

    1. Add tomographic and 3x2pt covariance realspace measurement #256: covariance (OneCovariance replaces CosmoCov). It also adds the tomo_suffix / npatch wildcard constraints both PRs use.
    2. Feature/305 adapt tomographic 2pcf script to sacc io format #306: merge develop; tomographic ξ± → SACC, extending xi_to_sacc (Tomographic SACC writers: one tracer and n(z) per bin #376), plus the OneCovariance .dat → SACC covariance step.
    3. 3x2pt (γ_t, w(θ) and their covariance): deferred until there is a lens sample; separate issue.

    TO-DO: we can open a separate issue to tackle the 3x2pt part!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions