Details
-
Type:
Bug
-
Status: Invalid
-
Resolution: Done
-
Fix Version/s: None
-
Component/s: ip_isr
-
Labels:None
-
Team:Data Release Production
-
Urgent?:No
Description
I've been trying to implement parallel overscan on the AuxTel images. I found out that for some amps it was not subtracting the overscan correctly. The attached Scan_C02.png shows that when you subtract the median of the parallel overscan region from the median of the data region, you get a very flat curve. But Scan_Correct_Co2.png shows that when the subtraction is of the overscanResult.overscanValue that is returned by fitOverscan, it only subtracts part of the curve. The reason is this assumption here (lines 224-229 in overscan.py)
- The serial overscan correction has removed the majority
- of the signal in the parallel overscan region, so the
- mean should be close to zero. The noise in both should
- be similar, so we can use the noise from the serial
- overscan region to set the threshold for bleed
- detection.
This turns out to not be a very good assumption when there is a lot of structure in the parallel overscan region. To fix this, I changed line 229 from:
thresholdLevel = self.config.numSigmaClip * serialResults.overscanSigmaResidual
to:
thresholdLevel = np.median(maskIm.image.array) + self.config.numSigmaClip * np.std(maskIm.image.array)
This fixed the problem, as shown in Scan_C02_Fixed.png and Scan_Correct_Fixed.png. After this, the parallel overscan subtraction looks quite good.
Christopher Waters, I can do a PR with this fix if you want, or maybe there is a better solution.
Attachments
Issue Links
- duplicates
-
DM-37357 Update masking in parallel overscan
- Done
The plots above are from exposure 2022121200752.