<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.ice-online.com/index.php?action=history&amp;feed=atom&amp;title=FFT</id>
	<title>FFT - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.ice-online.com/index.php?action=history&amp;feed=atom&amp;title=FFT"/>
	<link rel="alternate" type="text/html" href="https://wiki.ice-online.com/index.php?title=FFT&amp;action=history"/>
	<updated>2026-06-10T15:30:07Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.1</generator>
	<entry>
		<id>https://wiki.ice-online.com/index.php?title=FFT&amp;diff=820&amp;oldid=prev</id>
		<title>ConvertBot: performs FFTs with overlap, windowing, and optional power spectral density</title>
		<link rel="alternate" type="text/html" href="https://wiki.ice-online.com/index.php?title=FFT&amp;diff=820&amp;oldid=prev"/>
		<updated>2020-04-27T22:05:07Z</updated>

		<summary type="html">&lt;p&gt;performs FFTs with overlap, windowing, and optional power spectral density&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;performs FFTs with overlap, windowing, and optional power spectral density&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;in1&amp;gt;   Input 1 file name&lt;br /&gt;
&amp;lt;out1&amp;gt;  File to receive FFT|PSD of input 1&lt;br /&gt;
&amp;lt;nfft&amp;gt;  Desired transform size.  Any factor supported [DEF=1k]&lt;br /&gt;
&amp;lt;win&amp;gt;   Name of time window to be computed and applied to the data [DEF=HANN]&lt;br /&gt;
&amp;lt;over&amp;gt;  The fraction of &amp;lt;nfft&amp;gt; to overlap blocks [DEF=0]&lt;br /&gt;
&amp;lt;navg&amp;gt;  Num of transforms to average in computing each output FFT frame [DEF=1]&lt;br /&gt;
&amp;lt;in2&amp;gt;   Input 2 file name [OPTIONAL]&lt;br /&gt;
&amp;lt;out2&amp;gt;  File to receive FFT|PSD of &amp;lt;in2&amp;gt; [OPTIONAL]&lt;br /&gt;
&amp;lt;cross&amp;gt; File to receive FFT of &amp;lt;in1&amp;gt; * conjugate of FFT of &amp;lt;in2&amp;gt; [OPTIONAL]&lt;br /&gt;
&lt;br /&gt;
This command performs Fast Fourier Transforms on a stream of data.  It replaces&lt;br /&gt;
the X-Midas commands FFT, MFFT, SPECTRA, and UBIQUITOUS.&lt;br /&gt;
&lt;br /&gt;
The transform size, &amp;lt;nfft&amp;gt;, is exact, and must be even if the input files are&lt;br /&gt;
real.  Performance is best if factorable by 2, 3, 4, and/or 5.  There is no&lt;br /&gt;
upper limit on the transform size.&lt;br /&gt;
&lt;br /&gt;
To output magnitude squared of the FFT bins, use the /MAG switch.&lt;br /&gt;
To output power spectral density of the FFT bins, use the /PSD switch.&lt;br /&gt;
To output MAG or PSD in 20log format, use the /LOG switch.&lt;br /&gt;
The /MAG, /LOG, and /PSD switches do NOT affect the &amp;lt;cross&amp;gt; output.&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;win&amp;gt; is one of the special codes listed in the WINDOW;DSP command, it is&lt;br /&gt;
computed internally, otherwise it is assumed to be the name of a file&lt;br /&gt;
containing a time domain window to be applied to the data.&lt;br /&gt;
&lt;br /&gt;
 THE FOLLOWING IS A TABLE OF ALLOWABLE WINDOWS AND THEIR PARAMETERS.&lt;br /&gt;
 Code     Sidelobe   Equivalent     Rolloff   Window Type&lt;br /&gt;
          Max (dB)   Bandwidth    (dB/Octave)&lt;br /&gt;
 NONE       -13        1.00           6       Rectangle or boxcar&lt;br /&gt;
 BARTlett   -27        1.33          12       Bartlett (triangle)&lt;br /&gt;
 HANNing    -32        1.50          18       Hanning (cosine bell)&lt;br /&gt;
 HAMMing    -43        1.36           6       Hamming (bell on pedestal)&lt;br /&gt;
 BLACkman   -58        1.73          18       Blackman&lt;br /&gt;
 BH61       -61        1.61           6       Blackman-Harris 3 weight&lt;br /&gt;
 BH67       -67        1.71           6       Blackman-Harris 3 weight optimal&lt;br /&gt;
 BH74       -74        1.79           6       Blackman-Harris 4 weight&lt;br /&gt;
 BH92       -92        2.00           6       Blackman-Harris 4 weight optimal&lt;br /&gt;
 (* see WINDOW;DSP for details)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;over&amp;gt; is the fraction of the transform size, &amp;lt;nfft&amp;gt;, to overlap blocks of&lt;br /&gt;
