darkCorrection

lsst.ip.isr.darkCorrection(maskedImage, darkMaskedImage, expScale, darkScale, invert=False, trimToFit=False)

Apply dark correction in place.

Parameters:
maskedImage : lsst.afw.image.MaskedImage

Image to process. The image is modified by this method.

darkMaskedImage : lsst.afw.image.MaskedImage

Dark image of the same size as maskedImage.

expScale : scalar

Dark exposure time for maskedImage.

darkScale : scalar

Dark exposure time for darkMaskedImage.

invert : Bool, optional

If True, re-add the dark to an already corrected image.

trimToFit : Bool, optional

If True, raw data is symmetrically trimmed to match calibration size.

Raises:
RuntimeError

Raised if maskedImage and darkMaskedImage do not have the same size.

Notes

The dark correction is applied by calculating:
maskedImage -= dark * expScaling / darkScaling