Issue/78/sacc#91
Open
Lhior wants to merge 8 commits into
Open
Conversation
Collaborator
|
These changes look good, but could you update your branch to the main. |
Collaborator
|
Sorry. I didn't see this until now. |
eacharles
approved these changes
Mar 5, 2026
eacharles
left a comment
Collaborator
There was a problem hiding this comment.
Looks good. Please just rebase your branch against main before merging.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #91 +/- ##
===========================================
- Coverage 100.00% 99.87% -0.13%
===========================================
Files 15 16 +1
Lines 1447 1662 +215
===========================================
+ Hits 1447 1660 +213
- Misses 0 2 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
QP/SACC interface #78
There was no direct way to move redshift distributions n(z) between
qpEnsemble format (typical for RAIL pipelines) andsacc.Saccformat (used in cosmology analyses andPriorSacc). Based heavily on Jaime's nz_prior example.Solution
Implemented sacc_tools with RailStage converters and helpers:
QPToSACC– Converts n(z) from qp Ensemble files (one per tomographic bin) to a singlesacc.Sacccatalog with QPNZ tracers. Supports optional truth files and flexible input (list of paths or{tracer_name: file_path}).SACCToQP– Converts n(z) from a sacc catalog back to qp Ensemble files on disk, one per QPNZ tracer.normalize_hist()– Normalizes histogram PDFs so they integrate to 1.extract_tomographic_bins_from_sacc()– Extracts a tomographic bin structure from sacc catalogs.sacc_qp_interface_demo.ipynb) – Round-trip workflow using gold-baseline data provided by @eacharles during the Princeton sprint week. I think bin 0 is a little buggy from previous talks with Eric but can't remember if the culprit was identified (plotting script or the data file itself)tests/astro_tools/test_sacc_tools.py) – 26 tests for all public APIs.qp-prob>=1.0andsacc>=2.1topyproject.toml.Code Quality
#pragma: no cover; in the case of a bugfix, a new test that breaks as a result of the bug has been added