Skip to content

Commit

Permalink
Added comments to changes
Browse files Browse the repository at this point in the history
  • Loading branch information
floriansimperl authored and lukaspie committed Nov 27, 2024
1 parent 29171a0 commit d5279b6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/pynxtools_xps/scienta/scienta_data_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ""
Expand Down
10 changes: 5 additions & 5 deletions src/pynxtools_xps/scienta/scienta_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand All @@ -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):
Expand Down Expand Up @@ -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]:
"""
Expand Down

0 comments on commit d5279b6

Please sign in to comment.