commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] [gnuradio] 03/04: filter: fix broken backported QA tes


From: git
Subject: [Commit-gnuradio] [gnuradio] 03/04: filter: fix broken backported QA test in channelizer
Date: Fri, 16 May 2014 23:49:29 +0000 (UTC)

This is an automated email from the git hooks/post-receive script.

jcorgan pushed a commit to branch maint
in repository gnuradio.

commit e76e3b767fb9d8fa6748bc43589ad6f074053f77
Author: Johnathan Corgan <address@hidden>
Date:   Fri May 16 15:47:02 2014 -0700

    filter: fix broken backported QA test in channelizer
---
 gr-filter/python/filter/qa_pfb_channelizer.py | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/gr-filter/python/filter/qa_pfb_channelizer.py 
b/gr-filter/python/filter/qa_pfb_channelizer.py
index 3a1eb06..5b78ea6 100755
--- a/gr-filter/python/filter/qa_pfb_channelizer.py
+++ b/gr-filter/python/filter/qa_pfb_channelizer.py
@@ -33,6 +33,12 @@ class test_pfb_channelizer(gr_unittest.TestCase):
 
     def setUp(self):
         self.tb = gr.top_block()
+        M = 5            # Number of channels to channelize
+        fs = 5000        # baseband sampling rate
+        ifs = M*fs       # input samp rate to channelizer
+        self.taps = filter.firdes.low_pass_2(1, ifs, fs/2, fs/10,
+                                        attenuation_dB=80,
+                                        
window=filter.firdes.WIN_BLACKMAN_hARRIS)
 
     def tearDown(self):
         self.tb = None
@@ -43,10 +49,6 @@ class test_pfb_channelizer(gr_unittest.TestCase):
         fs = 5000        # baseband sampling rate
         ifs = M*fs       # input samp rate to channelizer
 
-        taps = filter.firdes.low_pass_2(1, ifs, fs/2, fs/10,
-                                        attenuation_dB=80,
-                                        
window=filter.firdes.WIN_BLACKMAN_hARRIS)
-
         signals = list()
         add = blocks.add_cc()
         freqs = [-230., 121., 110., -513., 203.]
@@ -57,7 +59,7 @@ class test_pfb_channelizer(gr_unittest.TestCase):
             self.tb.connect(signals[i], (add,i))
 
         s2ss = blocks.stream_to_streams(gr.sizeof_gr_complex, M)
-        pfb = filter.pfb_channelizer_ccf(M, taps, 1)
+        pfb = filter.pfb_channelizer_ccf(M, self.taps, 1)
 
         self.tb.connect(add, s2ss)
 
@@ -80,7 +82,7 @@ class test_pfb_channelizer(gr_unittest.TestCase):
         p4 = 1.3782797467397869
 
         # Filter delay is the normal delay of each arm
-        tpf = math.ceil(len(taps) / float(M))
+        tpf = math.ceil(len(self.taps) / float(M))
         delay = -(tpf - 1.0) / 2.0
         delay = int(delay)
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]