def test_get_cefficients(self): B = (0.1, 0.2, 0.3) A = (0.4, 0.5, 0.6) f = linearfilter.Filter(B, A, fs=48000) print(f) self.verify_coefficients(f, B, A)
def test_set_cefficients(self): B = (0.7, 0.8, 0.9) A = (1.1, 1.2, 1.3) f = linearfilter.Filter(fs=48000) f.set_coefficients(B, A) print(f) self.verify_coefficients(f, B, A)
def test_normalise(self): B = (0.1, 0.2, 0.3) A = (0.4, 0.5, 0.6) f = linearfilter.Filter(B, A, fs=48000) print(f) f.normalise() unused_BB, AA = f.get_coefficients() self.assertAlmostEqual(AA[0], 1.0, places=7)
def test_get_feed_back(self): B = (0.1, 0.2, 0.3) A = (0.4, 0.5, 0.6) f = linearfilter.Filter(B, A, fs=48000) print(f) AA = f.get_feed_back() self.verify_coefficients(f, B, AA)
def test_get_feed_forward(self): B = (0.1, 0.2, 0.3) A = (0.4, 0.5, 0.6) f = linearfilter.Filter(B, A, fs=48000) print(f) BB = f.get_feed_forward() self.verify_coefficients(f, BB, A)
def test_str_method(self): f = linearfilter.Filter() self.assertIsInstance(f.__str__(), basestring)