From a0d13b42bfb3fd081d77e9d73cf4db9695a6d88b Mon Sep 17 00:00:00 2001
From: trondeau <trondeau@221aa14e-8319-0410-a670-987f0aec2ac5>
Date: Wed, 12 Aug 2009 03:39:03 +0000
Subject: Merging trondeau/pfb r11249:11581 into trunk. This adds a few
 polyphase filterbank implementations that do (integer) decimation, (integer)
 interpolation, arbitrary resampling, and channelizing.
 gnuradio-example/python/pfb includes a number of different examples of how to
 use these blocks.

git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@11583 221aa14e-8319-0410-a670-987f0aec2ac5
---
 gr-utils/src/python/gr_plot_const.py |  8 +++-----
 gr-utils/src/python/gr_plot_fft.py   | 13 +++----------
 gr-utils/src/python/gr_plot_iq.py    |  7 ++-----
 gr-utils/src/python/gr_plot_psd.py   | 13 +++----------
 gr-utils/src/python/plot_data.py     |  3 ---
 5 files changed, 11 insertions(+), 33 deletions(-)

(limited to 'gr-utils/src/python')

diff --git a/gr-utils/src/python/gr_plot_const.py b/gr-utils/src/python/gr_plot_const.py
index 3553099552..ec2272c744 100755
--- a/gr-utils/src/python/gr_plot_const.py
+++ b/gr-utils/src/python/gr_plot_const.py
@@ -35,9 +35,6 @@ except ImportError:
 
 from optparse import OptionParser
 
-matplotlib.interactive(True)
-matplotlib.use('TkAgg')
-
 class draw_constellation:
     def __init__(self, filename, options):
         self.hfile = open(filename, "r")
@@ -139,8 +136,9 @@ class draw_constellation:
         draw()
         
     def zoom(self, event):
-        newxlim = self.sp_iq.get_xlim()
-        if(newxlim.all() != self.xlim.all()):
+        newxlim = scipy.array(self.sp_iq.get_xlim())
+        curxlim = scipy.array(self.xlim)
+        if(newxlim.all() != curxlim.all()):
             self.xlim = newxlim
             r = self.reals[int(ceil(self.xlim[0])) : int(ceil(self.xlim[1]))]
             i = self.imags[int(ceil(self.xlim[0])) : int(ceil(self.xlim[1]))]
diff --git a/gr-utils/src/python/gr_plot_fft.py b/gr-utils/src/python/gr_plot_fft.py
index 59a3f286b6..a9c1417f9b 100755
--- a/gr-utils/src/python/gr_plot_fft.py
+++ b/gr-utils/src/python/gr_plot_fft.py
@@ -20,14 +20,6 @@
 # Boston, MA 02110-1301, USA.
 # 
 
-try:
-    import matplotlib
-    matplotlib.use('TkAgg')
-    matplotlib.interactive(True)
-except ImportError:
-    print "Please install Matplotlib to run this script (http://matplotlib.sourceforge.net/)"
-    raise SystemExit, 1
-
 try:
     import scipy
     from scipy import fftpack
@@ -164,8 +156,9 @@ class gr_plot_fft:
         draw()
         
     def zoom(self, event):
-        newxlim = self.sp_iq.get_xlim()
-        if(newxlim.all() != self.xlim.all()):
+        newxlim = scipy.array(self.sp_iq.get_xlim())
+        curxlim = scipy.array(self.xlim)
+        if(newxlim.all() != curxlim.all()):
             self.xlim = newxlim
             xmin = max(0, int(ceil(self.sample_rate*(self.xlim[0] - self.position))))
             xmax = min(int(ceil(self.sample_rate*(self.xlim[1] - self.position))), len(self.iq))
diff --git a/gr-utils/src/python/gr_plot_iq.py b/gr-utils/src/python/gr_plot_iq.py
index 2a4142a815..371ce3b799 100755
--- a/gr-utils/src/python/gr_plot_iq.py
+++ b/gr-utils/src/python/gr_plot_iq.py
@@ -34,10 +34,7 @@ except ImportError:
 
 from optparse import OptionParser
 
-matplotlib.interactive(True)
-matplotlib.use('TkAgg')
-
-class draw_fft:
+class draw_iq:
     def __init__(self, filename, options):
         self.hfile = open(filename, "r")
         self.block_length = options.block
@@ -168,7 +165,7 @@ def main():
         raise SystemExit, 1
     filename = args[0]
 
-    dc = draw_fft(filename, options)
+    dc = draw_iq(filename, options)
 
 if __name__ == "__main__":
     try:
diff --git a/gr-utils/src/python/gr_plot_psd.py b/gr-utils/src/python/gr_plot_psd.py
index 669d7b573a..0e3dbecd94 100755
--- a/gr-utils/src/python/gr_plot_psd.py
+++ b/gr-utils/src/python/gr_plot_psd.py
@@ -20,14 +20,6 @@
 # Boston, MA 02110-1301, USA.
 # 
 
-try:
-    import matplotlib
-    matplotlib.use('TkAgg')
-    matplotlib.interactive(True)
-except ImportError:
-    print "Please install Matplotlib to run this script (http://matplotlib.sourceforge.net/)"
-    raise SystemExit, 1
-
 try:
     import scipy
     from scipy import fftpack
@@ -187,8 +179,9 @@ class gr_plot_psd:
         draw()
         
     def zoom(self, event):
-        newxlim = self.sp_iq.get_xlim()
-        if(newxlim.all() != self.xlim.all()):
+        newxlim = scipy.array(self.sp_iq.get_xlim())
+        curxlim = scipy.array(self.xlim)
+        if(newxlim.all() != curxlim.all()):
             self.xlim = newxlim
             xmin = max(0, int(ceil(self.sample_rate*(self.xlim[0] - self.position))))
             xmax = min(int(ceil(self.sample_rate*(self.xlim[1] - self.position))), len(self.iq))
diff --git a/gr-utils/src/python/plot_data.py b/gr-utils/src/python/plot_data.py
index 7c79e17143..08cdd60306 100644
--- a/gr-utils/src/python/plot_data.py
+++ b/gr-utils/src/python/plot_data.py
@@ -33,9 +33,6 @@ except ImportError:
 
 from optparse import OptionParser
 
-matplotlib.interactive(True)
-matplotlib.use('TkAgg')
-
 class plot_data:
     def __init__(self, datatype, filenames, options):
         self.hfile = list()
-- 
cgit v1.2.3