From 4d206bfa8b0b6977057a1d642dc010d86077fa30 Mon Sep 17 00:00:00 2001 From: smribet Date: Mon, 9 Dec 2024 05:49:13 -0800 Subject: [PATCH] small changes for debugging --- py4DSTEM/tomography/tomography.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/py4DSTEM/tomography/tomography.py b/py4DSTEM/tomography/tomography.py index ab9314e3f..a0e428327 100644 --- a/py4DSTEM/tomography/tomography.py +++ b/py4DSTEM/tomography/tomography.py @@ -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,