diff --git a/pynxtools/dataconverter/readers/xps/reader.py b/pynxtools/dataconverter/readers/xps/reader.py index 513b3f80a..746f4d884 100644 --- a/pynxtools/dataconverter/readers/xps/reader.py +++ b/pynxtools/dataconverter/readers/xps/reader.py @@ -23,6 +23,7 @@ from typing import Tuple import sys import json +import datetime import yaml import numpy as np @@ -57,9 +58,11 @@ "Energydispersion": "ENERGYDISPERSION[energydispersion]", "Detector": "DETECTOR[detector]", "Manipulator": "MANIPULATOR[manipulator]", + "PID": "PID[pid]", "Process": "PROCESS[process]", "Sample": "SAMPLE[sample]", - "Data": "DATA[data]", + "Substance": "SUBSTANCE[substance]", + # "Data": "DATA[data]", } REPLACE_NESTED: Dict[str, str] = {} @@ -275,7 +278,10 @@ def fill_atom_types(key): for entry in entry_set: modified_key = key.replace("[entry]", f"[{entry}]") + if isinstance(field_value, datetime.datetime): + field_value = field_value.isoformat() template[modified_key] = field_value + if atom_types: modified_key = modified_key.replace("chemical_formula", "atom_types") template[modified_key] = ", ".join(atom_types)