From 83ce167635141edbe206a602e2c4f1ff48bc0a6d Mon Sep 17 00:00:00 2001
From: ahmedk <karim.ahmed@xfel.eu>
Date: Thu, 13 Apr 2023 11:45:15 +0200
Subject: [PATCH] unpushed change for using st_modno

---
 .../Jungfrau/Jungfrau_Gain_Correct_and_Verify_NBC.ipynb   | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/notebooks/Jungfrau/Jungfrau_Gain_Correct_and_Verify_NBC.ipynb b/notebooks/Jungfrau/Jungfrau_Gain_Correct_and_Verify_NBC.ipynb
index 466589430..7c73286e3 100644
--- a/notebooks/Jungfrau/Jungfrau_Gain_Correct_and_Verify_NBC.ipynb
+++ b/notebooks/Jungfrau/Jungfrau_Gain_Correct_and_Verify_NBC.ipynb
@@ -73,6 +73,7 @@
    "outputs": [],
    "source": [
     "import fnmatch\n",
+    "import multiprocessing\n",
     "import sys\n",
     "import warnings\n",
     "from logging import warning\n",
@@ -662,6 +663,7 @@
     "# Positions are given in pixels\n",
     "mod_width = (256 * 4) + (2 * 3)  # inc. 2px gaps between tiles\n",
     "mod_height = (256 * 2) + 2\n",
+    "st_modno = 1\n",
     "if karabo_id == \"SPB_IRDA_JF4M\":\n",
     "    # The first 4 modules are rotated 180 degrees relative to the others.\n",
     "    # We pass the bottom, beam-right corner of the module regardless of its\n",
@@ -684,6 +686,8 @@
     "    module_pos = ((-mod_width//2,-mod_height//2),)\n",
     "    orientations = None\n",
     "    nmods = 1\n",
+    "    if karabo_id == \"FXE_XAD_JF500K\":\n",
+    "        st_modno = 3\n",
     "\n",
     "geom = JUNGFRAUGeometry.from_module_positions(module_pos, orientations=orientations, asic_gap=0)"
    ]
@@ -703,7 +707,7 @@
     "    # Reading CORR data for plotting.\n",
     "    jf_corr = components.JUNGFRAU(\n",
     "        corr_dc,\n",
-    "        detector_name=karabo_id, n_modules=nmods,\n",
+    "        detector_name=karabo_id, n_modules=nmods, st_modno=st_modno,\n",
     "    ).select_trains(np.s_[:plot_trains])\n",
     "    tid, jf_corr_data = next(iter(jf_corr.trains(require_all=True)))\n",
     "\n",
@@ -723,7 +727,7 @@
     "\n",
     "    # Reading RAW data for plotting.\n",
     "    jf_raw = components.JUNGFRAU(\n",
-    "        raw_dc, detector_name=karabo_id, n_modules=nmods).select_trains(\n",
+    "        raw_dc, detector_name=karabo_id, n_modules=nmods, st_modno=st_modno).select_trains(\n",
     "            np.s_[:plot_trains]\n",
     "    )\n",
     "\n",
-- 
GitLab