From d06d2f20a2cacb44fda6173156c39ba922be1309 Mon Sep 17 00:00:00 2001
From: ahmedk <karim.ahmed@xfel.eu>
Date: Wed, 28 Feb 2024 11:43:16 +0100
Subject: [PATCH] MR suggestions: refactor code and improve readability

---
 notebooks/AGIPD/AGIPD_Correct_and_Verify.ipynb | 4 ++--
 src/cal_tools/tools.py                         | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/notebooks/AGIPD/AGIPD_Correct_and_Verify.ipynb b/notebooks/AGIPD/AGIPD_Correct_and_Verify.ipynb
index e9254d855..4ed46d2ea 100644
--- a/notebooks/AGIPD/AGIPD_Correct_and_Verify.ipynb
+++ b/notebooks/AGIPD/AGIPD_Correct_and_Verify.ipynb
@@ -521,6 +521,7 @@
     "        get_data = {'auto': litfrm.read_or_process, 'offline': litfrm.process, 'online': litfrm.read}\n",
     "        r = get_data[use_litframe_finder]()\n",
     "        cell_sel = LitFrameSelection(r, train_ids, max_pulses, energy_threshold, use_super_selection)\n",
+    "        print(f\"{cell_sel.msg()}/n\")\n",
     "        cell_sel.print_report()\n",
     "        if np.count_nonzero(r.nLitFrame.value) == 0:  # No lit frames.\n",
     "            display_shutter_config(dc, instrument, karabo_id_control)\n",
@@ -530,8 +531,7 @@
     "else:\n",
     "    # Use range selection\n",
     "    cell_sel = CellRange(max_pulses, max_cells=mem_cells)\n",
-    "\n",
-    "print(cell_sel.msg())"
+    "    print(cell_sel.msg())"
    ]
   },
   {
diff --git a/src/cal_tools/tools.py b/src/cal_tools/tools.py
index 81be77eff..cc81c81a4 100644
--- a/src/cal_tools/tools.py
+++ b/src/cal_tools/tools.py
@@ -21,7 +21,7 @@ import numpy as np
 import requests
 import yaml
 import zmq
-from extra_data import H5File, RunDirectory
+from extra_data import H5File, PropertyNameError, RunDirectory
 from iCalibrationDB import ConstantMetaData, Versions
 from jupyter_server.serverapp import list_running_servers
 
-- 
GitLab