diff --git a/src/pynxtools/nomad/schema.py b/src/pynxtools/nomad/schema.py index 7dee89243..61174f38d 100644 --- a/src/pynxtools/nomad/schema.py +++ b/src/pynxtools/nomad/schema.py @@ -951,10 +951,9 @@ def normalize_sample_component(self, archive, logger): def normalize_sample(self, archive, logger): """Normalizer for sample section.""" current_cls = __section_definitions[__rename_nx_for_nomad("NXsample")].section_cls - if self.name__field: - self.name = self.name__field - else: - self.name = self.__dict__["nx_name"] + self.name = self.__dict__["nx_name"] + ( + "(" + self.name__field + ")" if self.name__field else "" + ) # one could also copy local ids to identifier for search purposes super(current_cls, self).normalize(archive, logger) @@ -964,10 +963,9 @@ def normalize_entry(self, archive, logger): current_cls = __section_definitions[__rename_nx_for_nomad("NXentry")].section_cls if self.start_time__field: self.start_time = self.start_time__field - if self.title__field is not None: - self.name = self.title__field - else: - self.name = self.__dict__["nx_name"] + self.name = self.__dict__["nx_name"] + ( + "(" + self.title__field + ")" if self.title__field is not None else "" + ) # one could also copy local ids to identifier for search purposes super(current_cls, self).normalize(archive, logger)