FourierSpectrum (FPScript)
Computes the windowed Fourier spectrum.
Syntax
FourierSpectrum(Signal, [ SpectrumType = SPECTRUM_DBNORM ], [ Window = WIN_HANNING+WIN_NORMALIZEAMPLITUDE ], [ Adjustment ], [ FFTLength = 0 ] [ , Peaks ])
The syntax of the FourierSpectrum function consists of the following parts:
Part |
Description |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Signal |
The data to be analyzed. The data must have a constant sampling rate and must not contain void values. If this is not the case, then you should use the FourierSpectrumUneven function. Permitted data structures are data series, data matrix, signal und signal series. All real data types are permitted, except calendar time und time span. Void values are not permitted in this argument. For the X component additional restrictions do apply.The values must have a constant positive spacing. Void values are not permitted in this argument. If the argument is a list, then the function is executed for each element of the list and the result is also a list. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
SpectrumType |
The spectral format to be computed. The argument SpectrumType can have the following values:
Permitted data structures are scalar value. All integral data types are permitted. If the argument is a list, then the first element in the list is taken. If this is also a list, then the process is repeated. If this argument is omitted, it will be set to the default value SPECTRUM_DBNORM. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Window |
The fixed or adjustable data window to be applied to the data. The argument Window can have the following values:
If the argument is a list, then the first element in the list is taken. If this is also a list, then the process is repeated. If this argument is omitted, it will be set to the default value WIN_HANNING+WIN_NORMALIZEAMPLITUDE. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Adjustment |
The one-sided Fourier width as a multiple of the frequency interval. The valid range is window specific within 1.0 to 6.0. The default is 1.5 for a tapered cosine window and 3.0 for all other adjustable data windows. Permitted data structures are scalar value. All real data types are permitted. If the argument is a list, then the first element in the list is taken. If this is also a list, then the process is repeated. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
FFTLength |
The length of the Fourier transform. Zero padding applies if the FFT length is greater than the data length. The valid range is from the data length to the maximum limit of FFT. The default value is -1, which sets the FFT length equal to the next highest power of two. The default value is 0, which sets FFT length equal to the data length. Permitted data structures are scalar value. All integral data types are permitted. The value must be greater or equal to -1 and less or equal to 2147483648. If the argument is a list, then the first element in the list is taken. If this is also a list, then the process is repeated. If this argument is omitted, it will be set to the default value 0. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Peaks O |
If specified, only bin-interpolated peaks in the spectrum are output. The peaks can be specified as a number or determined using a dB threshold. Specify a number as a positive number from 1 to 100 without a unit. You can specify a dB threshold as a quantity with the unit dB between 0.01 dB and 300 dB, or as a negative number between -0.01 and -300 without a unit. This argument is permitted for one-dimensional data sets only. Permitted data structures are scalar value. All real data types are permitted. If the argument is a list, then the first element in the list is taken. If this is also a list, then the process is repeated. |
Remarks
The data structure of the result is signal or signal series. If the argument Signal is a data series or data matrix, then the X component of the result contains Nyquist-normalized frequencies.
Available in
FlexPro Basic, Professional, Developer Suite
Examples
FourierSpectrum(Signal, SPECTRUM_DBNORM, WIN_COS4BHARRIS92, 4, 8192)
Calculates the windowed Fourier spectrum for the equidistant signal 'Signal'. Normalized dB is used as the spectrum type, and Cos4 Blackman-Harris -92 dB W=4 is selected as the window type. The FFT length is 8192. This is an example from the Fourier Spectral Analysis tutorial.
See Also
FourierSpectrumUneven Function