brighterFatterCorrection¶
- lsst.ip.isr.brighterFatterCorrection(exposure, kernel, maxIter, threshold, applyGain, gains=None)¶
Apply brighter fatter correction in place for the image.
- Parameters:
- exposure
lsst.afw.image.Exposure
Exposure to have brighter-fatter correction applied. Modified by this method.
- kernel
numpy.ndarray
Brighter-fatter kernel to apply.
- maxIterscalar
Number of correction iterations to run.
- thresholdscalar
Convergence threshold in terms of the sum of absolute deviations between an iteration and the previous one.
- applyGain
Bool
If True, then the exposure values are scaled by the gain prior to correction.
- gains
dict
[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.
- exposure
- Returns:
Notes
This correction takes a kernel that has been derived from flat field images to redistribute the charge. The gradient of the kernel is the deflection field due to the accumulated charge.
Given the original image I(x) and the kernel K(x) we can compute the corrected image Ic(x) using the following equation:
Ic(x) = I(x) + 0.5*d/dx(I(x)*d/dx(int( dy*K(x-y)*I(y))))
To evaluate the derivative term we expand it as follows:
- 0.5 * ( d/dx(I(x))*d/dx(int(dy*K(x-y)*I(y)))
I(x)*d^2/dx^2(int(dy* K(x-y)*I(y))) )
Because we use the measured counts instead of the incident counts we apply the correction iteratively to reconstruct the original counts and the correction. We stop iterating when the summed difference between the current corrected image and the one from the previous iteration is below the threshold. We do not require convergence because the number of iterations is too large a computational cost. How we define the threshold still needs to be evaluated, the current default was shown to work reasonably well on a small set of images. For more information on the method see DocuShare Document-19407.
The edges as defined by the kernel are not corrected because they have spurious values due to the convolution.