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-42087: Improve data masking and add utility function #386

Merged
merged 1 commit into from
Sep 13, 2024

Conversation

cmsaunders
Copy link
Contributor

No description provided.

Copy link
Contributor

@mrawls mrawls left a 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.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Line for which to fine the endpoints.
Line for which to find the endpoints.

Comment on lines 50 to 53
chi2: float = 0
modelMaximum: float = 0
Copy link
Contributor

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.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# 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.",
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
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.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# Mask out edges of bad regions.
# Ignore regions with known bad masks, and add a one-pixel buffer around each.

@cmsaunders cmsaunders merged commit 5a0bb51 into main Sep 13, 2024
2 checks passed
@cmsaunders cmsaunders deleted the tickets/DM-42087 branch September 13, 2024 18:45
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