From 008b3b13d70bc57afbd000d79e04ff965bb8f437 Mon Sep 17 00:00:00 2001 From: Ivan Usov <ivan.usov@psi.ch> Date: Mon, 6 Feb 2023 16:08:50 +0100 Subject: [PATCH] Fix lattice/ub inputs parsing --- pyzebra/app/panel_plot_data.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pyzebra/app/panel_plot_data.py b/pyzebra/app/panel_plot_data.py index 97fd2f5..b80d8f6 100644 --- a/pyzebra/app/panel_plot_data.py +++ b/pyzebra/app/panel_plot_data.py @@ -70,7 +70,8 @@ def create(): # Change parameter if flag_ub: - det_data["ub"] = np.array(redef_ub_ti.value.strip().split()).reshape(3, 3) + ub = list(map(float, redef_ub_ti.value.strip().split())) + det_data["ub"] = np.array(ub).reshape(3, 3) # Convert h k l for all images in file h_temp = np.empty(np.shape(det_data["counts"])) @@ -92,7 +93,8 @@ def create(): I_matrix = np.append(I_matrix, det_data["counts"], axis=0) if flag_lattice: - lattice = np.array(redef_lattice_ti.value.strip().split()) + vals = list(map(float, redef_lattice_ti.value.strip().split())) + lattice = np.array(vals) else: lattice = det_data["cell"]