flatCorrection¶
- lsst.ip.isr.flatCorrection(maskedImage, flatMaskedImage, scalingType, userScale=1.0, invert=False, trimToFit=False)¶
Apply flat correction in place.
- Parameters:
- maskedImage
lsst.afw.image.MaskedImage
Image to process. The image is modified.
- flatMaskedImage
lsst.afw.image.MaskedImage
Flat image of the same size as
maskedImage
- scalingTypestr
Flat scale computation method. Allowed values are ‘MEAN’, ‘MEDIAN’, or ‘USER’.
- userScalescalar, optional
Scale to use if
scalingType='USER'
.- invert
Bool
, optional If True, unflatten an already flattened image.
- trimToFit
Bool
, optional If True, raw data is symmetrically trimmed to match calibration size.
- maskedImage
- Raises:
- RuntimeError
Raised if
maskedImage
andflatMaskedImage
do not have the same size or ifscalingType
is not an allowed value.