Skip to content

Commit

Permalink
Add extra config for given camera Focal Plane unit
Browse files Browse the repository at this point in the history
As noted in FocalPlaneBackgroundConfig() "the focal plane frame is usually
defined in units of microns or millimetres rather than pixels. As such,
their values will need to be revised according to each particular camera."
The algorithm here was developed and battle-tested against HSC in the
context of a camera focal plane defined in "pixels", but it is meant to
accommodate FPs defined in other units.  It turns out one place -- the
setting of the threshold for the minimum number of pixels contributing
for a bin to be considered "good" -- was failing to accommodate FP units
other than "pixel".  This accommodation is made here by adding a config
defining the size of a detector pixel in the units for which the given
camera geoms focal plane is defined.
  • Loading branch information
laurenam committed Aug 21, 2019
1 parent 2e29e3d commit b695b7f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion python/lsst/pipe/drivers/background.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,7 @@ class FocalPlaneBackgroundConfig(Config):
"""
xSize = Field(dtype=float, doc="Bin size in x")
ySize = Field(dtype=float, doc="Bin size in y")
pixelSize = Field(dtype=float, default=1.0, doc="Pixel size in same units as xSize/ySize")
minFrac = Field(dtype=float, default=0.1, doc="Minimum fraction of bin size for good measurement")
mask = ListField(dtype=str, doc="Mask planes to treat as bad",
default=["BAD", "SAT", "INTRP", "DETECTED", "DETECTED_NEGATIVE", "EDGE", "NO_DATA"])
Expand Down Expand Up @@ -728,7 +729,8 @@ def getStatsImage(self):
"""
values = self._values.clone()
values /= self._numbers
thresh = self.config.minFrac*self.config.xSize*self.config.ySize
thresh = (self.config.minFrac*
(self.config.xSize/self.config.pixelSize)*(self.config.ySize/self.config.pixelSize))
isBad = self._numbers.getArray() < thresh
if self.config.doSmooth:
array = values.getArray()
Expand Down

0 comments on commit b695b7f

Please sign in to comment.