Migrate ngmix PSF/shape column names (tracking shapepipe#761)#201
Draft
cailmdaley wants to merge 1 commit into
Draft
Migrate ngmix PSF/shape column names (tracking shapepipe#761)#201cailmdaley wants to merge 1 commit into
cailmdaley wants to merge 1 commit into
Conversation
Downstream of CosmoStat/shapepipe#761, which makes the ngmix output columns a single source of truth (true original-PSF fit stored separately, ELL split into scalar G1/G2, ESTIMATOR_COMPONENT_OBJECT grammar). Captures the old->new column map and the sp_validation consumer checklist. Blocked on #761 landing. Co-Authored-By: Claude Opus 4.8 <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.
Draft / tracking PR — blocked on CosmoStat/shapepipe#761 (which lands in #741, ngmix v2.0).
shapepipe#761 makes the ngmix output columns a single source of truth — it restores a true original-PSF fit (stored alongside the reconvolved one), splits the 2-D ellipticity into scalar
G1/G2, and renames every ngmix column to anESTIMATOR_COMPONENT_OBJECTgrammar. This PR records and (when #761 lands) carries the downstream migration in sp_validation. Full plan committed atdocs/ngmix_psf_column_migration.md.Column map
{shear} ∈ {NOSHEAR, 1P, 1M, 2P, 2M}.NGMIX_ELL_{shear}(2-vec)NGMIX_G1_GAL_{shear},NGMIX_G2_GAL_{shear}NGMIX_T_{shear}(+_ERR)NGMIX_T_GAL_{shear}(+_ERR_GAL)_GAL(same forFLUX,FLAGS)NGMIX_Tpsf_{shear}NGMIX_T_PSF_RECONV_{shear}NGMIX_ELL_PSFo_{shear}_0/_1NGMIX_G1/G2_PSF_ORIG_{shear}NGMIX_T_PSFo_{shear}NGMIX_T_PSF_ORIG_{shear}r50,r50psfNGMIX_MCAL_FLAGS,NGMIX_N_EPOCH,NGMIX_MOM_FAILA mechanical rename would corrupt two things: the
*_PSF_ORIGcolumns now carry a genuine original-PSF fit (the shapepipe#749 fix — re-validate α-leakage, don't assume), andELL → G1/G2is a dimensionality change, not a rename.Consumer checklist (sp_validation @ develop)
PSF-leakage / calibration (the
*_PSFovalue change matters):config/calibration/mask_v1.X.{2..11}.yaml(×10) —NGMIX_ELL_PSFo_NOSHEAR_0/_1→NGMIX_G1/G2_PSF_ORIG_NOSHEARsrc/sp_validation/{calibration,cat,galaxy}.pySize cuts / masking (
Tpsfrename, value-safe):cosmo_inference/scripts/masking.py,scripts/apply_alpha_snr_size_bin.pyScripts / paper figures (verify each):
scripts/calibration/{calibrate_comprehensive_cat,extract_info,params}.py,scripts/examples/demo_*.pypapers/catalog/{2025_09_19_alpha_leakage_correction,hist_mag}.py,scratch/kilbinger/plot_binned_quantities.pyUnchanged (no action):
NGMIX_MOM_FAIL,NGMIX_MCAL_FLAGS,NGMIX_N_EPOCH.Sequencing
shapepipe#761 → #741 → regenerate a catalogue with the new columns → apply this migration → validate against the regenerated catalogue (confirm the
*_PSF_ORIGvalue change, don't assume a name-only swap).— Claude on behalf of Cail