maskDECamEdgeBleed#

lsst.ip.isr.maskDECamEdgeBleed(exposure, satMinArea=10000, satMaxArea=100000, approachRows=20, nSigma=5.0, nRowsCheck=20, minLowPixelsPerRow=30, minLowPixelsExtent=10, 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 approachRows of its read edge, this function confirms the dip from the per-row count of pixels more than nSigma below the clipped sky, measures how far the dip extends inward, and marks those rows (plus a margin) with the saturation mask plane.

Parameters#

exposurelsst.afw.image.Exposure

Assembled exposure to mask.

satMinAreaint, optional

Minimum area (pixels) of a saturated footprint to be considered.

satMaxAreaint, optional

Maximum area (pixels) of a saturated footprint to be considered.

approachRowsint, optional

A footprint must come within this many rows of the read edge.

nSigmafloat, optional

A pixel is “low” if it is more than this many sigma below sky.

nRowsCheckint, optional

Number of rows from the read edge used to confirm the bleed.

minLowPixelsPerRowint, optional

Mean number of low pixels per row over the check rows required to confirm the bleed.

minLowPixelsExtentint, optional

Number of low pixels a row must exceed to count toward the bleed height; the scan stops after five consecutive rows that do not. Should be smaller than minLowPixelsPerRow.

marginFractionfloat, optional

Extra rows masked beyond the measured height, as a fraction of that height (plus one row).

saturatedMaskNamestr, optional

Mask plane name for saturation.

loglogging.Logger, optional

Logger to handle messages.

Raises#

RuntimeError

Raised if the exposure has no detector with amplifiers.