Skip to content

Commit

Permalink
image dimensions from last two shape values
Browse files Browse the repository at this point in the history
  • Loading branch information
JarronL committed Jan 14, 2025
1 parent 7675127 commit fad11d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions webbpsf_ext/imreg_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]])])
Expand Down

0 comments on commit fad11d4

Please sign in to comment.