From df0bdcb18b61c11ed77328f341de61c5477866b2 Mon Sep 17 00:00:00 2001
From: David Hammer <david.hammer@xfel.eu>
Date: Tue, 19 Sep 2023 09:04:18 +0200
Subject: [PATCH] Don't add redundant frame axis to corrected output of
 single-frame data for slow ePix/pnCCD

---
 src/calng/corrections/Epix100Correction.py | 8 +++++++-
 src/calng/corrections/PnccdCorrection.py   | 8 +++++++-
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/src/calng/corrections/Epix100Correction.py b/src/calng/corrections/Epix100Correction.py
index cf9e85c1..05bc1b7c 100644
--- a/src/calng/corrections/Epix100Correction.py
+++ b/src/calng/corrections/Epix100Correction.py
@@ -140,7 +140,7 @@ class Epix100CalcatFriend(base_calcat.BaseCalcatFriend):
 
 
 class Epix100CpuRunner(base_kernel_runner.BaseKernelRunner):
-    _corrected_axis_order = "fxy"
+    _corrected_axis_order = "xy"
     _xp = np
     _gpu_based = False
 
@@ -343,6 +343,12 @@ class Epix100Correction(base_correction.BaseCorrection):
             .setNewDefaultValue(1)
             .commit(),
 
+            OVERWRITE_ELEMENT(expected)
+            .key("dataFormat.outputAxisOrder")
+            .setNewOptions("xy,yx")
+            .setNewDefaultValue("xy")
+            .commit(),
+
             # TODO: disable preview selection mode
 
             OVERWRITE_ELEMENT(expected)
diff --git a/src/calng/corrections/PnccdCorrection.py b/src/calng/corrections/PnccdCorrection.py
index c1a7ae49..3350ace7 100644
--- a/src/calng/corrections/PnccdCorrection.py
+++ b/src/calng/corrections/PnccdCorrection.py
@@ -149,7 +149,7 @@ class PnccdCalcatFriend(base_calcat.BaseCalcatFriend):
 
 
 class PnccdCpuRunner(base_kernel_runner.BaseKernelRunner):
-    _corrected_axis_order = "fxy"
+    _corrected_axis_order = "xy"
     _xp = np
     _gpu_based = False
 
@@ -348,6 +348,12 @@ class PnccdCorrection(base_correction.BaseCorrection):
             .setNewDefaultValue(1)
             .commit(),
 
+            OVERWRITE_ELEMENT(expected)
+            .key("dataFormat.outputAxisOrder")
+            .setNewOptions("xy,yx")
+            .setNewDefaultValue("xy")
+            .commit(),
+
             # TODO: disable preview selection mode
 
             OVERWRITE_ELEMENT(expected)
-- 
GitLab