Beispiel #1
0
	def test_explain(self):
		f = MultistageChannelFilter(input_rate=10000, output_rate=1000, cutoff_freq=500, transition_width=100)
		self.assertEqual(f.explain(), textwrap.dedent('''\
			2 stages from 10000 to 1000
			  decimate by 5 using  43 taps (86000) in freq_xlating_fir_filter_ccc_sptr
			  decimate by 2 using  49 taps (49000) in fft_filter_ccc_sptr
			No final resampler stage.'''))
Beispiel #2
0
def test_one_filter(**kwargs):
    print '------ %s -------' % (kwargs, )
    f = MultistageChannelFilter(**kwargs)

    size = 10000000

    top = gr.top_block()
    top.connect(blocks.vector_source_c([5] * size), f,
                blocks.null_sink(gr.sizeof_gr_complex))

    print f.explain()

    t0 = time.clock()
    top.start()
    top.wait()
    top.stop()
    t1 = time.clock()

    print size, 'samples processed in', t1 - t0, 'CPU-seconds'
def test_one_filter(**kwargs):
	print '------ %s -------' % (kwargs,)
	f = MultistageChannelFilter(**kwargs)
	
	size = 10000000
	
	top = gr.top_block()
	top.connect(
		blocks.vector_source_c([5] * size),
		f,
		blocks.null_sink(gr.sizeof_gr_complex))
		
	print f.explain()
	
	t0 = time.clock()
	top.start()
	top.wait()
	top.stop()
	t1 = time.clock()

	print size, 'samples processed in', t1 - t0, 'CPU-seconds'
Beispiel #4
0
 def test_explain(self):
     f = MultistageChannelFilter(input_rate=10000,
                                 output_rate=1000,
                                 cutoff_freq=500,
                                 transition_width=100)
     self.assertEqual(
         f.explain(),
         textwrap.dedent('''\
         2 stages from 10000 to 1000
           decimate by 5 using  43 taps (86000) in freq_xlating_fir_filter_ccc_sptr
           decimate by 2 using  49 taps (49000) in fft_filter_ccc_sptr
         No final resampler stage.'''))