aspcore.filterdesign

Functions to design and compute filters

Can be used to obtain FIR filters from frequency responses. Also contains helper functions associated with the discrete Fourier transform.

References

[benestyStudy2013] J. Benesty and J. Chen, Study and design of differential microphone arrays, vol. 6. in Springer Topics in Signal Processing, vol. 6. Springer, 2013.

Functions

calc_truncation_error(ir, ir_len[, two_sided])

Calculates the relative truncation error of an impulse response The relative error is how much of the power of the impulse response that is lost by truncating.

filterbank_third_octave(sig, sr[, min_freq, ...])

Filters the provided signal into third-octave bands using butterworth filters

fir_from_freqs_window(freq_filter, ir_len[, ...])

Constructs a FIR filter from frequency values

fir_from_frequency_function(freq_function, ...)

Constructs a FIR filter from a frequency function

fractional_delay_filter(delay, order)

Returns impulse response of a fractional delay filter using lagrange interpolation

min_truncated_length(ir[, two_sided, ...])

Calculates the minimum length you can truncate a filter to.

truncate_filter(ir, ir_len, two_sided)

Truncates the impulse response to the desired length Currently only works for two_sided=True and odd ir_len