From fad11d4898318e3c82e41bbf71fe40d794beddf6 Mon Sep 17 00:00:00 2001 From: Jarron Leisenring Date: Tue, 14 Jan 2025 09:46:29 -0700 Subject: [PATCH] image dimensions from last two shape values --- webbpsf_ext/imreg_tools.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webbpsf_ext/imreg_tools.py b/webbpsf_ext/imreg_tools.py index 3cd817e..dcbecf7 100644 --- a/webbpsf_ext/imreg_tools.py +++ b/webbpsf_ext/imreg_tools.py @@ -1201,11 +1201,11 @@ def load_cropped_files(save_dir, files, xysub=65, bgsub=False, hdul.close() # Ensure data are of the same shape - sh1 = imsub_arr[0].shape + sh1 = imsub_arr[0].shape[-2:] xymin_size = np.min([sh1[0], sh1[1]]) same_shape = True for i in range(1, len(imsub_arr)): - sh2 = imsub_arr[i].shape + sh2 = imsub_arr[i].shape[-2:] if sh1 != sh2: same_shape = False xymin_size = np.min([xymin_size, np.min([sh2[0], sh2[1]])])