I have a vector with an exponential decay, using Numpy:
t=np.arange(128) k=0.1 decay=np.exp(-k*t)
I would like to compute the discrete Fourier transform (DFT) of
decay so I get the same result as applying
np.fft.rfft(decay, n=128*2). I tried the formula described here plus some similar ones (without square terms in the denominator) but I never got the same result. The final result I want seems to be a one-sided Lorentzian? The reason I want to do this is because computing a Lorentzian is faster than computing an exponential and then applying fft.
To summarize, is there an easy way to compute the DFT for a given exponential decay function of known