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')
Name |
Type |
Default |
Description |
|---|---|---|---|
|
Sampling interval (s) |
||
|
None |
Lower critical frequency (-3dB point). Pass None for lowpass |
|
|
None |
Higher critical frequency (-3dB point). Pass None for highpass |
|
|
None |
Fraction of impulse response to capture. If None, we use defaults from params |
|
|
‘bandpass’ |
Kind of filter, should be either ‘bandpass’, ‘bandstop’, ‘high’, or ‘low’ |
|
|
params.ORDER |
Order of filter |
|
|
‘butter’ |
Kind of filter to create |
Output variables#
Return annotation |
Docstring type |
Description |
|---|---|---|
|
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