Skip to content

DM-53933: Fix crash when healpix pixelization is used with a nearly-degenerate polygon.#96

Merged
erykoff merged 3 commits intomainfrom
tickets/DM-53933
Jan 28, 2026
Merged

DM-53933: Fix crash when healpix pixelization is used with a nearly-degenerate polygon.#96
erykoff merged 3 commits intomainfrom
tickets/DM-53933

Conversation

@erykoff
Copy link
Contributor

@erykoff erykoff commented Jan 26, 2026

Checklist

  • ran Jenkins
  • added a release note for user-visible changes to doc/changes

@@ -0,0 +1 @@
Fixed crash that could occur when a nearly degenerate polygon was used with healpix pixelization.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for adding a news fragment. We've never really done that in this package before. Can you please fix the file name so it follows the towncrier convention of DM-53933.bugfix.md ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR template says to add a note! But there were no notes already there to remind me what the format was. Anyway, the filename has been fixed.

Copy link
Contributor

@fred3m fred3m left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just one comment/question regarding the implementation.

retry = True

if retry:
pixels = self._interior_pixels_from_region(nside, region.getBoundingCircle())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the advantage of using the retry variable here as opposed to just setting pixels = self._interior_pixels_from_region(nside, region.getBoundingCircle()) in the except block?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was afraid of something going wrong with recursion inside a try/except but maybe that's just superstition.

@erykoff erykoff merged commit 202068a into main Jan 28, 2026
24 checks passed
@erykoff erykoff deleted the tickets/DM-53933 branch January 28, 2026 16:52
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.

3 participants