Skip to content

make_cat: remove the dead galsim shape-serialization path#784

Open
cailmdaley wants to merge 3 commits into
ngmix_v2.0from
refactor/remove-galsim-shape-path
Open

make_cat: remove the dead galsim shape-serialization path#784
cailmdaley wants to merge 3 commits into
ngmix_v2.0from
refactor/remove-galsim-shape-path

Conversation

@cailmdaley

Copy link
Copy Markdown
Contributor

Removes make_cat's galsim shape-serialization path, which is dead code: no runner produces galsim shapes (there is no galsim_shapes_runner), the dual-shape len==5 input 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

  • delete _save_galsim_shapes() from make_cat.py
  • restrict SHAPE_MEASUREMENT_TYPE to ngmix in make_cat_runner (the knob is kept, not hardcoded, as the extension point for a future estimator family — mirroring sp_validation's retained prefix); drop the galsim/shape2 catalogue selection in the shape-write loop
  • delete tests/module/test_galsim_grammar_properties.py and drop the galsim case from the frozen column-grammar examples
  • remove galsim references from the docstring and the cat_matched.param comment

Net: −431 lines, no behaviour change (the removed path never executed).

Base / stacking

Based on refactor/psf-column-grammar (#761), not ngmix_v2.0, because the removal deletes test_galsim_grammar_properties.py — a test that #761 introduces — so it only applies cleanly on top of #761. Retarget to ngmix_v2.0 once #761 merges; GitHub will then show just these three commits.

Tests

Full tests/module suite 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

cailmdaley and others added 3 commits July 3, 2026 18:58
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
@cailmdaley cailmdaley changed the base branch from refactor/psf-column-grammar to ngmix_v2.0 July 3, 2026 18:28
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