Skip to content

Commit

Permalink
Merge pull request #119 from pycroscopy/switch2dict
Browse files Browse the repository at this point in the history
Update emd_reader.py
  • Loading branch information
gduscher authored Feb 26, 2024
2 parents 7c6f92b + eb8b3c8 commit 6fa39c6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions SciFiReaders/readers/microscopy/em/tem/emd_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,14 +299,13 @@ def get_image(self):
else:
# There is a problem with random access of data due to chunking in hdf5 files
# Speed-up copied from hyperspy.ioplugins.EMDReader.FEIEMDReader

data_array = np.empty(self.data_array.shape)
self.data_array.read_direct(data_array)
self.data_array = np.rollaxis(data_array, axis=2)
# np.moveaxis(data_array, source=[0, 1, 2], destination=[2, 0, 1])

self.datasets[key] = sidpy.Dataset.from_array(self.data_array)
self.datasets[key].data_type = 'image_stack'

self.datasets[key].set_dimension(0, sidpy.Dimension(np.arange(self.data_array.shape[0]),
name='frame', units='frame',
quantity='time',
Expand Down

0 comments on commit 6fa39c6

Please sign in to comment.