diff --git a/notebooks/Gotthard2/Characterize_Darks_Gotthard2_NBC.ipynb b/notebooks/Gotthard2/Characterize_Darks_Gotthard2_NBC.ipynb index a9f6b0507633dc4d0012e76d87d55a52f72939ba..32a4f221cf4e6fcbb67ffdaf8f8b9877000d69b4 100644 --- a/notebooks/Gotthard2/Characterize_Darks_Gotthard2_NBC.ipynb +++ b/notebooks/Gotthard2/Characterize_Darks_Gotthard2_NBC.ipynb @@ -473,19 +473,19 @@ " badpixels_map[mod][\n", " ~np.isfinite(offset_map[mod])\n", " ] |= BadPixels.OFFSET_NOISE_EVAL_ERROR.value\n", - " badpixels_map[mod][\n", - " ~np.isfinite(noise_map[mod])\n", - " ] |= BadPixels.OFFSET_NOISE_EVAL_ERROR.value\n", "\n", - " nmap = noise_map[mod].copy()\n", - " last_nbpix = 0\n", - " # Iteratively identify noisy pixels (NOISE_OUT_OF_THRESHOLD)\n", + " # Iteratively identify noisy pixels (OFFSET_NOISE_EVAL_ERROR & NOISE_OUT_OF_THRESHOLD)\n", " # Due to the low number of strips (1280), outliers can significantly impact\n", " # the badpixel calculation. We use multiple iterations to gradually refine\n", " # the sigma threshold, as a single fixed threshold may not be suitable for\n", " # different Gotthard2 detectors.\n", + " last_nbpix = 0\n", + " nmap = noise_map[mod].copy()\n", " for itr in range(bpix_noise_nitrs):\n", " badpixels_map[mod][\n", + " ~np.isfinite(nmap)\n", + " ] |= BadPixels.OFFSET_NOISE_EVAL_ERROR.value\n", + " badpixels_map[mod][\n", " eval_bpidx(nmap)\n", " ] |= BadPixels.NOISE_OUT_OF_THRESHOLD.value\n", " nmap[badpixels_map[mod] > 0] = np.nan\n",