Details
-
Type:
Bug
-
Status: Done
-
Resolution: Done
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Story Points:5
-
Epic Link:
-
Sprint:AP F20-2 (July), AP F20-6 (November), AP S21-2 (January)
-
Team:Alert Production
-
Urgent?:No
Description
In DM-24371, the implemented afterburner correction implicitly assumes that the matching kernel is sum == 1 which is not usually the case, especially without scaling the science and reference image values by their photometric calibration.
- The afterburner correction does not sum to 1, which changes the fluxes of the difference image (or shift its photometric scale).
- The variance plane calculation of the afterburned difference image is scaled to the level of var1+var2 which is incorrect if the matching kernel contains flux rescaling, i.e. not sum == 1.
- The same consideration is required to support a preconvolution kernel, though it needs further investigation to determine the statistical meaning of an afterburned preconvolved image.
- Also, this causes the corrected PSF not to be automatically sum == 1, though this is corrected by the KernelPsf creation.
Added division by zero protection for the doPreConvolve==True case, though it's unlikely that it happens numerically. Instead, it is expected that high frequency noise will be added to the difference image in this case. (The decorrelation kernel is divergent in frequency space - practically we try to invert a multiplication by zero but in a "small noise/small noise" expression. The same problem as in zogy. The difference image should not be created separately in this case.)