maskDECamEdgeBleed#
- lsst.ip.isr.maskDECamEdgeBleed(exposure, satMinArea=10000, approachRows=20, nSigma=5.0, nRowsCheck=20, nRowsCheckShort=5, minUsablePixelsPerRow=30, minLowFraction=0.03, minLowFractionExtent=0.01, minBlockedRows=5, marginFraction=0.125, saturatedMaskName='SAT', log=None)#
Mask DECam-style edge bleeds with low rows next to the read register.
For each amplifier that contains a large saturated footprint reaching within
approachRowsof its read edge, this function identifies a dip using the per-row fraction of usable pixels more thannSigmabelow the clipped sky, measures how far the dip extends inward, and marks those rows (plus a margin) with the saturation mask plane.Rows next to the read edge that are unusable are the signature of a drained serial register, which the overscan correction flags as bad;
minBlockedRowsrows are also flagged, despite not having a dip measurement.Parameters#
- exposure
lsst.afw.image.Exposure Assembled exposure to mask.
- satMinArea
int, optional Minimum area (pixels) of a saturated footprint to be considered.
- approachRows
int, optional A saturated footprint must come within this many rows of the read edge to trigger the edge bleed check.
- nSigma
float, optional A pixel is “low” if it is more than this many sigma below sky.
- nRowsCheck
int, optional Number of rows from the read edge to check for an edge bleed dip.
- nRowsCheckShort
int, optional A second, shorter window from the read edge to check for a short edge bleed dip.
- minUsablePixelsPerRow
int, optional Minimum number of pixels not saturated, bad or missing to search for dips. Rows with fewer pixels may be “blocked” due to a drained register.
- minLowFraction
float, optional Mean fraction of usable pixels that are low, over either
nRowsCheckornRowsCheckShort, to confirm a dip.- minLowFractionExtent
float, optional Fraction of usable pixels that are low that each row must exceed to count toward the bleed height; the scan stops after five consecutive rows that do not. Should not exceed
minLowFraction.- minBlockedRows
int, optional Minimum number of blocked rows beyond the normal border at the read edge to be masked if found.
- marginFraction
float, optional Extra rows masked beyond the measured height, as a fraction of that height (plus one row).
- saturatedMaskName
str, optional Mask plane name for saturation.
- log
logging.Logger, optional Logger to handle messages.
Raises#
- RuntimeError
Raised if the exposure has no detector with amplifiers.
- exposure