From 2d0baa783bd14352065d13f8f0f81805067cec56 Mon Sep 17 00:00:00 2001 From: Lukas Pielsticker <50139597+lukaspie@users.noreply.github.com> Date: Mon, 22 Jan 2024 16:10:56 +0100 Subject: [PATCH] Fix energy reading in XPS reader --- pynxtools/dataconverter/readers/xps/reader.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pynxtools/dataconverter/readers/xps/reader.py b/pynxtools/dataconverter/readers/xps/reader.py index f997e424d..79b36e5fa 100644 --- a/pynxtools/dataconverter/readers/xps/reader.py +++ b/pynxtools/dataconverter/readers/xps/reader.py @@ -145,8 +145,9 @@ def fill_data_group(key, key_part, entries_values, config_dict, template): if key_part == "energy": energy_field_key = f"{data_group_key}/energy" - binding_energy = np.array(xr_data.coords) - template[energy_field_key] = binding_energy + energy = np.array(xr_data.coords["energy"].values) + print(energy) + template[energy_field_key] = energy else: # Define energy axis and energy_indices