Skip to content

Commit

Permalink
Set NOT_DEBLENDED_MASK for skipped parents
Browse files Browse the repository at this point in the history
  • Loading branch information
fred3m committed Jun 1, 2022
1 parent 851fa13 commit ebbf47b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions python/lsst/meas/extensions/scarlet/scarletDeblendTask.py
Original file line number Diff line number Diff line change
Expand Up @@ -1125,6 +1125,13 @@ def deblend(self, mExposure, catalog):
# Clear the cached values in scarlet to clear out memory
scarlet.cache.Cache._cache = {}

# Update the mExposure mask with the footprint of skipped parents
if self.config.notDeblendedMask:
for mask in mExposure.mask:
for parentIndex in skippedParents:
fp = catalog[parentIndex].getFootprint()
fp.spans.setMask(mask, mask.getPlaneBitMask(self.config.notDeblendedMask))

self.log.info("Deblender results: of %d parent sources, %d were deblended, "
"creating %d children, for a total of %d sources",
nParents, nDeblendedParents, len(catalog)-nParents, len(catalog))
Expand Down

0 comments on commit ebbf47b

Please sign in to comment.