Frequency spectrum with fft of a real valued array...?
postbox.holger at gmx.net
Mon Jan 22 14:05:00 CET 2007
Thank you for your tips. They were very useful.
Am 11.01.2007, 19:08 Uhr, schrieb Robert Kern <robert.kern at gmail.com>:
> Holger wrote:
>> What does it mean to me? How do I get to the wanted frequenca
> It's packed in the conventional FFT format. Here is a function in numpy
> successor to Numeric, which I assume that you are using) that generates
> corresponding frequencies in the same packed format:
> In : import numpy
> In : numpy.fft.fftfreq?
> Type: function
> Base Class: <type 'function'>
> Namespace: Interactive
> Definition: numpy.fft.fftfreq(n, d=1.0)
> fftfreq(n, d=1.0) -> f
> DFT sample frequencies
> The returned float array contains the frequency bins in
> cycles/unit (with zero at the start) given a window length n and a
> sample spacing d:
> f = [0,1,...,n/2-1,-n/2,...,-1]/(d*n) if n is even
> f = [0,1,...,(n-1)/2,-(n-1)/2,...,-1]/(d*n) if n is odd
More information about the Python-list