shift2d

image_registration.fft_tools.shift.shift2d(data, deltax, deltay, phase=0, nthreads=1, use_numpy_fft=False, return_abs=False, return_real=True)[source]

2D version: obsolete - use ND version instead (though it’s probably easier to parse the source of this one)

FFT-based sub-pixel image shift. Will turn NaNs into zeros

Shift Theorem:

\[FT[f(t-t_0)](x) = e^{-2 \pi i x t_0} F(x)\]
Parameters:
datanp.ndarray

2D image

phasefloat

Phase, in radians