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 30, 2023
1 parent fa2ee7e commit 673a4ab
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 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']
size_x = int(float(scan['ScanSize']['width']) * float(scan['ScanArea']['right'])-float(scan['ScanSize']['width']) * float(scan['ScanArea']['left']))
size_y = int(float(scan['ScanSize']['height']) * float(scan['ScanArea']['bottom'])-float(scan['ScanSize']['height']) * float(scan['ScanArea']['top']))
if 'ScanArea' in scan:
size_x = int(float(scan['ScanSize']['width']) * float(scan['ScanArea']['right'])-float(scan['ScanSize']['width']) * float(scan['ScanArea']['left']))
size_y = int(float(scan['ScanSize']['height']) * float(scan['ScanArea']['bottom'])-float(scan['ScanSize']['height']) * float(scan['ScanArea']['top']))

elif 'RasterScanDefinition' in acquisition:
if 'RasterScanDefinition' in acquisition:
size_x = int(acquisition['RasterScanDefinition']['Width'])
size_y = int(acquisition['RasterScanDefinition']['Height'])
spectrum_size = int(acquisition['bincount'])
Expand Down

0 comments on commit 673a4ab

Please sign in to comment.