setBadRegions

lsst.ip.isr.setBadRegions(exposure, badStatistic='MEDIAN')

Set all BAD areas of the chip to the average of the rest of the exposure

Parameters:
exposurelsst.afw.image.Exposure

Exposure to mask. The exposure mask is modified.

badStatisticstr, optional

Statistic to use to generate the replacement value from the image data. Allowed values are ‘MEDIAN’ or ‘MEANCLIP’.

Returns:
badPixelCountscalar

Number of bad pixels masked.

badPixelValuescalar

Value substituted for bad pixels.

Raises:
RuntimeError

Raised if badStatistic is not an allowed value.