signal.tests.test_fir_filter_design

Module Contents

Classes

TestFirwin()
TestFirWinMore() Different author, different style, different tests…
TestFirwin2()
TestRemez()
TestFirls()
TestMinimumPhase()

Functions

test_kaiser_beta()
test_kaiser_atten()
test_kaiserord()
test_kaiser_beta()
test_kaiser_atten()
test_kaiserord()
class TestFirwin
check_response(h, expected_response, tol=0.05)
test_response()
mse(h, bands)

Compute mean squared error versus ideal response across frequency band.

h – coefficients bands – list of (left, right) tuples relative to 1==Nyquist of

passbands
test_scaling()

For one lowpass, bandpass, and highpass example filter, this test checks two things:

  • the mean squared error over the frequency domain of the unscaled filter is smaller than the scaled filter (true for rectangular window)
  • the response of the scaled filter is exactly unity at the center of the first passband
class TestFirWinMore

Different author, different style, different tests…

test_lowpass()
test_highpass()
test_bandpass()
test_multi()
test_fs_nyq()

Test the fs and nyq keywords.

test_bad_cutoff()

Test that invalid cutoff argument raises ValueError.

test_even_highpass_raises_value_error()

Test that attempt to create a highpass filter with an even number of taps raises a ValueError exception.

class TestFirwin2
test_invalid_args()
test01()
test02()
test03()
test04()

Test firwin2 when window=None.

test05()

Test firwin2 for calculating Type IV filters

test06()

Test firwin2 for calculating Type III filters

test_fs_nyq()
class TestRemez
test_bad_args()
test_hilbert()
test_compare()
class TestFirls
test_bad_args()
test_firls()
test_compare()
class TestMinimumPhase
test_bad_args()
test_homomorphic()
test_hilbert()