Kludge Tracker: Gnuradio - v3.4.0-101-g7e2b45b

Parent Directory (gnuradio/gnuradio-core/src/python)

Kludge Summary of gnuradio/gnuradio-core/src/python/gnuradio

Total Kludges 40
Total Subdirs 4

All Directories within gnuradio/gnuradio-core/src/python/gnuradio

All Files within gnuradio/gnuradio-core/src/python/gnuradio

Kludge Snippets in gnuradio/gnuradio-core/src/python/gnuradio

gnuradio/gnuradio-core/src/python/gnuradio/blks2/__init__.py

Category Kludge
Committer trondeau
Commit ID 28e086141aead2e43f958f0ae14d58cac557fa2d
21        
22        import glob
23        import os.path
24        
25        # Semi-hideous kludge to import everything in the blksimpl2 directory
26        # into the gnuradio.blks2 namespace.  This keeps us from having to remember 
27        # to manually update this file.
28        
29        for p in __path__:
				

gnuradio/gnuradio-core/src/python/gnuradio/blks2impl/filterbank.py

Category FIXME
Committer jcorgan
Commit ID 37c779b0c6394a3cec53370beb3b5a95e898b66a
22        import sys
23        from gnuradio import gr, gru
24        
25        def _generate_synthesis_taps(mpoints):
26            return []   # FIXME
27        
28        
29        def _split_taps(taps, mpoints):
30            assert (len(taps) % mpoints) == 0
				

gnuradio/gnuradio-core/src/python/gnuradio/blks2impl/fm_emph.py — 1

PyFlakes undefined name 'gru'
Committer jcorgan
Commit ID e692e71305ecd71d3681fe37f3d76f350d67e276
65                if 0:
66                    print "btaps =", btaps
67                    print "ataps =", ataps
68                    global plot1
69                    plot1 = gru.gnuplot_freqz (gru.freqz (btaps, ataps), fs, True)
70        
71                deemph = gr.iir_filter_ffd(btaps, ataps)
72        	self.connect(self, deemph, self)
73        
				

gnuradio/gnuradio-core/src/python/gnuradio/blks2impl/fm_emph.py — 2

PyFlakes undefined name 'gru'
Committer jcorgan
Commit ID e692e71305ecd71d3681fe37f3d76f350d67e276
65                if 0:
66                    print "btaps =", btaps
67                    print "ataps =", ataps
68                    global plot1
69                    plot1 = gru.gnuplot_freqz (gru.freqz (btaps, ataps), fs, True)
70        
71                deemph = gr.iir_filter_ffd(btaps, ataps)
72        	self.connect(self, deemph, self)
73        
				

gnuradio/gnuradio-core/src/python/gnuradio/blks2impl/fm_emph.py — 3

PyFlakes undefined name 'gru'
Committer jcorgan
Commit ID e692e71305ecd71d3681fe37f3d76f350d67e276
144                if 0:
145                    print "btaps =", btaps
146                    print "ataps =", ataps
147                    global plot2
148                    plot2 = gru.gnuplot_freqz (gru.freqz (btaps, ataps), fs, True)
149        
150                preemph = gr.iir_filter_ffd(btaps, ataps)
151        	self.connect(self, preemph, self)
				

gnuradio/gnuradio-core/src/python/gnuradio/blks2impl/fm_emph.py — 4

PyFlakes undefined name 'gru'
Committer jcorgan
Commit ID e692e71305ecd71d3681fe37f3d76f350d67e276
144                if 0:
145                    print "btaps =", btaps
146                    print "ataps =", ataps
147                    global plot2
148                    plot2 = gru.gnuplot_freqz (gru.freqz (btaps, ataps), fs, True)
149        
150                preemph = gr.iir_filter_ffd(btaps, ataps)
151        	self.connect(self, preemph, self)
				

gnuradio/gnuradio-core/src/python/gnuradio/blks2impl/fm_emph.py — 5

