summaryrefslogtreecommitdiff
path: root/gr-filter/examples/interpolate.py
diff options
context:
space:
mode:
authorTom Rondeau <trondeau@vt.edu>2012-11-06 14:28:22 -0500
committerTom Rondeau <trondeau@vt.edu>2012-11-06 14:40:43 -0500
commitfd110bdbbe8bc40781c34f33c70deec5b7931109 (patch)
treeef18e813add19b09c57cc21cb672ea602701405b /gr-filter/examples/interpolate.py
parent0c9c16fb008b02a5af39fb22e18acfff2dbd933a (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/interpolate.py')
-rwxr-xr-xgr-filter/examples/interpolate.py14
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)