Skip to content

ngmix: default centroid_source to "wcs" everywhere (code now matches runner behaviour) - #895

Open
cailmdaley wants to merge 3 commits into
developfrom
fix/centroid-default-wcs
Open

cailmdaley wants to merge 3 commits into
developfrom
fix/centroid-default-wcs

Conversation

@cailmdaley

Copy link
Copy Markdown
Contributor

The ngmix runner has defaulted to centroid_source="wcs" since 31ae736 (2026-06-30) whenever CENTROID_SOURCE is absent from the ini, but every Python signature still said "hsm" — reading the code, one concludes hsm is the default. This makes "wcs" the default at every level (Ngmix.__init__, make_ngmix_observation, do_ngmix_metacal, run_breakdown_grid.py) and keeps "hsm" as an explicit, documented opt-in; the hsm code path is untouched. Tests and validation scripts that build stamps without astrometry now pass centroid_source="hsm" explicitly, so behaviour is unchanged everywhere.

No production behaviour change. Also adds one line to CLAUDE.md noting that the test suite runs inside the deploy-image.yml build.

🤖 Generated with Claude Code

cailmdaley and others added 3 commits September 16, 2026 08:27
…cit opt-in

The ngmix_runner has fallen back to "wcs" when CENTROID_SOURCE is absent from
the ini since 31ae736 (2026-06-30), but every Python signature that takes
centroid_source (Ngmix.__init__, make_ngmix_observation, do_ngmix_metacal,
run_breakdown_grid.py) still defaulted to "hsm", so a collaborator reading the
code concluded hsm was the production default. This aligns every signature,
script default, and docstring on "wcs" as the default and documents its
semantics (catalogue sky position projected through the exposure WCS, the
same pixel/offset used to cut the stamp) versus "hsm" (legacy adaptive-moment
centroid from stamp pixels). Tests/validation scripts that build stamps
without astrometry (no wcs/ra/dec) now pass centroid_source="hsm" explicitly
so their behaviour is unchanged.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <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