From b62db371b57d6890435c1021dd1a21b78563b463 Mon Sep 17 00:00:00 2001
From: Simon Mazenoux <simon.mazenoux@cern.ch>
Date: Mon, 23 Oct 2023 10:51:41 +0200
Subject: [PATCH] [SIGMON-530] fix error on section 8.1.1

---
 rb/AN_RB_FPA.ipynb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/rb/AN_RB_FPA.ipynb b/rb/AN_RB_FPA.ipynb
index 0be3cecd..3ff3d98f 100644
--- a/rb/AN_RB_FPA.ipynb
+++ b/rb/AN_RB_FPA.ipynb
@@ -1105,8 +1105,8 @@
    },
    "outputs": [],
    "source": [
-    "def collection_was_stopped(u_diode_rb_df):\n",
-    "    return u_diode_rb_df.index[-1] <= 0\n",
+    "def collection_was_stopped(u_diode_rb_df: pd.DataFrame):\n",
+    "    return u_diode_rb_df.empty or u_diode_rb_df.index[-1] <= 0\n",
     "\n",
     "magnets_expected = MappingMetadata.get_magnets_for_circuit_names(circuit_type, circuit_name)\n",
     "magnets_found = {df.columns[0].partition(':')[0] for df in u_diode_rb_dfs if not collection_was_stopped(df)}\n",
-- 
GitLab