Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-47385: Refine mask exclusion behavior in removeBadPixels (aka cancel original masks) #398

Merged
merged 1 commit into from
Nov 9, 2024

Conversation

mrawls
Copy link
Contributor

@mrawls mrawls commented Nov 8, 2024

In principle, convolution-induced mask growth may block some good sources near zeroed-out regions, so we switched to the original masked regions. Unfortunately in practice, bogus diaSources appeared near masked regions, so we are undoing this change and living with losing some edge-y diaSources.

@mrawls mrawls requested a review from isullivan November 8, 2024 08:32
Copy link
Contributor

@isullivan isullivan left a comment

Choose a reason for hiding this comment

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

One small but important change requested.

"""
badPixelMask = mask.getPlaneBitMask(self.config.excludeMaskPlanes)
badPixels = mask.subset(middle.getBBox()).array & badPixelMask > 0
badPixelMask = lsst.afw.image.Mask.getPlaneBitMask(self.config.excludeMaskPlanes)
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't set this back to what it was, since the global definition is not necessarily correct. Use middle.mask.getPlaneBitMask(..

In principle, convolution-induced mask growth may block some good sources near zeroed-out regions, so we switched to the original masked regions. Unfortunately in practice, bogus diaSources appeared near masked regions, so we are undoing this change and  living with losing some edge-y diaSources.
@mrawls mrawls merged commit 7ab3e17 into main Nov 9, 2024
2 checks passed
@mrawls mrawls deleted the tickets/DM-47385 branch November 9, 2024 02:07
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.

2 participants