Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def shift_ifft(fh):
nx = fh.shape[0]
ny = fh.shape[1]
p0 = nx / 2
q0 = ny / 2
X, Y = np.meshgrid(np.arange(-p0, -p0 + nx) % nx,
np.arange(-q0, -q0 + ny) % ny,
indexing='ij')
fs = T2FFT.synthesize(fh, axes=(0, 1))
f = fs[X, Y, ...]
return f