From 5a69abef65f3ca06c33aeb6b1db73a80e711e7fa Mon Sep 17 00:00:00 2001
From: David Hammer <dhammer@mailbox.org>
Date: Thu, 10 Feb 2022 14:49:45 +0100
Subject: [PATCH] Remove a debugging print, add another in case of failure

---
 src/calng/AgipdCorrection.py | 6 ++++++
 src/calng/base_correction.py | 7 ++-----
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/src/calng/AgipdCorrection.py b/src/calng/AgipdCorrection.py
index 36edc80d..c0b1d9a4 100644
--- a/src/calng/AgipdCorrection.py
+++ b/src/calng/AgipdCorrection.py
@@ -659,6 +659,12 @@ class AgipdCorrection(BaseCorrection):
             self.kernel_runner.load_data(image_data)
         except ValueError as e:
             self.log_status_warn(f"Failed to load data: {e}")
+            self.log_status_warn(
+                f"For debugging - cell table: {type(cell_table)}, {cell_table}"
+            )
+            self.log_status_warn(
+                f"For debugging - data: {type(image_data)}, {image_data.shape}"
+            )
             return
         except Exception as e:
             self.log_status_warn(f"Unknown exception when loading data to GPU: {e}")
diff --git a/src/calng/base_correction.py b/src/calng/base_correction.py
index 103d823a..a631076b 100644
--- a/src/calng/base_correction.py
+++ b/src/calng/base_correction.py
@@ -891,6 +891,7 @@ class BaseCorrection(PythonDevice):
         )
 
         # TODO: gracefully handle change in constantParameters.memoryCells
+        # TODO: offload to thread to avoid reconfigure of framefilter timing out
         with self.calcat_friend.cached_constants_lock:
             for (
                 constant,
@@ -1092,11 +1093,7 @@ def add_correction_step_schema(schema, managed_keys, field_flag_mapping):
 
 
 def _parse_frame_filter(config):
-    print("Get type")
-    _t = config["frameFilter.type"]
-    print(_t)
-    filter_type = FramefilterSpecType(_t)
-    print("Get spec")
+    filter_type = FramefilterSpecType(config["frameFilter.type"])
     filter_string = config["frameFilter.spec"]
 
     if filter_type is FramefilterSpecType.NONE or filter_string.strip() == "":
-- 
GitLab