From 4e92c5d8d6781bb6dc544a75fef0d0689ffe786e Mon Sep 17 00:00:00 2001
From: Philipp Schmidt <philipp.schmidt@xfel.eu>
Date: Thu, 10 Nov 2022 09:34:00 +0100
Subject: [PATCH] Add ignore-fel argument to REMI reconstruction notebook

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

diff --git a/notebooks/REMI/REMI_Digitize_and_Transform.ipynb b/notebooks/REMI/REMI_Digitize_and_Transform.ipynb
index 5fa4f6c2f..022f851db 100644
--- a/notebooks/REMI/REMI_Digitize_and_Transform.ipynb
+++ b/notebooks/REMI/REMI_Digitize_and_Transform.ipynb
@@ -42,6 +42,7 @@
     "\n",
     "# Trigger parameters.\n",
     "ppt_source = 'SQS_RR_UTC/TSYS/TIMESERVER:outputBunchPattern'\n",
+    "ignore_fel = False  # Ignore any FEL entries in the PPT.\n",
     "ignore_ppl = False  # Ignore any PPL entries in the PPT.\n",
     "ppl_offset = 0  # In units of the PPT.\n",
     "laser_ppt_mask = -1  # Bit mask for used laser, negative to auto-detect from instrument. \n",
@@ -165,7 +166,7 @@
     "def get_pulse_positions(ppt, sase, laser, ppl_offset):\n",
     "    # Combine FEL and PPL positions.\n",
     "\n",
-    "    fel_pos = indices_at_sase(ppt, sase)\n",
+    "    fel_pos = indices_at_sase(ppt, sase) if not ignore_fel else np.array([])\n",
     "    ppl_pos = indices_at_laser(ppt, laser) if not ignore_ppl else np.array([])\n",
     "\n",
     "    if len(fel_pos) > 0:\n",
-- 
GitLab