From a2f2dde28a17fbf61234ca50250cbe891853ffeb Mon Sep 17 00:00:00 2001
From: ahmedk <karim.ahmed@xfel.eu>
Date: Tue, 2 Aug 2022 13:33:30 +0200
Subject: [PATCH] Dark process starting p21st pulse

---
 .../Gotthard2/Characterize_Darks_Gotthard2_NBC.ipynb   | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/notebooks/Gotthard2/Characterize_Darks_Gotthard2_NBC.ipynb b/notebooks/Gotthard2/Characterize_Darks_Gotthard2_NBC.ipynb
index 657b80095..320f8d50b 100644
--- a/notebooks/Gotthard2/Characterize_Darks_Gotthard2_NBC.ipynb
+++ b/notebooks/Gotthard2/Characterize_Darks_Gotthard2_NBC.ipynb
@@ -239,7 +239,6 @@
    "outputs": [],
    "source": [
     "# set the operating condition\n",
-    "# TODO: add the final conditions for constants.\n",
     "condition = Conditions.Dark.Gotthard2(\n",
     "    bias_voltage=bias_voltage,\n",
     "    exposure_time=exposure_time,\n",
@@ -283,8 +282,7 @@
     "noise_map = dict()\n",
     "offset_map = dict()\n",
     "badpixels_map = dict()\n",
-    "\n",
-    "context = psh.ProcessContext(num_workers=2)\n",
+    "context = psh.ProcessContext(num_workers=15)\n",
     "\n",
     "empty_lut = (np.arange(2 ** 12).astype(np.float64) * 2 ** 10 / 2 ** 12).astype(\n",
     "    np.uint16\n",
@@ -304,7 +302,7 @@
     "        timeout=cal_db_timeout,\n",
     "        print_once=False,\n",
     "    )\n",
-    "\n",
+    "    print(f\"Retrieved LUT constant with creation-time {time}\")\n",
     "    # Path to pixels ADC values\n",
     "    instr_mod_src = instrument_src.format(int(mod[-2:]))\n",
     "\n",
@@ -338,8 +336,8 @@
     "\n",
     "        # Split even and odd data to calculate the two storage cell constants.\n",
     "        # Detector always operates in burst mode.\n",
-    "        even_data = data_10bit[:, ::2, :]\n",
-    "        odd_data = data_10bit[:, 1::2, :]\n",
+    "        even_data = data_10bit[:, 20::2, :]\n",
+    "        odd_data = data_10bit[:, 21::2, :]\n",
     "\n",
     "        def offset_noise_cell(wid, index, d):\n",
     "            offset_map[mod][:, index, gain] = np.mean(d, axis=(0, 1))\n",
-- 
GitLab