-
Notifications
You must be signed in to change notification settings - Fork 12
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-42087: Improve data masking and add utility function #386
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good, and most of my comments are doc clarifications
Parameters | ||
---------- | ||
line : `Line` | ||
Line for which to fine the endpoints. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line for which to fine the endpoints. | |
Line for which to find the endpoints. |
chi2: float = 0 | ||
modelMaximum: float = 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a description of these two attributes somewhere in the class doc string
(x, y) coordinates of the start and endpoints of the line. | ||
""" | ||
theta = line.theta * u.deg | ||
# Get where the line intersects with each line making up bounding box. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Get where the line intersects with each line making up bounding box. | |
# Determine where the line intersects with each edge of the bounding box. |
streaksMaskPlane = pexConfig.Field( | ||
doc="Name of mask plane holding detected streaks", | ||
dtype=str, | ||
default="STREAK" | ||
) | ||
badMaskPlanes = pexConfig.ListField( | ||
doc="Names of mask planes to use when masking out regions.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doc="Names of mask planes to use when masking out regions.", | |
doc="Names of mask plane regions to ignore entirely when doing streak detection.", |
@@ -479,7 +535,15 @@ def find(self, maskedImage): | |||
mask = maskedImage.mask | |||
detectionMask = (mask.array & mask.getPlaneBitMask(self.config.detectedMaskPlane)) | |||
|
|||
self.edges = self._cannyFilter(detectionMask) | |||
initEdges = self._cannyFilter(detectionMask) | |||
# Mask out edges of bad regions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Mask out edges of bad regions. | |
# Ignore regions with known bad masks, and add a one-pixel buffer around each. |
ac47215
to
c793daf
Compare
No description provided.