Skip to content

Commit

Permalink
Update emd_reader.py
Browse files Browse the repository at this point in the history
  • Loading branch information
gduscher committed Sep 10, 2023
1 parent df767c2 commit f094524
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions SciFiReaders/readers/microscopy/em/tem/emd_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,10 +214,11 @@ def get_eds_spectrum(self):
size_y = 1
if 'Scan' in self.metadata:
scan = self.metadata['Scan']
scan_width = float(scan['ScanSize']['width'])
scan_height = float(scan['ScanSize']['height'])
size_x = scan_width * (float(scan['ScanArea']['right']) - float(scan['ScanArea']['left']))
size_y = scan_height * (float(scan['ScanArea']['bottom']) - float(scan['ScanArea']['top']))
size_x = float(scan['ScanSize']['width'])
size_y = float(scan['ScanSize']['height'])
if 'ScanArea' in scan:
size_x *= (float(scan['ScanArea']['right']) - float(scan['ScanArea']['left']))
size_y *= (float(scan['ScanArea']['bottom']) - float(scan['ScanArea']['top']))
elif 'RasterScanDefinition' in acquisition:
size_x = int(acquisition['RasterScanDefinition']['Width'])
size_y = int(acquisition['RasterScanDefinition']['Height'])
Expand Down

0 comments on commit f094524

Please sign in to comment.