updateVariance

lsst.ip.isr.updateVariance(maskedImage, gain, readNoise, replace=True)

Set the variance plane based on the image plane.

The maskedImage must have units of adu (if gain != 1.0) or electron (if gain == 1.0). This routine will always produce a variance plane in the same units as the image.

Parameters:
maskedImagelsst.afw.image.MaskedImage

Image to process. The variance plane is modified.

gainscalar

The amplifier gain in electron/adu.

readNoisescalar

The amplifier read noise in electron/pixel.

replacebool, optional

Replace the current variance? If False, the image variance will be added to the current variance plane.