Skip to content

Migrate ngmix PSF/shape column names (tracking shapepipe#761)#201

Draft
cailmdaley wants to merge 1 commit into
developfrom
migrate/ngmix-psf-column-names
Draft

Migrate ngmix PSF/shape column names (tracking shapepipe#761)#201
cailmdaley wants to merge 1 commit into
developfrom
migrate/ngmix-psf-column-names

Conversation

@cailmdaley

Copy link
Copy Markdown
Collaborator

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 an ESTIMATOR_COMPONENT_OBJECT grammar. This PR records and (when #761 lands) carries the downstream migration in sp_validation. Full plan committed at docs/ngmix_psf_column_migration.md.

Column map

{shear} ∈ {NOSHEAR, 1P, 1M, 2P, 2M}.

Old New Note
NGMIX_ELL_{shear} (2-vec) NGMIX_G1_GAL_{shear}, NGMIX_G2_GAL_{shear} ⚠ dim change (vector → 2 scalars)
NGMIX_T_{shear} (+_ERR) NGMIX_T_GAL_{shear} (+_ERR_GAL) gains _GAL (same for FLUX, FLAGS)
NGMIX_Tpsf_{shear} NGMIX_T_PSF_RECONV_{shear} value identical
NGMIX_ELL_PSFo_{shear}_0/_1 NGMIX_G1/G2_PSF_ORIG_{shear} ⚠⚠ value changed + dim split
NGMIX_T_PSFo_{shear} NGMIX_T_PSF_ORIG_{shear} ⚠⚠ value changed
r50, r50psf removed (never shipped)
NGMIX_MCAL_FLAGS, NGMIX_N_EPOCH, NGMIX_MOM_FAIL unchanged metadata

A mechanical rename would corrupt two things: the *_PSF_ORIG columns now carry a genuine original-PSF fit (the shapepipe#749 fix — re-validate α-leakage, don't assume), and ELL → G1/G2 is a dimensionality change, not a rename.

Consumer checklist (sp_validation @ develop)

PSF-leakage / calibration (the *_PSFo value change matters):

  • config/calibration/mask_v1.X.{2..11}.yaml (×10) — NGMIX_ELL_PSFo_NOSHEAR_0/_1NGMIX_G1/G2_PSF_ORIG_NOSHEAR
  • src/sp_validation/{calibration,cat,galaxy}.py

Size cuts / masking (Tpsf rename, value-safe):

  • cosmo_inference/scripts/masking.py, scripts/apply_alpha_snr_size_bin.py

Scripts / paper figures (verify each):

  • scripts/calibration/{calibrate_comprehensive_cat,extract_info,params}.py, scripts/examples/demo_*.py
  • papers/catalog/{2025_09_19_alpha_leakage_correction,hist_mag}.py, scratch/kilbinger/plot_binned_quantities.py

Unchanged (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_ORIG value change, don't assume a name-only swap).

— Claude on behalf of Cail

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>
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.

1 participant