From c9091dd316b9b304bd2c3ad80e7f70d187851c6b Mon Sep 17 00:00:00 2001
From: ahmedk <karim.ahmed@xfel.eu>
Date: Mon, 24 Oct 2022 11:30:08 +0200
Subject: [PATCH] replace average with mean for consistency

---
 .../Jungfrau_dark_analysis_all_gains_burst_mode_NBC.ipynb      | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/notebooks/Jungfrau/Jungfrau_dark_analysis_all_gains_burst_mode_NBC.ipynb b/notebooks/Jungfrau/Jungfrau_dark_analysis_all_gains_burst_mode_NBC.ipynb
index 3befbb8e7..a209c075a 100644
--- a/notebooks/Jungfrau/Jungfrau_dark_analysis_all_gains_burst_mode_NBC.ipynb
+++ b/notebooks/Jungfrau/Jungfrau_dark_analysis_all_gains_burst_mode_NBC.ipynb
@@ -312,7 +312,8 @@
     "            # Check if there are wrong bad gain values.\n",
     "            # 1. Exclude empty images.\n",
     "            # 2. Indicate pixels with wrong gain value for any train for each cell.\n",
-    "            gain_avg = np.average(\n",
+    "            # TODO: mean is used to use thresholds for accepting gain values, even if not 0 mean value.\n",
+    "            gain_avg = np.mean(\n",
     "                gain_vals[..., cell_slice_idx][..., nonzero_adc], axis=2)\n",
     "\n",
     "            bad_pixels_map[mod][..., cell_number, gain][gain_avg != raw_g] |= BadPixels.WRONG_GAIN_VALUE.value\n",
-- 
GitLab