make_cat: remove the dead galsim shape-serialization path#784
Open
cailmdaley wants to merge 3 commits into
Open
make_cat: remove the dead galsim shape-serialization path#784cailmdaley wants to merge 3 commits into
cailmdaley wants to merge 3 commits into
Conversation
ShapePipe has no galsim shape-measurement runner -- only ngmix_runner measures shapes and writes NGMIX_* columns. The galsim family in make_cat (_save_galsim_shapes, the process() "galsim" branch) could only be populated by reading an external shape catalogue that nothing in the pipeline produces; every production config pins SHAPE_MEASUREMENT_TYPE = ngmix. #761 renamed these columns onto the v2 grammar, but they are not creatable end-to-end -- confirmed from the sp_validation side, where the mirror galsim consumer was removed as dead code (sp_validation #201). Remove the dormant writer rather than carry grammar-renamed columns no pipeline can exercise. - delete SaveCatalogue._save_galsim_shapes and its process() "galsim" dispatch branch; process modes are now "ngmix" or "psf" - drop the now-orphaned cs_util.size import (only the galsim block used it) - delete tests/module/test_galsim_grammar_properties.py, which drove the removed writer Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0191bMtgT2gcmcT7fNYbGLS1
ngmix is now the pipeline's only shape estimator, so make_cat_runner validates SHAPE_MEASUREMENT_TYPE against ngmix alone and raises on anything else. The knob is kept (rather than hardcoded) as the extension point for a future estimator family, mirroring sp_validation's retained `prefix`. The shape-write loop drops the galsim-vs-ngmix catalogue selection -- shapes are always read from the single ngmix input. Docstring and the cat_matched.param comment lose their galsim references. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0191bMtgT2gcmcT7fNYbGLS1
The static grammar test covered ngmix, galsim, and HSM. With the galsim writer gone, drop its regex branch and its valid/invalid example columns; the frozen grammar now spans the two families ShapePipe actually produces (ngmix, HSM). Also drop the docstring pointer to the deleted test_galsim_grammar_properties.py. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0191bMtgT2gcmcT7fNYbGLS1
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.
Removes
make_cat's galsim shape-serialization path, which is dead code: no runner produces galsim shapes (there is nogalsim_shapes_runner), the dual-shapelen==5input branch never fires, and ngmix is the pipeline's only shape estimator.Carved out of #761 per Axel's 2026-07-02 review — the galsim removal has nothing to do with the reconvolved-PSF column grammar that #761 is about, and bundling it in was exactly the "too many things at once" he flagged.
Changes
_save_galsim_shapes()frommake_cat.pySHAPE_MEASUREMENT_TYPEtongmixinmake_cat_runner(the knob is kept, not hardcoded, as the extension point for a future estimator family — mirroring sp_validation's retainedprefix); drop the galsim/shape2 catalogue selection in the shape-write looptests/module/test_galsim_grammar_properties.pyand drop the galsim case from the frozen column-grammar examplescat_matched.paramcommentNet: −431 lines, no behaviour change (the removed path never executed).
Base / stacking
Based on
refactor/psf-column-grammar(#761), notngmix_v2.0, because the removal deletestest_galsim_grammar_properties.py— a test that #761 introduces — so it only applies cleanly on top of #761. Retarget tongmix_v2.0once #761 merges; GitHub will then show just these three commits.Tests
Full
tests/modulesuite green in the dev container (100 passed; the 11 fewer than #761 are the deleted galsim-grammar module).Closes #783
— Claude on behalf of Cail