From fef933efa25d656e94330d30f470f9a84d6a31a5 Mon Sep 17 00:00:00 2001 From: edgar1993a Date: Thu, 23 Jan 2025 18:06:02 +0100 Subject: [PATCH] parse shape --- src/pyFAI/gui/pilx/utils.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/pyFAI/gui/pilx/utils.py b/src/pyFAI/gui/pilx/utils.py index f92689cbf..ead04373a 100644 --- a/src/pyFAI/gui/pilx/utils.py +++ b/src/pyFAI/gui/pilx/utils.py @@ -53,8 +53,11 @@ def compute_radial_values(pyFAI_config_as_str: str) -> numpy.ndarray: "pixel2": pyFAI_config.get("pixel2"), "splineFile": pyFAI_config.get("splineFile"), "max_shape": pyFAI_config.get("max_shape")}) - - scaled_values = ai.center_array(pyFAI_config["shape"], + + shape = pyFAI_config.get("shape") + if shape is None: + shape = ai.detector.shape + scaled_values = ai.center_array(shape, pyFAI_config["unit"]) return scaled_values