FFTPLOT
Section: User Commands (1)
Updated: July 2012
Index
Return to Main Contents
NAME
fftplot - Fast Fourier Transform and plot.
SYNOPSIS
This reads in a data-file containing one or more columns of int/float data. The FFT is calculated.
Data is plotted: raw,amplitude,power-spectrum. The strongest frequency is identified.
DESCRIPTION
fftplot: plot a data-file, and its frequency spectrum by FFT. Show summary information.
USAGE: fftplot.py [OPTS] infile.dat
OPTIONS: -f, --samplefreq FREQ define the sampling frequency in Hz. [default: 1.0].
-c, --column N,sum,all use Nth column's data (N is 0-based). [default: all].
-a, --amplitude fft y-axis: amplitude. [default: power]
-p, --power fft y-axis: power spectrum (redundant). [default: power]
-d, --decibels fft y-axis: power in dB. [default: linear power]
-l, --logfreq fft x-axis: frequency on log-scale. [default: linear]
-s, --squelch_lf FREQ exclude frequencies <= FREQ from summary and plot. 0 hides DC.
-z, --zoom zoom x-axis to "area of interest" (10x around modal point).
-t, --title TITLE override plot title
-x, --xlabel LABEL override x-axis label
-y, --xlabel LABEL override y-axis label
-u, --ulabel L,A,BE,LS override legend labels.
-r, --plotraw also plot the raw input file. [default: just plot FFT].
-o, --outplot FILE.png save main plot: FILE.png/.jpg, even if -n, "auto" names for infile.
-n, --noplot don't draw the plot window on screen (useful for testing/scripting).
-h, --help show help.
INPUT: Input file, infile.dat ('-' for stdin) should be columns of (int/float) data, separated by
whitespace, with optional #comments, i.e. the standard form for numpy.loadfile(). cf. genffttest.
(compressed files (.gz/.bz2) can also be read transparently, no need to uncompress first.)
NOTES: * The FFT is normalised, such that a signal x = A.cos(2.PI.f.t) + B.sin(2.PI.f.t),
the power-spectrum has a point at (A^2 + B^2), and frequency f. But if f is unaligned,
i.e. f != n*(samplerate/num_samples), then its power will be spread over several bins.
* This does no apodisation: the window is effectively rectangular.
* Use squelch_lf when the chart is dominated by dc/low-freq. (Can still pan to see LF).
* When zooming automatically (-z), the DC level (f=0) is never considered "interesting".
AUTHOR
The author of fftplot and this manual page is Richard Neill, <maths#AT(spamblock)#richardneill.org>
Copyright July 2012; this is Free Software (GPL v3+), see the source for copying conditions.
SEE ALSO
fftplot(1),
linregplot(1),
dataplot(1),
decimate(1),
cam2dat(1),
dat2wav(1),
ni4462_test(1),
cut(1),
paste(1)
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- AUTHOR
-
- SEE ALSO
-
This document was created by
man2html,
using the manual pages.
Time: 18:34:18 GMT, November 11, 2013