Category FIXME
Committer jcorgan
Commit ID e692e71305ecd71d3681fe37f3d76f350d67e276
135        	gr.hier_block2.__init__(self, "fm_deemph",
136        				gr.io_signature(1, 1, gr.sizeof_float), # Input signature
137        				gr.io_signature(1, 1, gr.sizeof_float)) # Output signature
138        				
139                # FIXME make this compute the right answer
140                
141                btaps = [1]
142                ataps = [1]
143        
				

gnuradio/gnuradio-core/src/python/gnuradio/blks2impl/nbfm_rx.py

Category FIXME
Committer jcorgan
Commit ID e692e71305ecd71d3681fe37f3d76f350d67e276
53        	gr.hier_block2.__init__(self, "nbfm_rx",
54        				gr.io_signature(1, 1, gr.sizeof_gr_complex), # Input signature
55        				gr.io_signature(1, 1, gr.sizeof_float))      # Output signature
56        
57                # FIXME audio_rate and quad_rate ought to be exact rationals
58                audio_rate = int(audio_rate)
59                quad_rate = int(quad_rate)
60        
61                if quad_rate % audio_rate != 0:
				

gnuradio/gnuradio-core/src/python/gnuradio/blks2impl/nbfm_tx.py

Category FIXME
Committer jcorgan
Commit ID e692e71305ecd71d3681fe37f3d76f350d67e276
48        	gr.hier_block2.__init__(self, "nbfm_tx",
49        				gr.io_signature(1, 1, gr.sizeof_float),      # Input signature
50        				gr.io_signature(1, 1, gr.sizeof_gr_complex)) # Output signature
51                
52                # FIXME audio_rate and quad_rate ought to be exact rationals
53                audio_rate = int(audio_rate)
54                quad_rate = int(quad_rate)
55        
56                if quad_rate % audio_rate != 0:
				

gnuradio/gnuradio-core/src/python/gnuradio/blks2impl/pkt.py

Category FIXME
Committer trondeau
Commit ID 28e086141aead2e43f958f0ae14d58cac557fa2d
134                    raise ValueError, "Invalid access_code %r. Must be string of 1's and 0's" % (access_code,)
135                self._access_code = access_code
136        
137                if threshold == -1:
138                    threshold = 12              # FIXME raise exception
139        
140                self._rcvd_pktq = gr.msg_queue()          # holds packets from the PHY
141                self.correlator = gr.correlate_access_code_bb(access_code, threshold)
142        
				

gnuradio/gnuradio-core/src/python/gnuradio/blks2impl/standard_squelch.py — 1

Category FIXME
Committer jcorgan
Commit ID e692e71305ecd71d3681fe37f3d76f350d67e276
27        	gr.hier_block2.__init__(self, "standard_squelch",
28        				gr.io_signature(1, 1, gr.sizeof_float), # Input signature
29        				gr.io_signature(1, 1, gr.sizeof_float)) # Output signature
30            
31                self.input_node = gr.add_const_ff(0)          # FIXME kludge
32                
33                self.low_iir = gr.iir_filter_ffd((0.0193,0,-0.0193),(1,1.9524,-0.9615))
34                self.low_square = gr.multiply_ff()
35                self.low_smooth = gr.single_pole_iir_filter_ff(1/(0.01*audio_rate))   # 100ms time constant
				

gnuradio/gnuradio-core/src/python/gnuradio/blks2impl/standard_squelch.py — 2

Category Kludge
Committer jcorgan
Commit ID e692e71305ecd71d3681fe37f3d76f350d67e276
27        	gr.hier_block2.__init__(self, "standard_squelch",
28        				gr.io_signature(1, 1, gr.sizeof_float), # Input signature
29        				gr.io_signature(1, 1, gr.sizeof_float)) # Output signature
30            
31                self.input_node = gr.add_const_ff(0)          # FIXME kludge
32                
33                self.low_iir = gr.iir_filter_ffd((0.0193,0,-0.0193),(1,1.9524,-0.9615))
34                self.low_square = gr.multiply_ff()
35                self.low_smooth = gr.single_pole_iir_filter_ff(1/(0.01*audio_rate))   # 100ms time constant
				

