diff --git a/pynxtools/dataconverter/convert.py b/pynxtools/dataconverter/convert.py index 606da170c..9810f03ab 100644 --- a/pynxtools/dataconverter/convert.py +++ b/pynxtools/dataconverter/convert.py @@ -164,7 +164,6 @@ def convert(input_file: Tuple[str], generate_template: bool = False, fair: bool = False, undocumented: bool = False, - temp_data_dict=None, # pre generated empty template from nxdl name. **kwargs): """The conversion routine that takes the input parameters and calls the necessary functions.""" @@ -181,8 +180,6 @@ def convert(input_file: Tuple[str], **kwargs) if undocumented: logger.setLevel(UNDOCUMENTED) - # This is mainly if the filled template data is needed out of this function - temp_data_dict['data'] = temp_data if fair and temp_data.undocumented.keys(): logger.warning("There are undocumented paths in the template. This is not acceptable!") return diff --git a/pynxtools/dataconverter/readers/sts/helper.py b/pynxtools/dataconverter/readers/sts/helper.py index 07ccdeed4..3fa8ffc20 100644 --- a/pynxtools/dataconverter/readers/sts/helper.py +++ b/pynxtools/dataconverter/readers/sts/helper.py @@ -19,11 +19,9 @@ from typing import Tuple import copy -import json import numpy as np from pynxtools.dataconverter.helpers import (convert_data_dict_path_to_hdf5_path, transform_to_intended_dt, - nested_dict_to_slash_separated_path ) @@ -101,9 +99,9 @@ def overwrite_fields(template, data_dict, else None) if unit in data_path: path_to_data = data_path[unit] - template[new_temp_key + "/@units"] = transform_to_intended_dt(data_dict[path_to_data] - if path_to_data in data_dict - else None) + unit = transform_to_intended_dt(data_dict[path_to_data] if path_to_data in data_dict + else None) + template[new_temp_key + "/@units"] = def nested_path_to_slash_separated_path(nested_dict: dict, diff --git a/pynxtools/dataconverter/readers/sts/stm_file_parser.py b/pynxtools/dataconverter/readers/sts/stm_file_parser.py index 3ddbb8fc4..29321f278 100644 --- a/pynxtools/dataconverter/readers/sts/stm_file_parser.py +++ b/pynxtools/dataconverter/readers/sts/stm_file_parser.py @@ -367,8 +367,8 @@ def from_sxm_file_into_template(self, template, config_dict, eln_data_dict): c_key, nxdl_key_to_modified_key) else: - template[c_key] = transform_to_intended_dt(data_dict[c_val]) if c_val in data_dict \ - else None + template[c_key] = transform_to_intended_dt(data_dict[c_val]) \ + if c_val in data_dict else None # The following function can be used later it link come true in application def. # link_implementation(template, nxdl_key_to_modified_key) link_seperation_from_hard_code(template, nxdl_key_to_modified_key) diff --git a/pynxtools/dataconverter/readers/xrd/xrd_parser.py b/pynxtools/dataconverter/readers/xrd/xrd_parser.py index 9f18e1284..101d7b63e 100644 --- a/pynxtools/dataconverter/readers/xrd/xrd_parser.py +++ b/pynxtools/dataconverter/readers/xrd/xrd_parser.py @@ -318,7 +318,7 @@ def parse(self): ValueError: If the file format is unsupported. ''' file_format = self.get_file_format() - + slash_sep_dict = {} if file_format == ".xrdml": slash_sep_dict = self.parse_xrdml() # elif file_format == ".udf": diff --git a/pynxtools/definitions b/pynxtools/definitions index d526b9937..f0d7e0624 160000 --- a/pynxtools/definitions +++ b/pynxtools/definitions @@ -1 +1 @@ -Subproject commit d526b9937e3508cc24f151b0187e9c227dd530d5 +Subproject commit f0d7e06241585543bd49699face4ac0ff76cc662 diff --git a/pyproject.toml b/pyproject.toml index 8b67df9b1..6a8173a64 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,6 +39,7 @@ dependencies = [ "tzlocal<=4.3", "scipy>=1.7.1", "lark>=1.1.5", + "xrayutilities>=1.7.4", "requests", "requests_cache", "nanonispy@git+https://github.com/ramav87/nanonispy.git@a0da87c58482d29624a2bf5deecb763dd1274212"