data from the input file.  This parameter is &amp;gt; 0 if overlap is desired, 0 if&lt;br /&gt;
blocks are  disjoint with no data skipped, and &amp;lt; 0 for disjoint blocks with&lt;br /&gt;
data skipped.  Legal range is (-1K,1).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;navg&amp;gt; specifies the number of FFTs to average in computing each output frame.&lt;br /&gt;
If -1, all available input data is used to create a single output frame.&lt;br /&gt;
&lt;br /&gt;
The /NEXP=n switch applies exponential averaging to the output frames.  The&lt;br /&gt;
weighting factor is 1/N for each new output frame.  This does not affect the&lt;br /&gt;
output frame rate as &amp;lt;navg&amp;gt; does.&lt;br /&gt;
&lt;br /&gt;
To remove the DC bias before computing FFTs, apply the /AC switch. This&lt;br /&gt;
eliminates the DC spectral sidelobes that can mask certain features of interest.&lt;br /&gt;
&lt;br /&gt;
The /1D switch causes processing to finish after one output frame has been&lt;br /&gt;
produced and sets the outputs to be type 1000 files.  This is the behavior of&lt;br /&gt;
the X-Midas FFT command if &amp;lt;navg&amp;gt;=1 and &amp;lt;win&amp;gt;=NONE, and the default behavior of&lt;br /&gt;
the X-Midas FFT command if &amp;lt;nfft&amp;gt;=-1.  Combining the /1D switch with the&lt;br /&gt;
/PSD switch gives the behavior of the X-Midas SPECTRA command and follows the&lt;br /&gt;
default behavior if &amp;lt;over&amp;gt;=.5 and &amp;lt;navg&amp;gt;=-1.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The input files may be complex or real.  If supplied, the second input file must&lt;br /&gt;
be of the same type as the first input file.  The &amp;lt;cross&amp;gt; output file is only&lt;br /&gt;
allowed if a second input file is supplied.  Keywords are only propagated from&lt;br /&gt;
the first input file to the &amp;lt;cross&amp;gt; output file.&lt;br /&gt;
&lt;br /&gt;
The /PACK switch controls how the nyquist bin is handled for real data.  The&lt;br /&gt;
/PACK=UNPACK switch unpacks it into its own bin which may cause sub-optimal&lt;br /&gt;
transfer lengths.  The /PACK=DC switch packs the real part of the nyquist bin&lt;br /&gt;
into the always zero imaginary component of the DC bin.  The /PACK=ZERO simply&lt;br /&gt;
drops the nyquist bin.  The default is UNPACK for single frame output modes and&lt;br /&gt;
ZERO for multi-frame output modes.&lt;br /&gt;
&lt;br /&gt;
The /PARTIAL switch is used to enable or disable the output of an extra frame if&lt;br /&gt;
an input file or pipe ends before providing enough data to complete the current&lt;br /&gt;
averaged transform (by zero-padding the input).  The default behavior&lt;br /&gt;
(/PARTIAL=START) is to force at least one frame of output if the input stops&lt;br /&gt;
short before any frames have been output, but partial data received after the&lt;br /&gt;
first output frame will be ignored.  /PARTIAL=NONE will discard any partial&lt;br /&gt;
frames, and /PARTIAL=ALL will force an extra frame whenever partial input data&lt;br /&gt;
is received, whether or not an output frame has already been written.&lt;br /&gt;
&lt;br /&gt;
For example, if the input file is 700 samples and the transform size&lt;br /&gt;
is 1K, then default behavior is to output no results; the /PARTIAL switch forces&lt;br /&gt;
the input data to be zero-padded to 1K and a single frame to be output.&lt;br /&gt;
Similarly, if the input file size is 8,000 samples, the FFT size is 1K and navg&lt;br /&gt;
is 4, then the default is to output one frame whereas /PARTIAL will generate two&lt;br /&gt;
frames.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
  1. To perform the SPECTRA command which produces a single output frame&lt;br /&gt;
    FFT/PSD/1D infile outfile 1k hann over=0.5 navg=-1&lt;br /&gt;
