Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions python/lsst/drp/tasks/assemble_coadd.py
Original file line number Diff line number Diff line change
Expand Up @@ -1794,17 +1794,26 @@ def findArtifacts(self, templateCoadd, warpRefList, imageScalerList):

_ = self.maskStreaks.run(warpDiffExp)
streakMask = warpDiffExp.mask
spanSetStreak = afwGeom.SpanSet.fromMask(
initSpanSetStreak = 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):
spanSetStreak = []
for sset in initSpanSetStreak:
if self.config.doPreserveContainedBySource and templateFootprints is not None:
doKeep = True
for footprint in templateFootprints.positive.getFootprints():
if footprint.spans.contains(sset):
doKeep = False
break
if not doKeep:
continue
psfShape = psf.computeShape(sset.computeCentroid())
dilation = self.config.growStreakFp * psfShape.getDeterminantRadius()
sset_dilated = sset.dilated(int(dilation))
spanSetStreak[s] = sset_dilated
spanSetStreak.append(sset_dilated)

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