Skip to content

Commit

Permalink
Add NO_DATA and EDGE mask plane where needed
Browse files Browse the repository at this point in the history
  • Loading branch information
r-owen committed Aug 19, 2015
1 parent e4bd6b3 commit 8300293
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion python/lsst/ip/diffim/diaSourceAnalysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class DiaSourceAnalystConfig(pexConfig.Config):
doc = """Mask planes that lead to an invalid detection.
Options: NO_DATA EDGE SAT BAD CR INTRP
E.g. : NO_DATA SAT BAD allows CR-masked and interpolated pixels""",
default = ("NO_DATA", "SAT", "BAD")
default = ("NO_DATA", "EDGE", "SAT", "BAD")
)
fBadPixels = pexConfig.Field(
dtype = float,
Expand Down
4 changes: 2 additions & 2 deletions python/lsst/ip/diffim/kernelCandidateQa.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ def _calculateStats(self, di, dof=0.):
mask = di.getMask()
maskArr = di.getMask().getArray()

# Create a mask using BAD,SAT,EDGE pixels. Keep detections
maskArr &= (mask.getPlaneBitMask("BAD")|mask.getPlaneBitMask("SAT")|mask.getPlaneBitMask("EDGE"))
# Create a mask using BAD, SAT, NO_DATA, EDGE bits. Keep detections
maskArr &= mask.getPlaneBitMask(["BAD", "SAT", "NO_DATA", "EDGE"])

# Mask out values based on maskArr
diArr = ma.array(di.getImage().getArray(), mask=maskArr)
Expand Down
4 changes: 2 additions & 2 deletions python/lsst/ip/diffim/psfMatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class DetectionConfig(pexConfig.Config):
dtype = str,
doc = """Mask planes that lead to an invalid detection.
Options: NO_DATA EDGE SAT BAD CR INTRP""",
default = ("NO_DATA", "SAT")
default = ("NO_DATA", "EDGE", "SAT")
)
fpNpixMin = pexConfig.Field(
dtype = int,
Expand Down Expand Up @@ -273,7 +273,7 @@ class PsfMatchConfig(pexConfig.Config):
dtype = str,
doc = """Mask planes to ignore when calculating diffim statistics
Options: NO_DATA EDGE SAT BAD CR INTRP""",
default = ("NO_DATA", "SAT")
default = ("NO_DATA", "EDGE", "SAT")
)
candidateResidualMeanMax = pexConfig.Field(
dtype = float,
Expand Down
1 change: 1 addition & 0 deletions src/KernelSolution.cc
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,7 @@ namespace diffim {
afwImage::MaskPixel bitMask =
(afwImage::Mask<afwImage::MaskPixel>::getPlaneBitMask("BAD") |
afwImage::Mask<afwImage::MaskPixel>::getPlaneBitMask("SAT") |
afwImage::Mask<afwImage::MaskPixel>::getPlaneBitMask("NO_DATA") |
afwImage::Mask<afwImage::MaskPixel>::getPlaneBitMask("EDGE"));

/* Create a Footprint that contains all the masked pixels set above */
Expand Down

0 comments on commit 8300293

Please sign in to comment.