&lt;br /&gt;
  2. To perform the FFT command which produces a single output frame&lt;br /&gt;
    FFT/1D infile outfile 1k hann&lt;br /&gt;
&lt;br /&gt;
  3. To perform the UBIQUITOUS cross spectral function&lt;br /&gt;
    FFT in1=file1 in2=file2 cross=xfft nfft=4k&lt;br /&gt;
&lt;br /&gt;
  4. To perform the X-Midas FFT command with nfft=-1 (means all elements); use&lt;br /&gt;
     the win=NONE, navg=1 (default), and /1D switch.&lt;br /&gt;
    nM&amp;gt; FFT/1D infile outfile nfft=-1 win=none&lt;br /&gt;
&lt;br /&gt;
Switches:&lt;br /&gt;
  /1D         Output a type 1000 file. Stops processing input after producing&lt;br /&gt;
              one output frame.&lt;br /&gt;
  /ABSC       Align input files by abscissa, FALSE to align by index [DEF=TRUE]&lt;br /&gt;
  /AC         Take out DC bias before window and FFT&lt;br /&gt;
  /DBF        Compute dB Log output using fast exponent overlay method&lt;br /&gt;
              (good to +-.5 dB)&lt;br /&gt;
  /DP         Do double precision buffers and output if present&lt;br /&gt;
  /LOG        Output 20log of power spectral density (does not apply to &amp;lt;cross&amp;gt;)&lt;br /&gt;
  /MAG        Compute magnitude squared of FFT&lt;br /&gt;
  /NEXP=      Number of exponential averages [DEF=1]&lt;br /&gt;
  /PSD        Compute power spectral density of FFTs (scale by 1/dF)&lt;br /&gt;
  /PACK=x     Packing mode for real data (UNPACK,DC,ZERO). See /PACK switch&lt;br /&gt;
              docs above for more details.&lt;br /&gt;
  /PARTIAL=x  Padding option for incomplete input (NONE,START,ALL) [DEF=START]&lt;br /&gt;
  /ROTATE=F   Rotate bins of complex FFT to start at -NY/2 [DEF=TRUE]&lt;br /&gt;
  /SCALE=f    Specify a scaling factor&lt;br /&gt;
  /SMOOTH=n   Exponential smoothing of output N frames deep&lt;br /&gt;
  /TL=n       if transfer length is less than &amp;lt;nfft&amp;gt;, input will be zeropadded&lt;br /&gt;
              All consume/overlap will be based on the /TL length. [DEF=&amp;lt;nfft&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
See Also:  SPECTRA, nxm.sys.libm.Fft, WINDOW;DSP, nxm.sys.libm.Window&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:NXM_Explain]]&lt;/div&gt;</summary>
		<author><name>ConvertBot</name></author>
		
	</entry>
</feed>