gainContext

lsst.ip.isr.gainContext(exp, image, apply, gains=None)

Context manager that applies and removes gain.

Parameters:
explsst.afw.image.Exposure

Exposure to apply/remove gain.

imagelsst.afw.image.Image

Image to apply/remove gain.

applyBool

If True, apply and remove the amplifier gain.

gainsdict [str, float]

A dictionary, keyed by amplifier name, of the gains to use. If gains is None, the nominal gains in the amplifier object are used.

Yields:
explsst.afw.image.Exposure

Exposure with the gain applied.