backgroundFlatContext#
- lsst.meas.algorithms.backgroundFlatContext(maskedImage, doApply, backgroundToPhotometricRatio=None)#
Context manager to convert from photometric-flattened to background- flattened image.
Parameters#
- maskedImage
lsst.afw.image.MaskedImage Masked image (image + mask + variance) to convert from a photometrically flat image to an image suitable for background subtraction.
- doApply
bool Apply the conversion? If False, this context manager will not do anything.
- backgroundToPhotometricRatio
lsst.afw.image.Image, optional Image to multiply a photometrically-flattened image by to obtain a background-flattened image. Only used if
doApplyisTrue.
Yields#
- maskedImage
lsst.afw.image.MaskedImage Masked image converted into an image suitable for background subtraction.
Raises#
RuntimeError if doApply is True and no ratio is supplied. ValueError if the ratio is not an
lsst.afw.image.Image.- maskedImage