Skip to content

Commit

Permalink
one more bug
Browse files Browse the repository at this point in the history
  • Loading branch information
smribet committed Nov 1, 2023
1 parent 2d48616 commit 3da6fdc
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions py4DSTEM/process/phase/iterative_base_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -1165,7 +1165,6 @@ def _normalize_diffraction_intensities(
diffraction_intensities = self._asnumpy(diffraction_intensities)
if positions_mask is not None:
number_of_patterns = np.count_nonzero(self._positions_mask.ravel())
sx, sy = np.where(~self._positions_mask)
else:
number_of_patterns = np.prod(diffraction_intensities.shape[:2])

Expand Down Expand Up @@ -1214,7 +1213,7 @@ def _normalize_diffraction_intensities(
for rx in range(diffraction_intensities.shape[0]):
for ry in range(diffraction_intensities.shape[1]):
if positions_mask is not None:
if rx in sx and ry in sy:
if not self._positions_mask[rx,ry]:
continue
intensities = get_shifted_ar(
diffraction_intensities[rx, ry],
Expand Down

0 comments on commit 3da6fdc

Please sign in to comment.