gnuradio/gnuradio-core/src/python/gnuradio/blks2impl/wfm_tx.py

Category FIXME
Committer jcorgan
Commit ID e692e71305ecd71d3681fe37f3d76f350d67e276
45        	gr.hier_block2.__init__(self, "wfm_tx",
46        				gr.io_signature(1, 1, gr.sizeof_float),      # Input signature
47        				gr.io_signature(1, 1, gr.sizeof_gr_complex)) # Output signature
48                
49                # FIXME audio_rate and quad_rate ought to be exact rationals
50                audio_rate = int(audio_rate)
51                quad_rate = int(quad_rate)
52        
53                if quad_rate % audio_rate != 0:
				

gnuradio/gnuradio-core/src/python/gnuradio/gr/__init__.py

PyFlakes redefinition of unused '_RTLD_GLOBAL' from line 32
Committer jcorgan
Commit ID 64069fba5439f51aa3bd22ddc2756c3781784531
31        try:
32            from dl import RTLD_GLOBAL as _RTLD_GLOBAL
33        except ImportError:
34            try:
35        	from DLFCN import RTLD_GLOBAL as _RTLD_GLOBAL
36            except ImportError:
37        	pass
38            
39        if _RTLD_GLOBAL != 0:
				

gnuradio/gnuradio-core/src/python/gnuradio/gr/benchmark_filters.py

PyFlakes undefined name 'sys'
Committer jcorgan
Commit ID 5d69a524f81f234b3fbc41d49ba18d6f6886baba
58            parser.add_option("-d", "--decimation", type="int", default=1)
59            (options, args) = parser.parse_args()
60            if len(args) != 0:
61                parser.print_help()
62                sys.exit(1)
63        
64            ntaps = options.ntaps
65            total_input_size = options.total_input_size
66            block_size = options.block_size
				

gnuradio/gnuradio-core/src/python/gnuradio/gr/gr_threading_24.py

PyFlakes redefinition of unused 'local' from line 703
Committer jcorgan
Commit ID 5d69a524f81f234b3fbc41d49ba18d6f6886baba
701        
702        try:
703            from thread import _local as local
704        except ImportError:
705            from _threading_local import local
706        
707        
708        # Self-test code
709        
				

gnuradio/gnuradio-core/src/python/gnuradio/gr/qa_agc.py

Category FIXME
Committer eb
Commit ID f1c41f807cb29472d0924149e39d6ec8ad90e6a2
410                dst_data = dst1.data ()
411                self.assertComplexTuplesAlmostEqual (expected_result, dst_data, 4)
412        
413        
414            def test_100(self):        # FIXME needs work
415                ''' Test complex feedforward agc with constant input '''
416                input_data = 16*(0.0,) + 64*(1.0,) + 64*(0.0,)
417                expected_result = ()
418        
				

gnuradio/gnuradio-core/src/python/gnuradio/gr/qa_kludged_imports.py — 1

Category Magic
Committer jcorgan
Commit ID 5d69a524f81f234b3fbc41d49ba18d6f6886baba
30            def tearDown(self):
31                pass
32        
33            def test_blks_import(self):
34                # make sure that this somewhat magic import works
35                from gnuradio import blks2
36        
37            def test_gru_import(self):
38                # make sure that this somewhat magic import works
				

gnuradio/gnuradio-core/src/python/gnuradio/gr/qa_kludged_imports.py — 2

Category Magic
Committer jcorgan
Commit ID 5d69a524f81f234b3fbc41d49ba18d6f6886baba
34                # make sure that this somewhat magic import works
35                from gnuradio import blks2
36        
37            def test_gru_import(self):
38                # make sure that this somewhat magic import works
39                from gnuradio import gru
40        
41        
42        if __name__ == '__main__':
				

gnuradio/gnuradio-core/src/python/gnuradio/gr/qa_mute.py

