📄 fft.1
字号:
the number of frequencies in the output spectral records is 1 + 2^(order \- 1).If the \fB\-c\fP option is used or the input data type is complex,the number of frequencies in the output spectral records is 1 + 2^order..TP .B \-cSpecifies that complex spectra (type SPTYP_CPLX) be stored in the outputFEA_SPEC file. .TP.B \-zSpecifies that \fIfft\fP operate silently, without issuing various warnings. .TP.BI \-x " debug_level" "\fR [0]"A positive value specifiesthat debugging output be printed on the standard error output.Larger values result in more output.The default is 0, for no output..SH ESPS PARAMETERS.PP.PPThe parameter file is not required to be present, as there are default parameter values that apply. If the parameter file does exist, the following parameters are read:.TP.I "start - integer".IPThe first point in the input sampled data file that is processed. Avalue of 1 denotes the first sample in the file. This is only readif the \fB\-r\fP and \fB\-p\fP options are not used.If it is not in the parameter (or Common) file,the default value of 1 is used. .TP.I "nan - integer".IPThe total number of data points to process. If .I nanis 0,all points from.I startthrough the end of the file are processed.This parameter is not read if the.B \-ror.B \-poption is used.(See the discussion under \fB\-r\fP)..TP.I "frame_len - integer".IPThe number of points in each frame. This parameter is not read if the.B \-loption is specified. A value of 0 indicates that the transform length(determined by the fft order) is to be used as a default;the same default value is used in case.I frame_lenis specified neither with the.B \-loption nor in the parameter file..TP.I "step \- integer"Initial points of consecutive frames differ by this number of samples.This parameter is not read if the.B \-Soption is specified.If the option is omitted and no value is found in the parameter file,a default equal to.I frame_lenis used (resulting in exactly abutted frames).The same default applies if \fIstep\fP is given the value 0..TP.I "window_type \- string"The data window to apply to the data.This parameter is not read if the command-line option.B \-wis specified.If the option is omitted and if no value is found in the parameter file,the default used is "RECT", for a rectangular window with amplitude one.Other acceptable values include"HAMMING", for Hamming, "HANNING" for Hanning, "COS4" for cos^4,and "TRIANG", for triangular;see the window(3-ESPSsp) manual page for the complete list..TP.I "order \- integer".IPThe order of the fft \- the transform length is 2^order (2 to the order-thpower). If no value is given in the file, a default value of 10 is used(transform length 1024). This value is not read if the command line option\fB\-o\fP is used..PPThe values of parameters obtained from the parameter file are printedif the environment variable ESPS_VERBOSE is 3 or greater. The defaultvalue is 3..sp 1.SH EXAMPLE.PPThe following \fIcsh\fP script demonstrates the use of \fIfft\fP andother ESPS programs to produce a frequency-zoomed spectrogramsuitable for display by \fIxwaves\fP..nf#!/bin/csh -f# This script is designed to be used as an xwaves "add_espsf" program.# To use it with xwaves, send a command like# # add_espsf name zoom7k.2k menu wave command xwzoomer 7000 2000# # This will add a menu entry to the waveform display menu that will# produce a zoomed-in spectrogram with a bandwidth of 2kHz and a center# frequency of 7kHz. By modifying the "-l" and "-o" options sent to fft# (see below), you can effectively increase or decrease the frequency# resolution as needed. Commands like the one above can either be# entered directly into the xwaves command window in the "COMMAND (or# @file)" line, or from an external process via the "send_xwaves"# program (see eman send_xwaves).# Note that this script is pretty slow, and can be made VERY slow, if# the "bandwidth" parameter is not an integral sub-multiple of the input# file's sample frequency.if ( $#argv < 5 ) then echo Usage: xwzoomer center_freq bandwidth range input.sd output.fspecendif# Center Frequencyset cf = $1# Analysis bandwidthset bw = $2# Range of points to include in zoomed analysis (e.g. -r1234:23000)set range = $3set input = $4set output = $5# Analysis frame interval for FFT (sec)set frint = .004set sf = `hditem -i record_freq $input`set step = `echo $frint $bw \* p q | dc`set np = `echo $range | sed 's/\-r//' | sed 's/\:/ /'`set npoints = `echo $np[2] $np[1] - 1 + p q | dc`echo int new_sample_freq = $bw";" > /tmp/Psfparamstestsd -c -r $sf -p $npoints -f -$cf - | multsd $range -t -z $input - - | \sfconvert -P/tmp/Psfparams - - | \/h8/dt/apl/zoomer/fftnew/fft -z -l256 -S $step -o8 -O$cf -wHANNING - - | \feafunc -fre_spec_val -f- -tBYTE - - | \clip -m0:118 -fre_spec_val -f- - $output.fi.SH "ESPS COMMON".PP.PPESPS Common is read provided that Common processing is enabled and that the .I filenameentry in Common matches .I sd_file,in which case parameters present in Common override values fromthe parameter file, which in turn may be overriden by commandline options (see the discussion in ESPS PARAMETERS and undereach option). .PPIf Common processing is enabled and if.I fea_spec_fileis not standard output, the Common parameters .I "filename, prog, start,"and.I nanare written to Common, where .I filenameis set to the input .I sd_file..PPESPS Common processing may be disabled by setting the environment variableUSE_ESPS_COMMON to "off".The default ESPS Common file is .espscom in the user's home directory.This may be overidden by settingthe environment variable ESPSCOM to the desired path. User feedback ofCommon processing is determined by the environment variable ESPS_VERBOSE,with 0 causing no feedback and increasing levels causing increasinglydetailed feedback. If ESPS_VERBOSE is not defined, a default value of 3 isassumed..SH ESPS HEADERS.PP.I fftreads the value of .I common.typefrom the input SD file .I sd_file. .PPRelevant fields in the type-dependent portion of the output file header are filled appropriately.The standard generic header items required for FEA_SPEC filesare filled in (see \fIFEA_SPEC\fP(5-ESPS) for details).The generic header item.I "fft_length"is set to the length of the fft (2^order), the item.I "step"is set to the step size (see \fB\-S\fP), andthe item .I input_data,value either complex or real,is added. The CODED genericheader item \fIwindow_type\fP is set according to to the windowtype (see \fB\-w\fP). .PPThe generic header item \fIstart_time\fP (type DOUBLE) is written inthe output file. The value written is computed by taking the\fIstart_time\fP value from the header of the input file (or zero, ifsuch a header item doesn't exist) and adding to it the offset time(from the beginning of the input file) of the first point processedplus one half of \fIframe_len\fP. (Thus, \fIstart_time\fP is middle ofthe first frame, which is appropriate since the output data representthe entire frame; without this adjustment for \fIframe_len\fP,\fIwaves\fP+ displays would not line up properly.) .PPThe generic header item \fIrecord_freq\fP (type DOUBLE) is written inthe output file. The value is the number of output records per secondof input data..SH "FUTURE CHANGES".PP.SH "SEE ALSO".PP.nf\fIfftinv\fP(1\-\s-1ESPS\s+1), \fIplotspec\fP(1\-\s-1ESPS\s+1), \fIexprompt\fP(1\-\s-1ESPS\s+1), \fIexpromptrun\fP(1\-\s-1ESPS\s+1), \fIrefcof\fP(1\-\s-1ESPS\s+1), \fIme_spec\fP(1\-\s-1ESPS\s+1),\fIxtext\fP(1\-\s-1ESPS\s+1), \fIFEA_SD\fP(5\-ESPS), \fIFEA_SPEC\fP(5\-ESPS), \fIESPS\fP(5\-ESPS)..SH "BUGS".PP.SH "REFERENCES".PPJ. W. Cooley and J. W. Tukey, "An Algorithm for the Machine Calculation ofComplex Fourier Series," \fIMath. Computation\fP, Vol. 19, 1965, pp. 297-301..spAlan V. Oppenheim and Ronald W. Schafer, \fIDigital Signal Processing\fP.Englewood Cliffs, New Jersey: Prentice-Hall, Inc., 1975..SH "AUTHOR".PPOriginal manual page and program by Rod Johnson; revised by John Shore for ESPS 3.0. Revised by John Shore for windowing and overlapping frames. Revised by Rod Johnson for output to FEA_SPEC file. Revised forFEA_SD input files by David Burton. \fIxfft\fP by John Shore.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -