From be7f6400a03e0294aee51b084899b38ed0e83180 Mon Sep 17 00:00:00 2001 From: Tom Rondeau <trondeau@vt.edu> Date: Thu, 21 Jul 2011 23:34:37 -0400 Subject: digital: using new psk2 to build the constellation and no longer use blks2 --- gr-digital/python/qa_costas_loop_cc.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gr-digital/python/qa_costas_loop_cc.py') diff --git a/gr-digital/python/qa_costas_loop_cc.py b/gr-digital/python/qa_costas_loop_cc.py index 368704093b..ec338b49a1 100755 --- a/gr-digital/python/qa_costas_loop_cc.py +++ b/gr-digital/python/qa_costas_loop_cc.py @@ -20,8 +20,8 @@ # Boston, MA 02110-1301, USA. # -from gnuradio import gr, blks2, gr_unittest -import digital_swig +from gnuradio import gr, gr_unittest +import digital_swig, psk2 import random, cmath class test_digital(gr_unittest.TestCase): @@ -130,9 +130,9 @@ class test_digital(gr_unittest.TestCase): self.test = digital_swig.costas_loop_cc(damp, natfreq, order) rot = cmath.exp(-cmath.pi/8.0j) # rotate to match Costas rotation - const = blks2.psk.make_constellation(order) + const = psk2.psk_constellation(order) data = [random.randint(0,7) for i in xrange(100)] - data = [2*rot*const[d] for d in data] + data = [2*rot*const.points()[d] for d in data] N = 40 # settling time expected_result = data[N:] -- cgit v1.2.3 From a6430ec1e6de530416bdad29bf2345d2dbeb9587 Mon Sep 17 00:00:00 2001 From: Tom Rondeau <trondeau@vt.edu> Date: Sun, 24 Jul 2011 11:40:49 -0400 Subject: digital: fixed name of costas loop QA test block; made qa_binary_slicer_fb executable. --- gr-digital/python/qa_binary_slicer_fb.py | 0 gr-digital/python/qa_costas_loop_cc.py | 8 ++++---- 2 files changed, 4 insertions(+), 4 deletions(-) mode change 100644 => 100755 gr-digital/python/qa_binary_slicer_fb.py (limited to 'gr-digital/python/qa_costas_loop_cc.py') diff --git a/gr-digital/python/qa_binary_slicer_fb.py b/gr-digital/python/qa_binary_slicer_fb.py old mode 100644 new mode 100755 diff --git a/gr-digital/python/qa_costas_loop_cc.py b/gr-digital/python/qa_costas_loop_cc.py index ec338b49a1..3f5eaa141b 100755 --- a/gr-digital/python/qa_costas_loop_cc.py +++ b/gr-digital/python/qa_costas_loop_cc.py @@ -24,7 +24,7 @@ from gnuradio import gr, gr_unittest import digital_swig, psk2 import random, cmath -class test_digital(gr_unittest.TestCase): +class test_costas_loop_cc(gr_unittest.TestCase): def setUp (self): self.tb = gr.top_block () @@ -34,8 +34,8 @@ class test_digital(gr_unittest.TestCase): def test01 (self): # test basic functionality by setting all gains to 0 - damp = 0.4 - natfreq = 0.25 + damp = 0.0 + natfreq = 0.0 order = 2 self.test = digital_swig.costas_loop_cc(damp, natfreq, order) @@ -153,4 +153,4 @@ class test_digital(gr_unittest.TestCase): self.assertComplexTuplesAlmostEqual (expected_result, dst_data, 2) if __name__ == '__main__': - gr_unittest.run(test_digital, "test_digital.xml") + gr_unittest.run(test_costas_loop_cc, "test_costas_loop_cc.xml") -- cgit v1.2.3