Skip to content

Feature/305 adapt tomographic 2pcf script to sacc io format - #306

Draft
LisaGoh wants to merge 3 commits into
feature/sp_validation-extend-to-tomographyfrom
feature/305-adapt-tomographic-2pcf-script-to-sacc_io-format
Draft

Feature/305 adapt tomographic 2pcf script to sacc io format#306
LisaGoh wants to merge 3 commits into
feature/sp_validation-extend-to-tomographyfrom
feature/305-adapt-tomographic-2pcf-script-to-sacc_io-format

Conversation

@LisaGoh

@LisaGoh LisaGoh commented Aug 4, 2026

Copy link
Copy Markdown
Member

Closes #305. I've updated the real_space.py and run_2pcf.py scripts to write the xi_pm data vectors as sacc files, as well as the Snakemake workflow in twopoint.smk.

Some things that have been broken because of this change:

  • The plotting scripts cv_plot_2pcf.py and cv_ratio_xi_sys_xi.py are now deprecated since we shouldn't be plotting unblinded data vectors.
  • The cv_xi_txt rule in cosmo_val.smk is now redundant
  • Reading of the sacc file is also blocked as data_type='data' and there is no concealed=True stamp.

Note that the crazy number of changes to the repo is because I merged the develop branch into this branch

LisaGoh and others added 2 commits August 4, 2026 16:24
Add RealSpaceMixin.save_2pcf_sacc, which serialises the TreeCorr output of
calculate_2pcf_version into the sacc_io layout: the source_{i} n(z) tracers
and one xi+/xi- block per tomographic bin pair.

Serialising lives on the class because it needs the version's n(z) and its
tomographic bin map; run_2pcf.py only decides where the file goes, from the
sacc_path param under Snakemake and from --sacc on the CLI.

Insertion order is load-bearing: add_xi writes one pair as [xi+; xi-], so the
data vector is pair-major and the covariance is tied to it by position alone.
The bin pairs are sorted once and that list drives every subsequent loop.

Catalog bin ids are mapped to 0-based SACC indices from the ids actually
present, rather than by subtracting 1, so a catalog that starts elsewhere or
skips a bin still lands on the right source_{i} tracer. A mismatch between the
n(z) column count and the measured bin count raises: the columns are never
summed or truncated to make up the difference.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@LisaGoh
LisaGoh marked this pull request as draft August 5, 2026 08:33
@LisaGoh LisaGoh linked an issue Aug 5, 2026 that may be closed by this pull request
@LisaGoh
LisaGoh marked this pull request as ready for review August 6, 2026 09:37
@LisaGoh
LisaGoh marked this pull request as draft August 6, 2026 09:38
@LisaGoh
LisaGoh changed the base branch from feature/sp_validation-extend-to-tomography to develop August 6, 2026 10:25
@LisaGoh
LisaGoh changed the base branch from develop to feature/sp_validation-extend-to-tomography August 6, 2026 10:25
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.

Adapt tomographic 2PCF script to sacc_io format

1 participant