Menu

Examples of use

jon

The following call to fft

  $> fft < input.txt > output.txt

will consider the first column in the data file input.txt as the real-valued time-series to be transformed.

  $> fft -i input.txt -o output.txt -c

Same as above, except the option "-c" tells fft to interpret the input as complex data. The first and second columns are now interpreted as real and imaginary components of a complex time-series.

  $> fft --input-file input.txt --output-file output.txt \
         --complex -x 3 -y 6 --delimiter , --ordered-x-axis

Using the long options. In this example the option --delimiter , tells fft that the data columns are separated by ','. Here an x-column is specified. This instructs fft to treat that column as the time coordinate. Currently, all that is done is to calculate the average sample rate from the first and last values in this column and use that to generate a frequency axis for the output.

The "natural" way for fftw write its output is to write the negative frequencies "to the right" of the positive ones (i.e. something like [0,..,F,-F,..,0]). The option --ordered-x-axis tells fft to start with the negative frequencies (i.e. something like [-F,..,0,..,F]). The data is retrieved from column 6 and 7 and column 3 is used to infer the frequency.


Related

Wiki: Home

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.