From acc8424698d59e2a2abad61d663eec5995242e58 Mon Sep 17 00:00:00 2001
From: David Hammer <dhammer@mailbox.org>
Date: Wed, 1 Sep 2021 13:14:16 +0200
Subject: [PATCH] Load cell table for preview correction when main correction
 is off

Was trying to map out behavior of DsscGpuRunner as an FSM and found that this
was missing.
---
 src/calng/DsscCorrection.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/calng/DsscCorrection.py b/src/calng/DsscCorrection.py
index 6468a769..ca78bdf6 100644
--- a/src/calng/DsscCorrection.py
+++ b/src/calng/DsscCorrection.py
@@ -589,6 +589,9 @@ class DsscCorrection(calibrationBase.CalibrationReceiverBaseDevice):
                         self.set("status", msg)
                     else:
                         preview_slice_index = pulse_id_found[0]
+                if (not do_apply_correction) and can_correct:
+                    # in this case, cell table has not been loaded, but needs to be now
+                    self.gpu_runner.load_cell_table(cell_table)
                 preview_raw, preview_corrected = self.gpu_runner.compute_preview(
                     preview_slice_index,
                     have_corrected=do_apply_correction,
-- 
GitLab