diff --git a/src/pynxtools_xps/scienta/scienta_data_model.py b/src/pynxtools_xps/scienta/scienta_data_model.py index 5ce15db5..72808c41 100644 --- a/src/pynxtools_xps/scienta/scienta_data_model.py +++ b/src/pynxtools_xps/scienta/scienta_data_model.py @@ -70,7 +70,7 @@ class ScientaRegion(XpsDataclass): data: dict = field(default_factory=dict) -##FLORIAN CHANGES +#New dataclass for PEAK version @dataclass class ExcitationSourceEnergyInformation: SourceType: str = "" diff --git a/src/pynxtools_xps/scienta/scienta_reader.py b/src/pynxtools_xps/scienta/scienta_reader.py index 7efa6d04..db3610bd 100644 --- a/src/pynxtools_xps/scienta/scienta_reader.py +++ b/src/pynxtools_xps/scienta/scienta_reader.py @@ -84,7 +84,7 @@ def _select_parser(self): if str(self.file).endswith(".txt"): return ScientaTxtParser() elif str(self.file).endswith(".ibw"): - with open(str(self.file),'rb') as f: + with open(str(self.file),'rb') as f: data_ibw = binarywave.load(f) try: check_note = json.loads(data_ibw['wave']['note'].decode('utf-8'))["Version"] @@ -521,7 +521,7 @@ def parse_file(self, file: Union[str, Path], **kwargs): self.spectra.append(spectrum_dict) return self.spectra - + def _parse_note(self, bnote: bytes) -> Dict[str, Any]: """ Parses the note field of the igor binarywave file. @@ -662,8 +662,8 @@ def parse_file(self, file: Union[str, Path], **kwargs): wave_header = wave["wave_header"] data = wave["wData"] - ##FLORIAN INSERT #Create 1d reduced data on the 2D image + #NOTE: This should be removed we want a 2D image displayed as shown in the PEKA software data = np.sum(data,axis=1) # Not needed at the moment. @@ -678,7 +678,7 @@ def parse_file(self, file: Union[str, Path], **kwargs): self.no_of_regions = 1 else: #self.no_of_regions = data.shape[0] - ##FLORIAN INSERT + #NOTE: Changed due to data shape change self.no_of_regions = len(data.shape) for region_id in range(0, self.no_of_regions): @@ -729,7 +729,7 @@ def parse_file(self, file: Union[str, Path], **kwargs): self.spectra.append(spectrum_dict) return self.spectra - + def _parse_note(self, bnote: bytes) -> Dict[str, Any]: """