diff options
Diffstat (limited to 'gr-filter/examples/interpolate.py')
-rwxr-xr-x | gr-filter/examples/interpolate.py | 14 |
1 files changed, 10 insertions, 4 deletions
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 @@ -25,17 +25,23 @@ 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) |