From b195d0d06fc4dfcb5db2830db582d6df4aec037b Mon Sep 17 00:00:00 2001 From: Georgios Varnavides Date: Fri, 15 Nov 2024 22:17:51 -0800 Subject: [PATCH] bug in ptycho-tomo object support mask --- .../process/phase/ptychographic_tomography.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/py4DSTEM/process/phase/ptychographic_tomography.py b/py4DSTEM/process/phase/ptychographic_tomography.py index a0fc9d818..022d4d0c8 100644 --- a/py4DSTEM/process/phase/ptychographic_tomography.py +++ b/py4DSTEM/process/phase/ptychographic_tomography.py @@ -1233,7 +1233,10 @@ def reconstruct( use_fourier_rotation, ) - if not collective_measurement_updates: + if ( + not collective_measurement_updates + and object_real_space_support_mask is not None + ): object_real_space_support_mask = self._rotate_zxy_volume( object_real_space_support_mask, rot_matrix @ old_rot_matrix.T, @@ -1464,11 +1467,12 @@ def reconstruct( use_fourier_rotation, ) - object_real_space_support_mask = self._rotate_zxy_volume( - object_real_space_support_mask, - old_rot_matrix, - use_fourier_rotation, - ) + if object_real_space_support_mask is not None: + object_real_space_support_mask = self._rotate_zxy_volume( + object_real_space_support_mask, + old_rot_matrix, + use_fourier_rotation, + ) # object only self._object = self._object_constraints(