From 3a1a3409fbba08d029184810d8a192d00936e2d0 Mon Sep 17 00:00:00 2001 From: David Hammer <dhammer@mailbox.org> Date: Mon, 14 Feb 2022 13:02:44 +0100 Subject: [PATCH] Attempt to catch more cases of DAQ not sending data --- src/calng/base_correction.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/calng/base_correction.py b/src/calng/base_correction.py index 42e9c95c..9a18a018 100644 --- a/src/calng/base_correction.py +++ b/src/calng/base_correction.py @@ -936,13 +936,12 @@ class BaseCorrection(PythonDevice): self._train_ratio_tracker.update(train_id) cell_table = data_hash.get(self._cell_table_path) if ( - (isinstance(cell_table, np.ndarray) and cell_table.size == 0) - or len(cell_table) == 0 - ): - self.log_status_warn( - "Empty cell table, DAQ probably not sending data." - ) + isinstance(cell_table, np.ndarray) + and (len(cell_table.shape) == 0 or cell_table.size == 0) + ) or len(cell_table) == 0: + self.log_status_warn("Empty cell table, DAQ probably not sending data.") return + cell_table = np.squeeze(cell_table) # no more common reasons to skip input, so go to processing -- GitLab