commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] [gnuradio] 01/02: Merge branch 'maint'


From: git
Subject: [Commit-gnuradio] [gnuradio] 01/02: Merge branch 'maint'
Date: Mon, 5 May 2014 13:15:54 +0000 (UTC)

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

trondeau pushed a commit to branch master
in repository gnuradio.

commit 1992cc295940c26ea183d1068964fb73f8b4efa7
Merge: 0de915a 3e08e49
Author: Tom Rondeau <address@hidden>
Date:   Mon May 5 07:50:07 2014 -0400

    Merge branch 'maint'

 gr-filter/lib/pfb_channelizer_ccf_impl.cc     | 12 ++++++++----
 gr-filter/python/filter/qa_pfb_channelizer.py | 13 +++++++++++++
 2 files changed, 21 insertions(+), 4 deletions(-)

diff --cc gr-filter/python/filter/qa_pfb_channelizer.py
index 549e41d,3a1eb06..009f4a3
--- a/gr-filter/python/filter/qa_pfb_channelizer.py
+++ b/gr-filter/python/filter/qa_pfb_channelizer.py
@@@ -146,9 -89,41 +146,22 @@@ class test_pfb_channelizer(gr_unittest.
  
          # Create known data as complex sinusoids at the different baseband 
freqs
          # the different channel numbering is due to channelizer output order.
 -        expected0_data = map(lambda x: math.cos(2.*math.pi*freqs[2]*x+p0) + \
 -                                       1j*math.sin(2.*math.pi*freqs[2]*x+p0), 
t)
 -        expected1_data = map(lambda x: math.cos(2.*math.pi*freqs[3]*x+p1) + \
 -                                       1j*math.sin(2.*math.pi*freqs[3]*x+p1), 
t)
 -        expected2_data = map(lambda x: math.cos(2.*math.pi*freqs[4]*x+p2) + \
 -                                       1j*math.sin(2.*math.pi*freqs[4]*x+p2), 
t)
 -        expected3_data = map(lambda x: math.cos(2.*math.pi*freqs[0]*x+p3) + \
 -                                       1j*math.sin(2.*math.pi*freqs[0]*x+p3), 
t)
 -        expected4_data = map(lambda x: math.cos(2.*math.pi*freqs[1]*x+p4) + \
 -                                       1j*math.sin(2.*math.pi*freqs[1]*x+p4), 
t)
 -
 -        dst0_data = snks[0].data()
 -        dst1_data = snks[1].data()
 -        dst2_data = snks[2].data()
 -        dst3_data = snks[3].data()
 -        dst4_data = snks[4].data()
 -
 -        self.assertComplexTuplesAlmostEqual(expected0_data[-Ntest:], 
dst0_data[-Ntest:], 3)
 -        self.assertComplexTuplesAlmostEqual(expected1_data[-Ntest:], 
dst1_data[-Ntest:], 3)
 -        self.assertComplexTuplesAlmostEqual(expected2_data[-Ntest:], 
dst2_data[-Ntest:], 3)
 -        self.assertComplexTuplesAlmostEqual(expected3_data[-Ntest:], 
dst3_data[-Ntest:], 3)
 -        self.assertComplexTuplesAlmostEqual(expected4_data[-Ntest:], 
dst4_data[-Ntest:], 3)
 +        expected_data = [map(lambda x: math.cos(2.*math.pi*f*x) +
 +                             1j*math.sin(2.*math.pi*f*x), t) for f in 
self.freqs]
 +        return expected_data
  
+     def test_0002(self):
+         """Test roundig error handling for oversample rate (ok)."""
+         channels, oversample = 36, 25.
+         filter.pfb.channelizer_ccf(channels, taps=self.taps,
+                                    oversample_rate=channels/oversample)
+ 
+     def test_0003(self):
+         """Test roundig error handling for oversample rate, (bad)."""
+         self.assertRaises(RuntimeError,
+                           filter.pfb.channelizer_ccf,
+                           36, taps=self.taps, oversample_rate=10.1334)
+ 
+ 
  if __name__ == '__main__':
      gr_unittest.run(test_pfb_channelizer, "test_pfb_channelizer.xml")



reply via email to

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