help-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gsl] About FFT


From: Fred Perras
Subject: Re: [Help-gsl] About FFT
Date: Wed, 19 Jun 2013 14:58:51 -0400

The width of the window you have in the frequency domain is determined by
the Nyquist sampling theorem, so the total spectral width is 1/DW, where DW
is the dwell time (the time between each of your data points).  So, for
example, if you have a time increment of 1ns, the width of the frequency
window will be 1GHz.  If you have 1000 time points, then you will have 1000
frequency points (spaced evenly by 1MHz in my example).

That being said, in GSL and other libraries for FFTs such as FFTW they do
not order the intensities in the frequency domain from lowest to highest.
 The first point (index of 0) is the frequency = 0 point and then each of
the following points moves up in frequency by 1/(DW*TD) (TD is the total
number of data points) until the index number TD/2.  The TD/2 index has a
frequency in the middle and then the second half of the indices start off
from the lowest frequency and make their way up to the middle.  This is
explained in a table at the bottom of the page.

http://www.gnu.org/software/gsl/manual/gsl-ref.html#Fast-Fourier-Transforms

If ever you are unsure, do the FFT of a pulse and it should be a sin(x)/x
shape centered at 0 frequency; that should help you sort it our more
graphically.

Fred


On Wed, Jun 19, 2013 at 2:30 PM, Daniel de Oliveira Pereira <
address@hidden> wrote:

> Hi. Im trying to use the FFT to do a filter for my signals. They dont have
> a fixed length but isnt also a real-time filtering.
>
> I understand the concept of frequency domain but what i dont get is how can
> i determine for each increment what frequency im supose to get. For an
> example, i have 5000 samples of a heartbeat signal at 250hz sample
> frequency. Im supose to have a 5000 size variable but for each increment,
> what frequency it should be? The n=0 is f=0? And for n=1? the frequency
> would be 1hz? Or should be (250/5000)*(1)? Or its another formula?
>
> May be a little confuse text due my bad english, but i did my best.
>
> Regards,
> Daniel
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]