From 3cf34d075a39e496100a1275a06bcc6970130ad6 Mon Sep 17 00:00:00 2001
From: Thomas Kluyver <thomas.kluyver@xfel.eu>
Date: Fri, 22 Nov 2024 19:17:10 +0100
Subject: [PATCH] Fix more silly mistakes in non-combining parallel gain
 correction

---
 notebooks/LPD/LPD_Correct_Fast.ipynb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/notebooks/LPD/LPD_Correct_Fast.ipynb b/notebooks/LPD/LPD_Correct_Fast.ipynb
index fa9732c03..6ac783665 100644
--- a/notebooks/LPD/LPD_Correct_Fast.ipynb
+++ b/notebooks/LPD/LPD_Correct_Fast.ipynb
@@ -501,7 +501,7 @@
     "            # Replicate corrected cell and pulse IDs from high gain to other gains.\n",
     "            tmp_cell = np.zeros_like(in_cell)\n",
     "            tmp_pulse = np.zeros_like(in_pulse)\n",
-    "            sel = np.zeros_like(in_cell)\n",
+    "            sel = np.zeros_like(in_cell, dtype=np.bool_)\n",
     "\n",
     "            cursor_in = cursor_out = 0\n",
     "            for afc in actual_frame_counts:\n",
@@ -511,7 +511,7 @@
     "                    sel[cursor_out : cursor_out+afc] = 1\n",
     "                    cursor_out += afc + drop_last_frames_parallelgain\n",
     "\n",
-    "                cursor_in += afc + drop_last_frames_parallelgain\n",
+    "                cursor_in += 3 * (afc + drop_last_frames_parallelgain)\n",
     "                \n",
     "            # Apply the selection to drop trailing frames\n",
     "            in_cell = tmp_cell[sel]\n",
-- 
GitLab