Discrete Fourier Transform frequency domain

fourier transformpython

If we have a function $f(t)$ for $ t = a, a + \triangle t, …, b=a+n \triangle t$. And then I use the discrete Fourier transform on $f(t)$. Then what is the frequency domain of the result?

For example in Python module Numpy, the DFT only gives you the amplitude of the frequencies (list of amplitudes). But it does not say which amplitude is for which frequency.

Best Answer

Specifically for Python, you obtain the frequencies of the DFT by using numpy.fft.fftfreq(n,d) where n is the sample size and d is the sample spacing $\Delta t$, that is, the intervals at which you sample a signal: $t=\{0,\Delta t,2\Delta t,...,(N-1)\Delta t\}$. The frequency spacing will be $1/(N\Delta t)$. Indeed

$$\hat{x}_{\frac{n}{N\Delta t}}=\sum_{k=0}^{N-1}x_{k \Delta t} e^{-2\pi i(k\Delta t)(\frac{n}{N\Delta t })}=\sum_{k=0}^{N-1}x_{k \Delta t} e^{-2\pi i\frac{kn}{N}}$$

which is the DFT of the signal.

Reference here.

Related Question