I am passing simple IDL code for Python. However, the returned FFT values from SciPy / NumPy packages are different from the IDL, and I cannot understand why.
Reducing all this to a simple example of 8 elements, I found that the SciPy / NumPy routines return values that are 8 (2 ^ 3 times) more than the IDL (normalization problem that I was thinking about).
Here is a sample code (copied from here ) in both languages:
IDL
signal = ([-2., 8., -6., 4., 1., 0., 3., 5.])
fourier = fft(signal)
print, fourier
returns
(0.620495, 0.506282) (0.250000, 0.125000) (-1.175050, -1.74372) (-2.62500, -0.00000) (-1.177050, 1.74372) (0.250000, -0.1225000) (0.420495, -0.506282)
Python
from scipy.fftpack import fft
import numpy as N
…
signal = N.array([-2., 8., -6., 4., 1., 0., 3., 5.])
fourier = fft(signal)
print fourier
returns
[thirteen. + 0.j, 3.36396103 + 4.05025253j, 2. + 1.j, -9.36396103-13.94974747j, -21. + 0.j, -9.36396103 + 13.94974747j, 2. -1.j, 3.36396103 -4.05025253j]
NumPy, . print fft(signal, 8 ) , , .
, , 256 , , 8 256, 256 * 8! .
, , .
: , - IDL 256 8, . , .