Recently I do simulation on Lorentzian Function with FFT
Lorentzian Function is
import numpy as np from scipy import fft import matplotlib.pyplot as plt a =1 N = 500 x =np.linspace(-30,30,N) lorentz = (2*a) * (1/(a**2 + x**2)) fourier = (fft.fft(lorentz)) fig, (ax1) = plt.subplots(nrows=1, ncols=1) ax1.loglog(abs(fourier[0:int(N/2)]),basey=np.e) ax1.grid(True) plt.show()
According to contour integration, it's supposed to be
It's supposed to be linear,when I plot it on
But there are some oscillation on it.
I could not figure out the reason of oscillation.