diff options
author | Tom Rondeau <trondeau@vt.edu> | 2012-11-06 14:28:22 -0500 |
---|---|---|
committer | Tom Rondeau <trondeau@vt.edu> | 2012-11-06 14:40:43 -0500 |
commit | fd110bdbbe8bc40781c34f33c70deec5b7931109 (patch) | |
tree | ef18e813add19b09c57cc21cb672ea602701405b /gr-filter/examples/resampler.py | |
parent | 0c9c16fb008b02a5af39fb22e18acfff2dbd933a (diff) |
analog: Removing reference to gr.sig_source_X and gr.noise_source_X where possible.
Passing make and make test. Examples and apps need testing.
gr-filter relies on sig_source and noise_source, so can't remove them from core.
Diffstat (limited to 'gr-filter/examples/resampler.py')
-rwxr-xr-x | gr-filter/examples/resampler.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/gr-filter/examples/resampler.py b/gr-filter/examples/resampler.py index 395e095cbd..d5fd9216f6 100755 --- a/gr-filter/examples/resampler.py +++ b/gr-filter/examples/resampler.py @@ -25,15 +25,21 @@ from gnuradio import filter import sys try: + from gnuradio import analog +except ImportError: + sys.stderr.write("Error: Program requires gr-analog.\n") + sys.exit(1) + +try: import scipy except ImportError: - print "Error: Program requires scipy (see: www.scipy.org)." + sys.stderr.write("Error: Program requires scipy (see: www.scipy.org).\n") sys.exit(1) try: import pylab except ImportError: - print "Error: Program requires matplotlib (see: matplotlib.sourceforge.net)." + sys.stderr.write("Error: Program requires matplotlib (see: matplotlib.sourceforge.net).\n") sys.exit(1) class mytb(gr.top_block): @@ -46,8 +52,8 @@ class mytb(gr.top_block): # Creating our own taps taps = gr.firdes.low_pass_2(32, 32, 0.25, 0.1, 80) - self.src = gr.sig_source_c(fs_in, gr.GR_SIN_WAVE, fc, 1) - #self.src = gr.noise_source_c(gr.GR_GAUSSIAN, 1) + self.src = analog.sig_source_c(fs_in, analog..GR_SIN_WAVE, fc, 1) + #self.src = analog..noise_source_c(analog..GR_GAUSSIAN, 1) self.head = gr.head(gr.sizeof_gr_complex, N) # A resampler with our taps |