From e54d549f9244c4055856f30bfe8dcd1f972b9c10 Mon Sep 17 00:00:00 2001 From: Rubel Date: Fri, 24 Nov 2023 09:26:21 +0100 Subject: [PATCH] Handeling some of the special fields. --- pynxtools/dataconverter/readers/xrd/xrd_helper.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pynxtools/dataconverter/readers/xrd/xrd_helper.py b/pynxtools/dataconverter/readers/xrd/xrd_helper.py index 12de8c222..3f0733263 100644 --- a/pynxtools/dataconverter/readers/xrd/xrd_helper.py +++ b/pynxtools/dataconverter/readers/xrd/xrd_helper.py @@ -144,6 +144,12 @@ def handle_special_fields(): template[key] = gonio_z[0] if (isinstance(gonio_z, np.ndarray) and gonio_z.shape == (1,)) else gonio_z + key = "/ENTRY[entry]/COLLECTION[collection]/count_time" + count_time = template.get(key, None) + + template[count_time] = count_time[0] if (isinstance(count_time, np.ndarray) + and count_time.shape == (1,)) else count_time + two_theta_plot() q_plot() handle_special_fields()