Fast Fourier Transforms

Starting Up

This assumes you have  some data  from ACQUIRE and named it as time, channel0, and channel1.

Here we generate some some sample data.

time = Table[0.1 tt, {tt, 1, 1000, 1}];
channel0 = 
        Table[Sin[0.03 tt] Sin[0.1 tt ] +  
            0.5  Random[Real, -1, 1], {tt, 1, 1000, 
            1}];
fdata =  Transpose[{time, channel0}];
ListPlot[fdata, PlotJoined -> True]

Doing the FFT

This uses the built-in function Fourier. The following commands take the FFT, keeps the appropriate points, figures out period and frequency and gives data pairs of the spectral density vs. period and frequency.

Clear[ftrans0, npts, freq, period, ff0, pf0];   
ftrans0 = Drop[Abs[Fourier[channel0]]^2, 1];   
npts = Length[ftrans0] + 1;
ftrans0 = Take[ftrans0, npts/2];  
samplingPeriod = 
        time[[npts]]/npts;
nyquist = 
        1/(2 samplingPeriod);
freq = Range[1, npts/2, 1]*(nyquist/(npts/2));   
period = 1/freq;
ff0  =  Transpose[{freq, ftrans0}];   
pf0  =  Transpose[{period, ftrans0}];

Plotting your data

You can check your data with a plot:

ListPlot[ff0, PlotJoined -> True, PlotRange -> All];

Blow up the interesting region:

ListPlot[ff0, PlotRange -> {{0,  .5}, {0, 70}}];