@@ -31,9 +31,11 @@ def lanczos_shift_image(img, dx, dy, inplace=False, force_python=False):
3131 Lx /= Lx .sum ()
3232 Ly /= Ly .sum ()
3333
34- #print('mp_fourier:', mp_fourier)
3534 H ,W = img .shape
36- if mp_fourier is None or force_python or W <= 8 or H <= 8 :
35+ #print('lanczos_shift_image: size', W, H)
36+ #print('mp_fourier:', mp_fourier)
37+ if (mp_fourier is None or force_python or W <= 8 or H <= 8
38+ or H > work_corr7f .shape [0 ] or W > work_corr7f .shape [1 ]):
3739 sx = correlate1d (img , Lx , axis = 1 , mode = 'constant' )
3840 outimg = correlate1d (sx , Ly , axis = 0 , mode = 'constant' )
3941 else :
@@ -50,10 +52,7 @@ def lanczos_shift_image(img, dx, dy, inplace=False, force_python=False):
5052 assert (np .all (np .isfinite (outimg )))
5153 return outimg
5254
53- #work_corr7 = np.zeros((1024,1024), np.float64)
54- #work_corr7 = np.require(work_corr7, requirements=['A'])
55-
56- work_corr7f = np .zeros ((1024 ,1024 ), np .float32 )
55+ work_corr7f = np .zeros ((4096 , 4096 ), np .float32 )
5756work_corr7f = np .require (work_corr7f , requirements = ['A' ])
5857
5958class HybridPSF (object ):
0 commit comments