calibration.py (metacal estimator, ~line 792) and scripts/calibration/calibrate_comprehensive_cat.py (~line 194) carry a "FHP/MK hack" that overwrites the metacal NOSHEAR reconvolved-PSF size with the 1P value (NGMIX_T_PSF_RECONV_NOSHEAR ← NGMIX_T_PSF_RECONV_1P), used in the galaxy size cut and mirrored onto the output column (with the original kept as _NOSHEAR_orig).
This was a real workaround when written (introduced in b076413, Jan 2026; "finally fixed" in 5d22836) for an older ShapePipe catalog whose NOSHEAR value was wrong — the in-code comment is the only surviving rationale: "the ns PSF measured in shapepipe is not correct, fortunately it is the same dilated PSF as the other branches, thus we can simply use p1."
It is now a guaranteed no-op under the current stack:
- ngmix v2.4.0 builds one magnitude-dilated reconvolution PSF and reuses it for all metacal types (noshear literally reuses the 1p object) — the reconv-PSF size is identical across noshear/1p/1m/2p/2m by construction, in every psf mode.
- ShapePipe's ngmix module fits that reconv PSF once per object and broadcasts the same scalar into all five per-type columns (
ngmix.py:586–600; config psf='fitgauss') — so _NOSHEAR and _1P are bit-identical for every object.
- Confirmed empirically: on the fiducial sim tile, the preserved
_orig column is bit-identical to the hacked column.
Proposed change: remove both sites; drop the now-redundant _NOSHEAR_orig column; update the test_calibration.py note about the hack's stdout; replace the substitution with a one-line assert_array_equal(NOSHEAR, 1P) regression guard so any future producer-side divergence fails loudly instead of being silently patched. No current output changes.
Note for downstream readers (independent of the removal): the per-type NGMIX_T_PSF_RECONV_<TYPE> columns all carry the same object-level NOSHEAR-kernel value by design — the _1P/_2P labels are not physically distinct reconv-PSF measurements.
Full investigation (ngmix source trace, ShapePipe recorder trace, commit archaeology): available on request — findings summarized above.
— Fable, on behalf of Cail
calibration.py(metacal estimator, ~line 792) andscripts/calibration/calibrate_comprehensive_cat.py(~line 194) carry a "FHP/MK hack" that overwrites the metacal NOSHEAR reconvolved-PSF size with the 1P value (NGMIX_T_PSF_RECONV_NOSHEAR ← NGMIX_T_PSF_RECONV_1P), used in the galaxy size cut and mirrored onto the output column (with the original kept as_NOSHEAR_orig).This was a real workaround when written (introduced in
b076413, Jan 2026; "finally fixed" in5d22836) for an older ShapePipe catalog whose NOSHEAR value was wrong — the in-code comment is the only surviving rationale: "the ns PSF measured in shapepipe is not correct, fortunately it is the same dilated PSF as the other branches, thus we can simply use p1."It is now a guaranteed no-op under the current stack:
ngmix.py:586–600; configpsf='fitgauss') — so_NOSHEARand_1Pare bit-identical for every object._origcolumn is bit-identical to the hacked column.Proposed change: remove both sites; drop the now-redundant
_NOSHEAR_origcolumn; update thetest_calibration.pynote about the hack's stdout; replace the substitution with a one-lineassert_array_equal(NOSHEAR, 1P)regression guard so any future producer-side divergence fails loudly instead of being silently patched. No current output changes.Note for downstream readers (independent of the removal): the per-type
NGMIX_T_PSF_RECONV_<TYPE>columns all carry the same object-level NOSHEAR-kernel value by design — the_1P/_2Plabels are not physically distinct reconv-PSF measurements.Full investigation (ngmix source trace, ShapePipe recorder trace, commit archaeology): available on request — findings summarized above.
— Fable, on behalf of Cail