Skip to content

Commit 30fb8aa

Browse files
committed
mp_fourier: call python version for tiny images
1 parent 7d57e76 commit 30fb8aa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tractor/psf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ def lanczos_shift_image(img, dx, dy, inplace=False, force_python=False):
3232
Ly /= Ly.sum()
3333

3434
#print('mp_fourier:', mp_fourier)
35-
if mp_fourier is None or force_python:
35+
H,W = img.shape
36+
if mp_fourier is None or force_python or W <= 8 or H <= 8:
3637
sx = correlate1d(img, Lx, axis=1, mode='constant')
3738
outimg = correlate1d(sx, Ly, axis=0, mode='constant')
3839
else:

0 commit comments

Comments
 (0)