diff options
Diffstat (limited to 'gr-digital/python/qa_cpm.py')
-rwxr-xr-x | gr-digital/python/qa_cpm.py | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/gr-digital/python/qa_cpm.py b/gr-digital/python/qa_cpm.py index 12a84c76c2..bfeb2bcdd4 100755 --- a/gr-digital/python/qa_cpm.py +++ b/gr-digital/python/qa_cpm.py @@ -21,15 +21,16 @@ # from gnuradio import gr, gr_unittest -import digital_swig +import digital_swig as digital +import analog_swig as analog import numpy class test_cpm(gr_unittest.TestCase): - def setUp (self): - self.tb = gr.top_block () + def setUp(self): + self.tb = gr.top_block() - def tearDown (self): + def tearDown(self): self.tb = None def do_check_phase_shift(self, type, name): @@ -37,7 +38,7 @@ class test_cpm(gr_unittest.TestCase): L = 1 in_bits = (1,) * 20 src = gr.vector_source_b(in_bits, False) - cpm = digital_swig.cpmmod_bc(type, 0.5, sps, L) + cpm = digital.cpmmod_bc(type, 0.5, sps, L) arg = gr.complex_to_arg() sink = gr.vector_sink_f() @@ -51,16 +52,16 @@ class test_cpm(gr_unittest.TestCase): msg="Phase shift was not correct for CPM method " + name) def test_001_lrec(self): - self.do_check_phase_shift(gr.cpm.LRC, 'LREC') + self.do_check_phase_shift(analog.cpm.LRC, 'LREC') def test_001_lrc(self): - self.do_check_phase_shift(gr.cpm.LRC, 'LRC') + self.do_check_phase_shift(analog.cpm.LRC, 'LRC') def test_001_lsrc(self): - self.do_check_phase_shift(gr.cpm.LSRC, 'LSRC') + self.do_check_phase_shift(analog.cpm.LSRC, 'LSRC') def test_001_ltfm(self): - self.do_check_phase_shift(gr.cpm.TFM, 'TFM') + self.do_check_phase_shift(analog.cpm.TFM, 'TFM') def test_001_lgmsk(self): sps = 2 @@ -68,7 +69,7 @@ class test_cpm(gr_unittest.TestCase): bt = 0.3 in_bits = (1,) * 20 src = gr.vector_source_b(in_bits, False) - gmsk = digital_swig.gmskmod_bc(sps, bt, L) + gmsk = digital.gmskmod_bc(sps, L, bt) arg = gr.complex_to_arg() sink = gr.vector_sink_f() @@ -82,7 +83,7 @@ class test_cpm(gr_unittest.TestCase): msg="Phase shift was not correct for GMSK") def test_phase_response(self): - phase_response = gr.cpm.phase_response(gr.cpm.LREC, 2, 4) + phase_response = analog.cpm.phase_response(analog.cpm.LREC, 2, 4) self.assertAlmostEqual(numpy.sum(phase_response), 1) |