diff options
author | jcorgan | 2008-10-27 15:53:31 +0000 |
---|---|---|
committer | jcorgan | 2008-10-27 15:53:31 +0000 |
commit | 9ed5c507988c020972109ee97ccda827f3f0e998 (patch) | |
tree | 5e48d3c9e29012b1271730edcbf9825746095f71 /gnuradio-core/src/python | |
parent | efe21ebe5e1c6dc9e70f9e1b25a3cdc8692b0877 (diff) | |
download | gnuradio-9ed5c507988c020972109ee97ccda827f3f0e998.tar.gz gnuradio-9ed5c507988c020972109ee97ccda827f3f0e998.tar.bz2 gnuradio-9ed5c507988c020972109ee97ccda827f3f0e998.zip |
Added copyright header and disabled test_004, as it requires pygsl, which is not checked for in configure
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@9876 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'gnuradio-core/src/python')
-rwxr-xr-x | gnuradio-core/src/python/gnuradio/gr/qa_classify.py | 76 |
1 files changed, 48 insertions, 28 deletions
diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_classify.py b/gnuradio-core/src/python/gnuradio/gr/qa_classify.py index 20ce084dc..ac17aff29 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_classify.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_classify.py @@ -1,9 +1,29 @@ #!/usr/bin/env python +# +# Copyright 2008 Free Software Foundation, Inc. +# +# This file is part of GNU Radio +# +# GNU Radio is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3, or (at your option) +# any later version. +# +# GNU Radio is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Radio; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 51 Franklin Street, +# Boston, MA 02110-1301, USA. +# import numpy from gnuradio import gr, gr_unittest import copy -import pygsl.wavelet as wavelet +#import pygsl.wavelet as wavelet # FIXME: pygsl not checked for in config import math @@ -99,33 +119,33 @@ class qa_classify(gr_unittest.TestCase): sum /= float(len(src_data)) assert sum < 1e-6 - def test_004_(self): - - n = 256 - o = 4 - ws = wavelet.workspace(n) - w = wavelet.daubechies(o) - - a = numpy.arange(n) - b = numpy.sin(a*numpy.pi/16.0) - c = w.transform_forward(b, ws) - d = w.transform_inverse(c, ws) - - src = gr.vector_source_f(b, False, n) - wv = gr.wavelet_ff(n, o, True) - - dst = gr.vector_sink_f(n) - self.tb.connect(src, wv) - self.tb.connect(wv, dst) - self.tb.run() - e = dst.data() - - sum = 0 - for (u, v) in zip(c, e): - w = u - v - sum += w * w - sum /= float(len(c)) - assert sum < 1e-6 +# def test_004_(self): # FIXME: requires pygsl +# +# n = 256 +# o = 4 +# ws = wavelet.workspace(n) +# w = wavelet.daubechies(o) +# +# a = numpy.arange(n) +# b = numpy.sin(a*numpy.pi/16.0) +# c = w.transform_forward(b, ws) +# d = w.transform_inverse(c, ws) +# +# src = gr.vector_source_f(b, False, n) +# wv = gr.wavelet_ff(n, o, True) +# +# dst = gr.vector_sink_f(n) +# self.tb.connect(src, wv) +# self.tb.connect(wv, dst) +# self.tb.run() +# e = dst.data() +# +# sum = 0 +# for (u, v) in zip(c, e): +# w = u - v +# sum += w * w +# sum /= float(len(c)) +# assert sum < 1e-6 def test_005_(self): |