From fd110bdbbe8bc40781c34f33c70deec5b7931109 Mon Sep 17 00:00:00 2001 From: Tom Rondeau <trondeau@vt.edu> Date: Tue, 6 Nov 2012 14:28:22 -0500 Subject: 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. --- gr-filter/examples/interpolate.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'gr-filter/examples/interpolate.py') diff --git a/gr-filter/examples/interpolate.py b/gr-filter/examples/interpolate.py index 56d78d597b..45f4b3f801 100755 --- a/gr-filter/examples/interpolate.py +++ b/gr-filter/examples/interpolate.py @@ -24,18 +24,24 @@ from gnuradio import gr from gnuradio import filter import sys, time +try: + from gnuradio import analog +except ImportError: + sys.stderr.write("Error: Program requires gr-analog.\n") + sys.exit(1) + try: import scipy from scipy import fftpack 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 from pylab import mlab 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 pfb_top_block(gr.top_block): @@ -78,8 +84,8 @@ class pfb_top_block(gr.top_block): print "Taps per channel: ", tpc # Create a couple of signals at different frequencies - self.signal1 = gr.sig_source_c(self._fs, gr.GR_SIN_WAVE, freq1, 0.5) - self.signal2 = gr.sig_source_c(self._fs, gr.GR_SIN_WAVE, freq2, 0.5) + self.signal1 = analog.sig_source_c(self._fs, analog.GR_SIN_WAVE, freq1, 0.5) + self.signal2 = analog.sig_source_c(self._fs, analog.GR_SIN_WAVE, freq2, 0.5) self.signal = gr.add_cc() self.head = gr.head(gr.sizeof_gr_complex, self._N) -- cgit v1.2.3