Skip to content

Commit

Permalink
Merge pull request #811 from vasole/vasole-patch
Browse files Browse the repository at this point in the history
Closes #810
  • Loading branch information
vasole authored Jun 23, 2021
2 parents a955132 + 2e7cccb commit 51e0ebb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion PyMca5/PyMcaIO/HDF5Stack1D.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,7 @@ def loadFileList(self, filelist, selection, scanlist=None):
considerAsImages = False
dim0, dim1, mcaDim = self.getDimensions(nFiles, nScans, shape,
index=mcaIndex)
_logger.debug("Returned dimensions = %d, %d, %d" % (dim0, dim1, mcaDim))
try:
if self.__dtype in [numpy.float32, numpy.int32]:
bytefactor = 4
Expand Down Expand Up @@ -329,7 +330,8 @@ def loadFileList(self, filelist, selection, scanlist=None):
raise MemoryError("Force dynamic loading")
else:
raise MemoryError("Force dynamic loading")
if (mcaIndex == 0) and ( nFiles == 1) and (nScans == 1):
if (mcaIndex == 0) and ( nFiles == 1) and (nScans == 1) \
and (len(yDataset.shape) > 1):
#keep the original arrangement but in memory
self.data = numpy.zeros(yDataset.shape, self.__dtype)
considerAsImages = True
Expand Down

0 comments on commit 51e0ebb

Please sign in to comment.