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-33888: Add config parameter to grow streak footprints #639

Merged
merged 2 commits into from
Apr 6, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 12 additions & 0 deletions python/lsst/pipe/tasks/assembleCoadd.py
Original file line number Diff line number Diff line change
Expand Up @@ -2012,6 +2012,11 @@ class CompareWarpAssembleCoaddConfig(AssembleCoaddConfig,
dtype=bool,
default=False
)
growStreakFp = pexConfig.Field(
doc="Grow streak footprints by this number multiplied by the PSF width",
dtype=float,
default=5
)

def setDefaults(self):
AssembleCoaddConfig.setDefaults(self)
Expand Down Expand Up @@ -2417,6 +2422,13 @@ def findArtifacts(self, templateCoadd, tempExpRefList, imageScalerList):
streakMask = warpDiffExp.mask
spanSetStreak = afwGeom.SpanSet.fromMask(streakMask,
streakMask.getPlaneBitMask(maskName)).split()
# Pad the streaks to account for low-surface brightness wings
psf = warpDiffExp.getPsf()
for s, sset in enumerate(spanSetStreak):
psfShape = psf.computeShape(sset.computeCentroid())
dilation = self.config.growStreakFp * psfShape.getDeterminantRadius()
sset_dilated = sset.dilated(int(dilation))
spanSetStreak[s] = sset_dilated

# PSF-Matched warps have less available area (~the matching kernel) because the calexps
# undergo a second convolution. Pixels with data in the direct warp
Expand Down