utils.band_filter#

Back to Module page

Summary#

Creates desired filter, and computes its impulse response length

Signature#

def band_filter(dt, fmin = None, fmax = None, wfac = None, btype = 'bandpass', order = params.ORDER, filter_type = 'butter')
Input variables#

Name

Type

Default

Description

dt

Sampling interval (s)

fmin

None

Lower critical frequency (-3dB point). Pass None for lowpass

fmax

None

Higher critical frequency (-3dB point). Pass None for highpass

wfac

None

Fraction of impulse response to capture. If None, we use defaults from params

btype

‘bandpass’

Kind of filter, should be either ‘bandpass’, ‘bandstop’, ‘high’, or ‘low’

order

params.ORDER

Order of filter

filter_type

‘butter’

Kind of filter to create

Output variables#

Return annotation

Docstring type

Description

None

sos representation of filter coefficients, impulse response length

Docstring#

Creates desired filter, and computes its impulse response length
:param dt: Sampling interval (s)
:param fmin: Lower critical frequency (-3dB point). Pass None for lowpass
:param fmax: Higher critical frequency (-3dB point). Pass None for highpass
:param wfac: Fraction of impulse response to capture. If None, we use
             defaults from params
:param btype: Kind of filter, should be either 'bandpass', 'bandstop',
              'high', or 'low'
:param order: Order of filter
:param filter_type: Kind of filter to create
:return: sos representation of filter coefficients, impulse response length