Admin Production ni-theme
Current Publication

CxWindFIR_Filtering

LabWindows/CVI

CxWindFIR_Filtering

Advanced Analysis Library Only

AnalysisLibErrType CxWindFIR_Filtering (NIComplexNumber inputArray[], ssize_t numberOfElements, int numberOfCoeffs, int filterType, double samplingFrequency, double lowerCutoff, double upperCutoff, int windowType, double windowParameter, NIComplexNumber outputArray[]);

Purpose

Filters the complex array using the set of windowed FIR filter coefficients.

Parameters

Input
Name Type Description
inputArray NIComplexNumber [] Array containing the raw data to filter.
numberOfElements ssize_t Number of elements in the input array inputArray.
numberOfCoeffs int The total number of FIR filter coefficients.
filterType int The type of filter. filterType must be one of the following values:

Constant Value Description
LOWPASS 0 Designs an FIR narrowband lowpass filter.
HIGHPASS 1 Designs an FIR narrowband highpass filter.
BANDPASS 2 Designs an FIR narrowband bandpass filter.
BANDSTOP 3 Designs an FIR narrowband bandstop filter.
samplingFrequency double The frequency in Hertz at which you want to sample inputArray. This value must be greater than 0.
lowerCutoff double The cutoff frequency for LOWPASS or HIGHPASS filters, or the low cutoff frequency for BANDPASS or BANDSTOP filters, in Hertz. This value must be 0 < lowerCutoff < upperCutoff < 0.5 * samplingFrequency.
upperCutoff double The high cutoff frequency for BANDPASS or BANDSTOP filters, in Hertz. This parameter is not referenced if filterType is LOWPASS or HIGHPASS. This value must be 0 < lowerCutoff < upperCutoff < 0.5 * samplingFrequency.
windowType int The type of window to apply. windowType must be one of the following values:

Window Type Constant Value
Rectangle RECTANGLE 0
Hanning HANNING 1
Hamming HAMMING 2
Blackman-Harris BLKHARRIS 3
Exact Blackman EXBLKMAN 4
Blackman BLKMAN 5
Flat Top FLATTOP 6
4-Term Blackman-Harris BH4TERM 7
7-Term Blackman-Harris BH7TERM 8
Lowside LB LOWSIDELB 9
Blackman-Nuttall BLKMANNUTTAL 11
Triangle TRIANGLE 30
Kaiser KAISER 60
Dolph-Chebyshev DOLCHEBYSHEV 61
Gaussian GAUSSIAN 62
windowParameter double The window parameter. This parameter is referenced only if windowType is one of the following values:
  • KAISER: windowParameter specifies the beta parameter for a Kaiser window.
  • GAUSSIAN: windowParameter specifies the standard deviation for a Gaussian window. If windowParameter < 0, the function uses 0.2 for windowParameter instead.
  • DOLCHEBYSHEV: windowParameter specifies the ratio of the mainlobe to the sidelobe, in dB, for a Dolph-Chebyshev window. If windowParameter < 0, the function uses 60dB for windowParameter instead.
Output
Name Type Description
outputArray NIComplexNumber [] Filtered data. This array must be at least (numberOfElements + numberOfCoeffs – 1) elements long.

Return Value

Name Type Description
status AnalysisLibErrType A value that specifies the type of error that occurred. Refer to analysis.h for definitions of these constants.

Additional Information

Library: Advanced Analysis Library

Include file: analysis.h

LabWindows/CVI compatibility: LabWindows/CVI 2012 and later