Skip to content

Commit

Permalink
another day another bug
Browse files Browse the repository at this point in the history
  • Loading branch information
smribet committed Sep 15, 2024
1 parent 10906e8 commit 2e2b114
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions py4DSTEM/tomography/tomography.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ def __init__(
datacube_R_pixel_size_A: float = None,
datacube_Q_pixel_size_inv_A: float = None, # do we even need this?
tilt_deg: Sequence[np.ndarray] = None,
translation_px: Sequence[np.ndarray] = None,
shift_px: Sequence[np.ndarray] = None,
tilt_rotation_axis_angle: float = None,
tilt_rotation_axis_shift: float = None,
tilt_rotation_axis_shift_px: float = None,
initial_object_guess: np.ndarray = None,
verbose: bool = True,
device: str = "cpu",
Expand All @@ -61,9 +61,9 @@ def __init__(
self._datacube_R_pixel_size_A = datacube_R_pixel_size_A
self._datacube_Q_pixel_size_inv_A = datacube_Q_pixel_size_inv_A
self._tilt_deg = tilt_deg
self._translation_px = translation_px
self._shift_px = shift_px
self._tilt_rotation_axis_angle = tilt_rotation_axis_angle
self._tilt_rotation_axis_shift = tilt_rotation_axis_shift
self._tilt_rotation_axis_shift_px = tilt_rotation_axis_shift_px
self._verbose = verbose
self._initial_object_guess = initial_object_guess

Expand Down Expand Up @@ -499,12 +499,12 @@ def _calculate_scan_positions(

step_size = self._datacube_R_pixel_size_A

x = np.arange(s[0])
y = np.arange(s[1])
x = np.arange(s[0], dtype="float")
y = np.arange(s[1], dtype="float")

if self._translation_px is not None:
x += self._translation_px[datacube_number][0]
y += self._translation_px[datacube_number][1]
if self._shift_px is not None:
x += self._shift_px[datacube_number][0]
y += self._shift_px[datacube_number][1]

x *= step_size
y *= step_size
Expand Down

0 comments on commit 2e2b114

Please sign in to comment.