NumPy and FFT

William Park parkw at better.net
Sun May 21 20:00:42 EDT 2000


On Sun, May 21, 2000 at 11:09:11PM +0000, MrBlue wrote:
> Hi,
> 
> I installed NumPy to use the FFT function.
> I have a 1D array (say a) which contains real data (of wind velocity v(t))
> taken at a fixed sampling rate (5 Hz) i.e I have a file which contains 1
> measurement per line and I'd like to take the FT of these data, i.e having a
> 2D array (say b) which would contain omega in one column and the complex
> value (FT(v(t)))(omega) in another column for different values of omega.
> which function do i have to use in order to get b = FT(a) ?
> The fft function gives a 1D array as an output
> Any insight would be strongly appreciated.
> 
> Jad Courbage
> Physics Department
> McGill University
> Montreal
> Canada

I'm confused.  Since you're taking sample every 0.2 second, your
frequency step interval will be $1/N(0.2 sec) = (5Hz)/N$, where $N$ is
total number of sample data.  For example, if you took 1000 data, then
V(f) data contains FFT'ed value at every 0.005Hz.

--William




More information about the Python-list mailing list