Shortcut:
| Click |
Performs a Fast Fourier Transform (FFT) on a selected data record. The input data must be evenly spaced (have a constant interval). Unlike the other Generate commands, the FFT command creates a new document window for displaying the output, since the input and output records are in different domains.
Given a function of time h(t) with N consecutive sampled values, the FFT implementation used by DPlot calculates the corresponding function in the frequency domain as:

DPlot can use either of two FFT algorithms, dependent on the number of points (N) in the input record:
REALFT
Source: "Numerical Recipes" by W.H. Press, B.P. Flannery, S.A. Teukolsky, and W.T. Vetterling, Cambridge University Press, 1986.
REALFT requires that the number of points (N) in the input record be a power of 2.
EZFFTF
Developed by P.N. Swarztrauber, National Center for Atmospheric Research, Boulder, CO. Available on the World Wide Web at the NETLIB Repository, http://netlib2.cs.utk.edu.
EZFFTF does NOT have the same limitations on N, but can take significantly longer to compute the transform (see below).
The efficiency of the EZFFTF algorithm is highly dependent on the magnitude of the prime factors of N. For small prime factors, this routine is comparable in performance to the REALFT algorithm. However, for large prime factors, or for N equal to a large prime number, the run time of this routine can be several orders of magnitude longer than that for a comparable N consisting of small prime factors. The following table (based on a Pentium 90 MHz system) illustrates this fact.
N |
Prime Factors |
FFT Run Time |
16384 |
2^14 |
0.11 sec |
16379 |
19*431 |
1.00 sec |
16381 |
prime |
97. sec |
65536 |
2^16 |
0.50 sec |
65521 |
prime |
~33 minutes |
If N is not a power of 2, you can elect to pad the input record with 0 values out to the next higher power of 2 by selecting the first option in "Adjustment Options" in the "FFT Options" dialog box. This operation will significantly decrease the run time for FFT's on input records with N equal to a large prime.
If N is a power of 2, DPlot will always use the REALFT routine, regardless of the option selected.
If you are reasonably certain that you will always select the same options for performing an FFT, you can prevent the "FFT Options" dialog box from being displayed by selecting the "Don't show this dialog box..." check box. If you later decide that you need to change one or more options, exit DPlot, edit the file DPLOT.INI (in the Application Data\DPlot folder), and find the line "FFTOption=0xnnnn", where nnnn is a hexadecimal number. Set this value to 0x0001 and start DPlot.
X axis units
If data processing mode is currently in effect DPlot assumes that the X values are in units of milliseconds. Otherwise, DPlot scans the X axis label for the character strings "msec" or "millisec" (any combination of lower and upper case). If found, DPlot assumes that the X values are milliseconds. If not found, the X axis label is similarly checked for "microsec", "µsec", or "{\sm}sec" ( {\sm} is the control sequence for the Greek letter µ). If none of these values are found then seconds are assumed. The units of time are important only in determining the correct units for the frequency scale. If the assumptions described above are incorrect, then the frequency label for the FFT will be incorrect. For example, if the input is in milliseconds but DPlot incorrectly assumes seconds, the frequency values will be kilohertz rather than hertz.
|
Related macro commands |
Page url: http://www.dplot.com/help/index.htm?helpid_fft.htm