title: amplitude of numpy's fft results is to be multiplied by sampling period?
body: <p>I try to validate my understanding of Numpy's FFT with an example: the Fourier transform of <code>exp(-pi*t^2)</code> should be <code>exp(-pi*f^2)</code> when no scaling is applied on the direct transform. </p>
  
  <p>However, I find that to obtain this result I need to multiply the result of FFT by a factor <code>dt</code>, which is the time interval between two sample points on my function. I don't understand why. Can anybody help ? </p>
  
  <p>Here is a sample code:</p>
  
  <pre><code># create data
  N = 4097
  T = 100.0
  t = linspace(-T/2,T/2,N)
  f = exp(-pi*t**2)
  
  # perform FT and multiply by dt
  dt = t[1]-t[0]
  ft = fft(f)  * dt      
  freq = fftfreq( N, dt )
  freq = freq[:N/2+1]
  
  # plot results
  plot(freq,abs(ft[:N/2+1]),'o')
  plot(freq,exp(-pi*freq**2),'r')
  legend(('numpy fft * dt', 'exact solution'),loc='upper right')
  xlabel('f')
  ylabel('amplitude')
  xlim(0,1.4)
  </code></pre>