gainContext¶
- lsst.ip.isr.gainContext(exp, image, apply, gains=None, invert=False, isTrimmed=True)¶
Context manager that applies and removes gain.
- Parameters:
- exp
lsst.afw.image.Exposure
Exposure to apply/remove gain.
- image
lsst.afw.image.Image
Image to apply/remove gain.
- apply
bool
If True, apply and remove the amplifier gain.
- gains
dict
[str
,float
], optional A dictionary, keyed by amplifier name, of the gains to use. If gains is None, the nominal gains in the amplifier object are used.
- invert
bool
, optional Invert the gains (e.g. convert electrons to adu temporarily)?
- isTrimmed
bool
, optional Is this a trimmed exposure?
- exp
- Yields:
- exp
lsst.afw.image.Exposure
Exposure with the gain applied.
- exp