|
Code Packages
1
Add-on code processing modules
|
Provides finite impulse response (FIR) filters More...
Static Public Member Functions | |
| static double [] | BandPass (double fc_Low, double fc_High, double fs, int samples, Window.Type w) |
| Returns a normalized band pass filter kernel using the specified window. More... | |
| static double [] | BandStop (double fc_Low, double fc_High, double fs, int samples, Window.Type w) |
| Returns a normalized band stop filter kernel using the specified window. More... | |
| static double [] | DC_Unity (double[] A) |
| DC unity gain More... | |
| static double [] | Filter (double[] A, double[] kernel) |
| Filter operation used to filter data using the specified filter kernel. More... | |
| static double [] | HBandH (int samples, Window.Type w) |
| Returns a normalized high pass half band filter kernel using the specified window More... | |
| static double [] | HBandL (int samples, Window.Type w) |
| Returns a normalized low pass half band filter kernel using the specified window More... | |
| static double [] | HighPass (double fc, double fs, int samples, Window.Type w) |
| Returns a normalized high pass filter kernel using the specified window. More... | |
| static double [] | LowPass (double fc, double fs, int samples, Window.Type w) |
| Returns a normalized low pass filter kernel using the specified window. More... | |
| static double [] | Sinc (double f_fs, int samples) |
| Returns a rectangular sinc filter kernel, that is a truncated and shifted version of the ideal sinc function More... | |
| static double [] | SpectralInverse (double[] kernel) |
| Invert the frequency spectrum of the specified filter kernel. More... | |
Provides finite impulse response (FIR) filters
|
static |
Returns a normalized band pass filter kernel using the specified window.
The impulse response has unity gain at DC and left-right symmetry.
| fc_Low | low cut-off frequency (Hz) |
| fc_High | high cut-off frequency (Hz) |
| fs | sampling rate (Hz) |
| samples | kernel size, should be an odd number |
| w | Window type |
Example
|
static |
Returns a normalized band stop filter kernel using the specified window.
The impulse response has unity gain at DC and left-right symmetry.
| fc_Low | low cut-off frequency (Hz) |
| fc_High | high cut-off frequency (Hz) |
| fs | sampling rate (Hz) |
| samples | kernel size, should be an odd number |
| w | Window type |
Example
|
static |
DC unity gain
| A | real array |
Example
|
static |
Filter operation used to filter data using the specified filter kernel.
FIR filter function runs the convolution function Signal.Convolution and removes the extra samples from the end.
The output signal has the same size as the input signal.
Note: If the same filter kernel is to be used by many signals, run the kernel function just once, and apply the filter function per signal.
| A | real array |
| kernel | filter kernel |
Example
The following example shows how to filter an input signal (A) using a low pass filter.
|
static |
Returns a normalized high pass half band filter kernel using the specified window
The cut off frequency is set to 0.25 as a fraction of the sampling rate. The impulse response has unity gain at DC and left-right symmetry.
| samples | kernel size, should be an odd number |
| w | Window type |
Example
|
static |
Returns a normalized low pass half band filter kernel using the specified window
The cut off frequency is set to 0.25 as a fraction of the sampling rate. The impulse response has unity gain at DC and left-right symmetry.
| samples | kernel size, should be an odd number |
| w | Window type |
Example
|
static |
Returns a normalized high pass filter kernel using the specified window.
The impulse response has unity gain at DC and left-right symmetry.
| fc | cut-off frequency (Hz) |
| fs | sampling rate (Hz) |
| samples | kernel size, should be an odd number |
| w | Window type |
Example
|
static |
Returns a normalized low pass filter kernel using the specified window.
The impulse response has unity gain at DC and left-right symmetry.
| fc | cut-off frequency (Hz) |
| fs | sampling rate (Hz) |
| samples | kernel size, should be an odd number |
| w | Window type |
Example
|
static |
Returns a rectangular sinc filter kernel, that is a truncated and shifted version of the ideal sinc function
| f_fs | frequency as a fraction of the sampling rate (0..0.5). |
| samples | kernel size, should be an odd number |
Example
|
static |
Invert the frequency spectrum of the specified filter kernel.
Spectral inversion is performed in time domain and results the frequency response of the impulse to being flipped top-for-bottom.
| kernel | filter kernel with unity gain at DC |
Example