Skip to content

Commit

Permalink
small changes for debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
smribet committed Dec 9, 2024
1 parent 9b4775a commit 4d206bf
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions py4DSTEM/tomography/tomography.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,19 @@ def preprocess(

# align and reshape
if force_centering_shifts is not None:
qx0_fit = force_centering_shifts[a0][0]
qy0_fit = force_centering_shifts[a0][1]
if np.isscalar(force_centering_shifts[a0][0]):
qx0_fit = (
np.ones((datacube.data.shape[0:2]))
* force_centering_shifts[a0][0]
)
qy0_fit = (
np.ones((datacube.data.shape[0:2]))
* force_centering_shifts[a0][1]
)
else:
qx0_fit = force_centering_shifts[a0][0]
qy0_fit = force_centering_shifts[a0][1]

else:
(qx0_fit, qy0_fit) = self._solve_for_diffraction_pattern_centering(
datacube=datacube,
Expand Down

0 comments on commit 4d206bf

Please sign in to comment.