PyFlakes redefinition of function 'test_unmute_cc' from line 75
Committer jcorgan
Commit ID 5d69a524f81f234b3fbc41d49ba18d6f6886baba
77                expected_result = (1+5j, 2+5j, 3+5j, 4+5j, 5+5j)
78                op = gr.mute_cc (False)
79                self.help_cc ((src_data,), expected_result, op)
80        
81            def test_unmute_cc (self):
82                src_data = (1+5j, 2+5j, 3+5j, 4+5j, 5+5j)
83                expected_result = (0+0j, 0+0j, 0+0j, 0+0j, 0+0j)
84                op = gr.mute_cc (True)
85                self.help_cc ((src_data,), expected_result, op)
				

gnuradio/gnuradio-core/src/python/gnuradio/gr/qa_rational_resampler.py — 1

Category FIXME
Committer jcorgan
Commit ID 5d69a524f81f234b3fbc41d49ba18d6f6886baba
119                self.assertEqual(expected_result, result_data)
120        
121            def test_002_interp(self):          
122                taps = random_floats(31)
123                #src_data = random_floats(10000)  # FIXME the 10k case fails!
124                src_data = random_floats(1000)
125                interpolation = 3
126        
127                expected_result = reference_interp_filter(src_data, interpolation, taps)
				

gnuradio/gnuradio-core/src/python/gnuradio/gr/qa_rational_resampler.py — 2

Category FIXME
Committer jcorgan
Commit ID 5d69a524f81f234b3fbc41d49ba18d6f6886baba
143                                     (L2 - L1, len(taps), interpolation, len(src_data)))
144                    sys.stderr.write('  len(result_data) = %d  len(expected_result) = %d\n' %
145                                     (len(result_data), len(expected_result)))
146                #self.assertEqual(expected_result[0:L], result_data[0:L])
147                # FIXME check first 3 answers
148                self.assertEqual(expected_result[3:L], result_data[3:L])
149        
150            def test_003_interp(self):
151                taps = random_floats(31)
				

gnuradio/gnuradio-core/src/python/gnuradio/gr/qa_rational_resampler.py — 3

Category FIXME
Committer jcorgan
Commit ID 5d69a524f81f234b3fbc41d49ba18d6f6886baba
172                    sys.stderr.write('  len(result_data) = %d  len(expected_result) = %d\n' %
173                                     (len(result_data), len(expected_result)))
174                self.assertEqual(expected_result[0:L], result_data[0:L])
175        
176            # FIXME disabled.  Triggers hang on SuSE 10.0
177            def xtest_004_decim_random_vals(self):
178                MAX_TAPS = 9
179                MAX_DECIM = 7
180                OUTPUT_LEN = 9
				

gnuradio/gnuradio-core/src/python/gnuradio/gr/qa_rational_resampler.py — 4

Category FIXME
Committer jcorgan
Commit ID 5d69a524f81f234b3fbc41d49ba18d6f6886baba
205                                                 (len(result_data), len(expected_result)))
206                            self.assertEqual(expected_result[0:L], result_data[0:L])
207        
208        
209            # FIXME disabled.  Triggers hang on SuSE 10.0
210            def xtest_005_interp_random_vals(self):
211                MAX_TAPS = 9
212                MAX_INTERP = 7
213                INPUT_LEN = 9
				

gnuradio/gnuradio-core/src/python/gnuradio/gr/qa_rational_resampler.py — 5

Category FIXME
Committer jcorgan
Commit ID 5d69a524f81f234b3fbc41d49ba18d6f6886baba
237                                sys.stderr.write('delta = %2d: ntaps = %d interp = %d ilen = %d\n' % (L2 - L1, ntaps, interp, ilen))
238                                #sys.stderr.write('  len(result_data) = %d  len(expected_result) = %d\n' %
239                                #                 (len(result_data), len(expected_result)))
240                            #self.assertEqual(expected_result[0:L], result_data[0:L])
241                            # FIXME check first ntaps+1 answers
242                            self.assertEqual(expected_result[ntaps+1:L], result_data[ntaps+1:L])
243        
244        
245            def test_006_interp_decim(self):
				

gnuradio/gnuradio-core/src/python/gnuradio/gr/top_block.py

