Feature/305 adapt tomographic 2pcf script to sacc io format - #306
Draft
LisaGoh wants to merge 3 commits into
Draft
Conversation
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>
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
LisaGoh
marked this pull request as draft
August 5, 2026 08:33
LisaGoh
marked this pull request as ready for review
August 6, 2026 09:37
LisaGoh
marked this pull request as draft
August 6, 2026 09:38
LisaGoh
changed the base branch from
feature/sp_validation-extend-to-tomography
to
develop
August 6, 2026 10:25
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>
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 #305. I've updated the
real_space.pyandrun_2pcf.pyscripts to write the xi_pm data vectors as sacc files, as well as the Snakemake workflow intwopoint.smk.Some things that have been broken because of this change:
cv_plot_2pcf.pyandcv_ratio_xi_sys_xi.pyare now deprecated since we shouldn't be plotting unblinded data vectors.cv_xi_txtrule incosmo_val.smkis now redundantdata_type='data'and there is noconcealed=Truestamp.Note that the crazy number of changes to the repo is because I merged the develop branch into this branch