utils.condition_filter_td#
Back to Module page
Summary#
Compute support, weight, and truncate input time domain filter
Signature#
def condition_filter_td(filt_td, support = None, truncate = False, taper = False, wfac = params.WFAC_FILT, taper_fraction = 0.2, min_trunc_len = 2)
Name |
Type |
Default |
Description |
|---|---|---|---|
|
Array with time domain filter with weight at the edges |
||
|
None |
Support to truncate at (in indices). If None, it is calculated from the filter itself |
|
|
False |
Flag indicating whether to truncate time-domain filter |
|
|
False |
Flag whether to taper the time domain response of the filter with a Tukey window. Applied ater truncating if truncate==True, else on the entire length |
|
|
params.WFAC_FILT |
(1 - Weight of the filter to capture)/2 |
|
|
0.2 |
Fraction of response to taper with a Tukey window, if applicable (0 is boxcar, 1 is Hann) |
|
|
2 |
minimum N_samples//2 after truncation |
Output variables#
Return annotation |
Docstring type |
Description |
|---|---|---|
|
|
Docstring#
Compute support, weight, and truncate input time domain filter
:param filt_td: Array with time domain filter with weight at the edges
:param support: Support to truncate at (in indices). If None, it is
calculated from the filter itself
:param truncate: Flag indicating whether to truncate time-domain filter
:param taper:
Flag whether to taper the time domain response of the filter with a
Tukey window. Applied ater truncating if truncate==True, else on the
entire length
:param wfac: (1 - Weight of the filter to capture)/2
:param taper_fraction:
Fraction of response to taper with a Tukey window, if applicable
(0 is boxcar, 1 is Hann)
:param min_trunc_len: minimum N_samples//2 after truncation
:return: 1. Array of the same size as filt_td with conditioned filter
2. Support of filter (TD filter has 2 * support - 1 nonzero coeffs)
3. Total weight of filter (sum w(t)^2)