Category Kludge
Committer eb
Commit ID 2c8ea58e4d76f54c98d71d3fcc64bc29da490908
29        #
30        # There is no problem that can't be solved with an additional
31        # level of indirection...
32        #
33        # This kludge allows ^C to interrupt top_block.run and top_block.wait
34        #
35        # The problem that we are working around is that Python only services
36        # signals (e.g., KeyboardInterrupt) in its main thread.  If the main
37        # thread is blocked in our C++ version of wait, even though Python's
				

gnuradio/gnuradio-core/src/python/gnuradio/gr_xmlrunner.py

PyFlakes redefinition of unused 'StringIO' from line 22
Committer Tom Rondeau
Commit ID 2933f69b5d7afe6cf044a0f6305d05d19e7570af
20        
21        try:
22            from StringIO import StringIO
23        except ImportError:
24            from io import StringIO
25        
26        
27        class _TestInfo(object):
28        
				

gnuradio/gnuradio-core/src/python/gnuradio/gru/__init__.py

Category Kludge
Committer jcorgan
Commit ID 5d69a524f81f234b3fbc41d49ba18d6f6886baba
21        
22        import glob
23        import os.path
24        
25        # Semi-hideous kludge to import everything in the gruimpl directory
26        # into the gnuradio.gru namespace.  This keeps us from having to remember 
27        # to manually update this file.
28        
29        for p in __path__:
				

gnuradio/gnuradio-core/src/python/gnuradio/window.py — 1

PyFlakes undefined name 'IzeroEPSILON'
Committer jcorgan
Commit ID 5d69a524f81f234b3fbc41d49ba18d6f6886baba
35                n += 1
36                temp *= temp
37                u *= temp
38                accum += u
39                if u >= IzeroEPSILON*sum:
40                    break
41            return accum
42        
43        def midm1(fft_size):
				

gnuradio/gnuradio-core/src/python/gnuradio/window.py — 2

PyFlakes undefined name 'midn'
Committer jcorgan
Commit ID 5d69a524f81f234b3fbc41d49ba18d6f6886baba
52        def rate(fft_size):
53            return 1.0/(fft_size >> 1)
54        
55        def expn(fft_size):
56            math.log(2.0)/(midn(fft_size) + 1.0)
57            
58        def hamming(fft_size):
59            window = []
60            for index in xrange(fft_size):
				

gnuradio/gnuradio-core/src/python/gnuradio/window.py — 3

PyFlakes undefined name 'midn'
Committer jcorgan
Commit ID 5d69a524f81f234b3fbc41d49ba18d6f6886baba
69        
70        def welch(fft_size):
71            window = [0 for i in range(fft_size)]
72            j = fft_size-1
73            for index in xrange(midn(fft_size)+1):
74                window[j] = window[index] = (1.0 - math.sqrt((index - midm1(fft_size)) / midp1(fft_size)))
75                j -= 1
76            return window
77        
				

gnuradio/gnuradio-core/src/python/gnuradio/window.py — 4

PyFlakes undefined name 'midn'
Committer jcorgan
Commit ID 5d69a524f81f234b3fbc41d49ba18d6f6886baba
77        
78        def parzen(fft_size):
79            window = [0 for i in range(fft_size)]
80            j = fft_size-1
81            for index in xrange(midn(fft_size)+1):
82                window[j] = window[index] = (1.0 - math.abs((index - midm1(fft_size)) / midp1(fft_size)))
83                j -= 1
84            return window
85        
				

gnuradio/gnuradio-core/src/python/gnuradio/window.py — 5

PyFlakes undefined name 'midn'
Committer jcorgan
Commit ID 5d69a524f81f234b3fbc41d49ba18d6f6886baba
87            mfrq = freq(fft_size)
88            angle = 0
89            window = [0 for i in range(fft_size)]
90            j = fft_size-1
91            for index in xrange(midn(fft_size)+1):
92                window[j] = window[index] = angle
93                angle += freq
94                j -= 1
95            return window
				

gnuradio/gnuradio-core/src/python/gnuradio/window.py — 6

