def OneOverF(N):
    import numpy as np
N2 = N / 2
x = np.hstack((1, np.arange(1, N2 + 1), np.arange(N2 - 1, 0, -1)))
hf = 1 / (2 * np.pi * x / N2)
ht = np.real(np.fft.ifft(hf))
htrot = np.roll(ht, N2)
htwin = htrot * np.hamming(N)
return ht, htrot, htwin
Fourier space filtering