dm_filter Module

IIR filter module, based on FORTRAN 77 procedures by David Harris:

  • Harris, D. (1990): XAPiir. A Recursive Digital Filtering Package. Technical Report. Lawrence Livermore National Laboratory. DOI: doi.org/10.2172/6416972

Uses

  • module~~dm_filter~~UsesGraph module~dm_filter dm_filter module~dm_const dm_const module~dm_filter->module~dm_const module~dm_kind dm_kind module~dm_filter->module~dm_kind module~dm_const->module~dm_kind iso_fortran_env iso_fortran_env module~dm_kind->iso_fortran_env

Used by

  • module~~dm_filter~~UsedByGraph module~dm_filter dm_filter module~dmpack dmpack module~dmpack->module~dm_filter

Variables

Type Visibility Attributes Name Initial
integer, public, parameter :: FILTER_MAX_ORDER = 8

Max. order (number of poles).

integer, public, parameter :: FILTER_BESSEL = 1

Bessel.

integer, public, parameter :: FILTER_BUTTERWORTH = 2

Butterworth.

integer, public, parameter :: FILTER_CHEBYSHEV1 = 3

Chebyshev Type I.

integer, public, parameter :: FILTER_CHEBYSHEV2 = 4

Chebyshev Type II.


Functions

public pure elemental function dm_filter_is_valid(filter) result(valid)

Returns .true. if prototype is a valid filter enumerator:

Read more…

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: filter

Filter enumerator (FILTER_*).

Return Value logical


Subroutines

public pure subroutine dm_filter_high_pass(filter, data, order, cutoff, ts, zp, attenuation, transition)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: filter

Filter enumerator (FILTER_*).

real(kind=r8), intent(inout) :: data(:)

Sequence to be filtered.

integer, intent(in) :: order

Order (#poles), not to exceed FILTER_MAX_ORDER.

real(kind=r8), intent(in) :: cutoff

Low-frequency cut-off of filter [Hz].

real(kind=r8), intent(in) :: ts

Sampling interval [sec].

logical, intent(in) :: zp

Zero phase filtering if .true., else single pass filtering.

real(kind=r8), intent(in), optional :: attenuation

Chebyshev stopband attenuation factor.

real(kind=r8), intent(in), optional :: transition

Chebyshev transition bandwidth (fraction of low-pass prototype passband width).

public pure subroutine dm_filter_low_pass(filter, data, order, cutoff, ts, zp, attenuation, transition)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: filter

Filter enumerator (FILTER_*).

real(kind=r8), intent(inout) :: data(:)

Sequence to be filtered.

integer, intent(in) :: order

Order (#poles), not to exceed FILTER_MAX_ORDER.

real(kind=r8), intent(in) :: cutoff

High-frequency cut-off of filter [Hz].

real(kind=r8), intent(in) :: ts

Sampling interval [sec].

logical, intent(in) :: zp

Zero phase filtering if .true., else single pass filtering.

real(kind=r8), intent(in), optional :: attenuation

Chebyshev stopband attenuation factor.

real(kind=r8), intent(in), optional :: transition

Chebyshev transition bandwidth (fraction of low-pass prototype passband width).