PyFlakes undefined name 'midn'
Committer jcorgan
Commit ID 5d69a524f81f234b3fbc41d49ba18d6f6886baba
98            mfrq = freq(fft_size)
99            angle = 0
100            window = [0 for i in range(fft_size)]
101            j = fft_size-1
102            for index in xrange(midn(fft_size)+1):
103                cx = math.cos(angle)
104                window[j] = window[index] = (.34401 + (cx * (-.49755 + (cx * .15844))))
105                angle += freq
106                j -= 1
				

gnuradio/gnuradio-core/src/python/gnuradio/window.py — 7

PyFlakes undefined name 'midn'
Committer jcorgan
Commit ID 5d69a524f81f234b3fbc41d49ba18d6f6886baba
110            mfrq = freq(fft_size)
111            angle = 0
112            window = [0 for i in range(fft_size)]
113            j = fft_size-1
114            for index in xrange(midn(fft_size)+1):
115                cx = math.cos(angle)
116                window[j] = window[index] = (.21747 + (cx * (-.45325 + (cx * (.28256 - (cx * .04672))))))
117                angle += freq
118                j -= 1
				

gnuradio/gnuradio-core/src/python/gnuradio/window.py — 8

PyFlakes undefined name 'midn'
Committer jcorgan
Commit ID 5d69a524f81f234b3fbc41d49ba18d6f6886baba
122            mfrq = freq(fft_size)
123            angle = 0
124            window = [0 for i in range(fft_size)]
125            j = fft_size-1
126            for index in xrange(midn(fft_size)+1):
127                cx = math.cos(angle)
128                window[j] = window[index] = (.084037 + (cx * (-.29145 + (cx * (.375696 + (cx * (-.20762 + (cx * .041194))))))))
129                angle += freq
130                j -= 1
				

gnuradio/gnuradio-core/src/python/gnuradio/window.py — 9

PyFlakes undefined name 'midn'
Committer jcorgan
Commit ID 5d69a524f81f234b3fbc41d49ba18d6f6886baba
133        def exponential(fft_size):
134            expsum = 1.0
135            window = [0 for i in range(fft_size)]
136            j = fft_size-1
137            for index in xrange(midn(fft_size)+1):
138              window[j] = window[i] = (expsum - 1.0)
139              expsum *= expn(fft_size)
140              j -= 1
141            return window
				

gnuradio/gnuradio-core/src/python/gnuradio/window.py — 10

PyFlakes undefined name 'midn'
Committer jcorgan
Commit ID 5d69a524f81f234b3fbc41d49ba18d6f6886baba
143        def riemann(fft_size):
144            sr1 = freq(fft_size)
145            window = [0 for i in range(fft_size)]
146            j = fft_size-1
147            for index in xrange(midn(fft_size)):
148                if index == midn(fft_size):
149                    window[index] = window[j] = 1.0
150                else:
151                    cx = sr1*midn(fft_size) - index
				

gnuradio/gnuradio-core/src/python/gnuradio/window.py — 11

PyFlakes undefined name 'midn'
Committer jcorgan
Commit ID 5d69a524f81f234b3fbc41d49ba18d6f6886baba
144            sr1 = freq(fft_size)
145            window = [0 for i in range(fft_size)]
146            j = fft_size-1
147            for index in xrange(midn(fft_size)):
148                if index == midn(fft_size):
149                    window[index] = window[j] = 1.0
150                else:
151                    cx = sr1*midn(fft_size) - index
152                    window[index] = window[j] = math.sin(cx)/cx
				

gnuradio/gnuradio-core/src/python/gnuradio/window.py — 12

PyFlakes undefined name 'midn'
Committer jcorgan
Commit ID 5d69a524f81f234b3fbc41d49ba18d6f6886baba
147            for index in xrange(midn(fft_size)):
148                if index == midn(fft_size):
149                    window[index] = window[j] = 1.0
150                else:
151                    cx = sr1*midn(fft_size) - index
152                    window[index] = window[j] = math.sin(cx)/cx
153                j -= 1
154            return window
155