From ffa680cfb491c37dd394fc65c85e824a51e20a51 Mon Sep 17 00:00:00 2001 From: ahmedk <karim.ahmed@xfel.eu> Date: Tue, 20 Feb 2024 16:22:49 +0100 Subject: [PATCH] mod_indices assignment when karabo_da undefined --- notebooks/AGIPD/AGIPD_Correct_and_Verify.ipynb | 1 + notebooks/AGIPD/Characterize_AGIPD_Gain_Darks_NBC.ipynb | 1 + 2 files changed, 2 insertions(+) diff --git a/notebooks/AGIPD/AGIPD_Correct_and_Verify.ipynb b/notebooks/AGIPD/AGIPD_Correct_and_Verify.ipynb index 2ac606a4e..8c3b5d717 100644 --- a/notebooks/AGIPD/AGIPD_Correct_and_Verify.ipynb +++ b/notebooks/AGIPD/AGIPD_Correct_and_Verify.ipynb @@ -288,6 +288,7 @@ "if karabo_da[0] == '-1':\n", " if modules[0] == -1:\n", " modules = list(range(nmods))\n", + " mod_indices = modules if nmods > 1 else [0]\n", " karabo_da = [\"AGIPD{:02d}\".format(i) for i in modules]\n", "else: # TODO: fix this with the new CALCAT metadata for module indices.\n", " modules = [int(x[-2:]) for x in karabo_da]\n", diff --git a/notebooks/AGIPD/Characterize_AGIPD_Gain_Darks_NBC.ipynb b/notebooks/AGIPD/Characterize_AGIPD_Gain_Darks_NBC.ipynb index ca300e764..41d7ff28d 100644 --- a/notebooks/AGIPD/Characterize_AGIPD_Gain_Darks_NBC.ipynb +++ b/notebooks/AGIPD/Characterize_AGIPD_Gain_Darks_NBC.ipynb @@ -168,6 +168,7 @@ "if karabo_da[0] == '-1':\n", " if modules[0] == -1:\n", " modules = list(range(nmods))\n", + " mod_indices = modules if nmods > 1 else [0]\n", " karabo_da = create_karabo_da_list(modules)\n", "else:\n", " # TODO: use CALCAT metadata for detector's modules indices.\n", -- GitLab