Computes the minimum order of a Butterworth low-pass or high-pass filter.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real64), | intent(in) | :: | fp |
The passband edge frequency, in Hz. |
||
| real(kind=real64), | intent(in) | :: | fs |
The sampling frequency, in Hz. |
||
| real(kind=real64), | intent(in) | :: | fstop |
The stopband edge frequency, in Hz. |
||
| real(kind=real64), | intent(in) | :: | apass |
The maximum passband attenuation, in dB. |
||
| real(kind=real64), | intent(in) | :: | astop |
The minimum stopband attenuation, in dB. |
||
| integer(kind=int32), | intent(in), | optional | :: | ftype |
LOW_PASS_FILTER (default) or HIGH_PASS_FILTER. |
The minimum filter order.
Computes the complex frequency response of a rational filter.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real64), | intent(in) | :: | b(:) |
The numerator coefficients of the rational transfer function. |
||
| real(kind=real64), | intent(in) | :: | a(:) |
The denominator coefficients of the rational transfer function. |
||
| real(kind=real64), | intent(in) | :: | f(:) |
The frequencies at which to evaluate the response, in Hz. |
||
| real(kind=real64), | intent(in) | :: | fs |
The sampling frequency, in Hz. |
The complex frequency response at each frequency in f.
Designs a windowed, linear-phase FIR filter.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int32), | intent(in) | :: | n |
The requested number of taps. Even values are increased by one. |
||
| real(kind=real64), | intent(in) | :: | fc |
The first cutoff frequency, in Hz. |
||
| real(kind=real64), | intent(in) | :: | fs |
The sampling frequency, in Hz. |
||
| real(kind=real64), | intent(out), | allocatable | :: | b(:) |
The numerator coefficients of the designed filter. |
|
| real(kind=real64), | intent(out), | allocatable | :: | a(:) |
The denominator coefficients. This is always [1.0]. |
|
| real(kind=real64), | intent(in), | optional | :: | fc2 |
The second cutoff frequency for band-pass and band-stop filters. |
|
| integer(kind=int32), | intent(in), | optional | :: | ftype |
The filter type. The default is LOW_PASS_FILTER. |
|
| class(window), | intent(inout), | optional, | target | :: | win |
The window function. The default is a Hamming window. |
Designs an nth-order Butterworth IIR low-pass or high-pass filter.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int32), | intent(in) | :: | n |
The Butterworth filter order. |
||
| real(kind=real64), | intent(in) | :: | fc |
The cutoff frequency, in Hz. |
||
| real(kind=real64), | intent(in) | :: | fs |
The sampling frequency, in Hz. |
||
| real(kind=real64), | intent(out), | allocatable | :: | b(:) |
The numerator coefficients of the designed filter. |
|
| real(kind=real64), | intent(out), | allocatable | :: | a(:) |
The denominator coefficients of the designed filter. |
|
| integer(kind=int32), | intent(in), | optional | :: | ftype |
LOW_PASS_FILTER (default) or HIGH_PASS_FILTER. |