diff options
author | Tom Rondeau | 2011-12-22 18:19:28 -0500 |
---|---|---|
committer | Tom Rondeau | 2011-12-22 18:19:28 -0500 |
commit | 5faab4fbcf423cc614d53f0f3c557c2f055b7ed0 (patch) | |
tree | 35a9f4e2732213e23491bb0b2c8021031947ea52 /gnuradio-core/src/python | |
parent | cb3289d1494339cb0ac20bed080a0d37b99ab4fb (diff) | |
download | gnuradio-5faab4fbcf423cc614d53f0f3c557c2f055b7ed0.tar.gz gnuradio-5faab4fbcf423cc614d53f0f3c557c2f055b7ed0.tar.bz2 gnuradio-5faab4fbcf423cc614d53f0f3c557c2f055b7ed0.zip |
filters: added accessor functions to FFT and FIR filter classes to return vector of taps.
Diffstat (limited to 'gnuradio-core/src/python')
-rwxr-xr-x | gnuradio-core/src/python/gnuradio/gr/qa_fft_filter.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_fft_filter.py b/gnuradio-core/src/python/gnuradio/gr/qa_fft_filter.py index b3124ad29..f02f700a6 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_fft_filter.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_fft_filter.py @@ -273,6 +273,30 @@ class test_fft_filter(gr_unittest.TestCase): self.assert_fft_float_ok2(expected_result, result_data) + def test_fff_get0(self): + random.seed(0) + for i in xrange(25): + ntaps = int(random.uniform(2, 100)) + taps = make_random_float_tuple(ntaps) + + op = gr.fft_filter_fff(1, taps) + result_data = op.taps() + print result_data + + self.assertEqual(taps, result_data) + + def test_ccc_get0(self): + random.seed(0) + for i in xrange(25): + ntaps = int(random.uniform(2, 100)) + taps = make_random_complex_tuple(ntaps) + + op = gr.fft_filter_ccc(1, taps) + result_data = op.taps() + print result_data + + self.assertComplexTuplesAlmostEqual(taps, result_data, 4) + if __name__ == '__main__': gr_unittest.run(test_fft_filter, "test_fft_filter.xml") |