Skip to content

Commit

Permalink
minor shape bug
Browse files Browse the repository at this point in the history
  • Loading branch information
gvarnavi committed Oct 8, 2024
1 parent f37b976 commit 175ec7d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions py4DSTEM/process/phase/direct_ptychography.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,14 +499,15 @@ def preprocess(
del _intensities

self._intensities = copy_to_device(self._intensities, storage)
self._intensities_shape = np.array(self._intensities.shape[-2:])
self._intensities_shape = self._intensities.shape[-2:]

# take FFT wrt real-space
if vectorized_com_calculation:
self._intensities_FFT = xp_storage.fft.fft2(self._intensities, axes=(0, 1))
else:
self._intensities_FFT = xp_storage.empty_like(
self._intensities, dtype=xp_storage.complex64
self._intensities_FFT = xp_storage.empty(
self._intensities_shape + self._grid_scan_shape,
dtype=xp_storage.complex64,
)
# transpose to loop over cols faster
intensities = self._intensities.transpose((2, 3, 0, 1))
Expand Down

0 comments on commit 175ec7d

Please sign in to comment.