Skip to content

Commit

Permalink
Merge pull request #114 from ahoust17/developer
Browse files Browse the repository at this point in the history
EMD reader recognizes reciprocal dimensions
  • Loading branch information
gduscher authored Jan 27, 2024
2 parents b8ace8b + 4abc105 commit 1b8ddac
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions SciFiReaders/readers/microscopy/em/tem/emd_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,18 @@ def get_image(self):
name='y', units='nm',
quantity='distance',
dimension_type='spatial'))

# for diffraction patterns
if '1/' in self.metadata['BinaryResult']['PixelUnitX']:
self.datasets[-1].set_dimension(0, sidpy.Dimension(np.arange(self.data_array.shape[0]) * (scale_x / 1e18),
name='u', units='1/nm',
quantity='reciprocal distance',
dimension_type='reciprocal'))
self.datasets[-1].set_dimension(1, sidpy.Dimension(np.arange(self.data_array.shape[1]) * (scale_y / 1e18),
name='v', units='1/nm',
quantity='reciprocal distance',
dimension_type='reciprocal'))

else:
# There is a problem with random access of data due to chunking in hdf5 files
# Speed-up copied from hyperspy.ioplugins.EMDReader.FEIEMDReader
Expand Down

0 comments on commit 1b8ddac

Please sign in to comment.