Adding a graphical tool to design and analyze filters.
authorTom <trondeau@vt.edu>
Wed, 19 Aug 2009 02:57:27 +0000 (22:57 -0400)
committerTom <trondeau@vt.edu>
Wed, 19 Aug 2009 02:57:27 +0000 (22:57 -0400)
gr-utils/src/python/gr_filter_design.py [new file with mode: 0755]
gr-utils/src/python/pyqt_filter.py [new file with mode: 0644]
gr-utils/src/python/pyqt_filter.ui [new file with mode: 0644]
gr-utils/src/python/pyqt_filter_firhpf.py [new file with mode: 0644]
gr-utils/src/python/pyqt_filter_firhpf.ui [new file with mode: 0644]
gr-utils/src/python/pyqt_filter_firlpf.py [new file with mode: 0644]
gr-utils/src/python/pyqt_filter_firlpf.ui [new file with mode: 0644]

diff --git a/gr-utils/src/python/gr_filter_design.py b/gr-utils/src/python/gr_filter_design.py
new file mode 100755 (executable)
index 0000000..a9f36ed
--- /dev/null
@@ -0,0 +1,164 @@
+#!/usr/bin/env python
+
+try:
+    import scipy
+    from scipy import fftpack
+except ImportError:
+    print "Please install SciPy to run this script (http://www.scipy.org/)"
+    raise SystemExit, 1
+
+import sys, os
+from PyQt4 import Qt, QtCore, QtGui
+import PyQt4.Qwt5 as Qwt
+from optparse import OptionParser
+from gnuradio import gr, eng_notation
+from scipy import fftpack
+
+from pyqt_filter import Ui_MainWindow
+from pyqt_filter_firlpf import Ui_firlpfForm
+from pyqt_filter_firhpf import Ui_firhpfForm
+
+class gr_plot_filter(QtGui.QMainWindow):
+    def __init__(self, qapp, options):
+        QtGui.QWidget.__init__(self, None)
+        self.gui = Ui_MainWindow()
+        self.gui.setupUi(self)
+
+        self.connect(self.gui.filterTypeComboBox,
+                     Qt.SIGNAL("currentIndexChanged(const QString&)"),
+                     self.changed_filter_type)
+        self.connect(self.gui.filterDesignTypeComboBox,
+                     Qt.SIGNAL("currentIndexChanged(const QString&)"),
+                     self.changed_filter_design_type)
+
+        self.connect(self.gui.designButton,
+                     Qt.SIGNAL("released()"),
+                     self.design)
+        
+        self.fltdeslpf = Ui_firlpfForm()
+        self.fltdeshpf = Ui_firhpfForm()
+
+        self.fltdeslpf.setupUi(self.gui.firlpfPage)
+        self.fltdeshpf.setupUi(self.gui.firhpfPage)
+
+        # Initialize to LPF
+        self.gui.filterTypeWidget.setCurrentWidget(self.gui.firlpfPage)
+
+        # Set up plot curves
+        self.rcurve = Qwt.QwtPlotCurve("Real")
+        self.rcurve.attach(self.gui.timePlot)
+
+        self.freqcurve = Qwt.QwtPlotCurve("PSD")
+        self.freqcurve.attach(self.gui.freqPlot)
+
+        # Create zoom functionality for the plots
+        self.timeZoomer = Qwt.QwtPlotZoomer(self.gui.timePlot.xBottom,
+                                            self.gui.timePlot.yLeft,
+                                            Qwt.QwtPicker.PointSelection,
+                                            Qwt.QwtPicker.AlwaysOn,
+                                            self.gui.timePlot.canvas())
+
+        self.freqZoomer = Qwt.QwtPlotZoomer(self.gui.freqPlot.xBottom,
+                                            self.gui.freqPlot.yLeft,
+                                            Qwt.QwtPicker.PointSelection,
+                                            Qwt.QwtPicker.AlwaysOn,
+                                            self.gui.freqPlot.canvas())
+
+        # Set up pen for colors and line width
+        blue = QtGui.qRgb(0x00, 0x00, 0xFF)
+        blueBrush = Qt.QBrush(Qt.QColor(blue))
+        self.freqcurve.setPen(Qt.QPen(blueBrush, 2))
+        self.rcurve.setPen(Qt.QPen(blueBrush, 2))
+
+        self.show()
+
+    def changed_filter_type(self, ftype):
+        strftype = str(ftype.toAscii())
+        if(ftype == "Low Pass"):
+            self.gui.filterTypeWidget.setCurrentWidget(self.gui.firlpfPage)
+        elif(ftype == "High Pass"):
+            self.gui.filterTypeWidget.setCurrentWidget(self.gui.firhpfPage)
+        
+    def changed_filter_design_type(self, design):
+        print design
+
+    def design(self):
+        fs = self.gui.sampleRateEdit.text().toDouble()[0]
+        gain = self.gui.filterGainEdit.text().toDouble()[0]
+        
+        ftype = self.gui.filterTypeComboBox.currentText()
+        if(ftype == "Low Pass"):
+            taps = self.design_win_lpf(fs, gain)
+        elif(ftype == "High Pass"):
+            taps = self.design_win_hpf(fs, gain)
+
+        self.update_time_curves(taps)
+        self.update_freq_curves(taps)
+        
+    def design_win_lpf(self, fs, gain):
+        pb = self.fltdeslpf.endofPassBandEdit.text().toDouble()[0]
+        sb = self.fltdeslpf.startofStopBandEdit.text().toDouble()[0]
+        atten = self.fltdeslpf.stopBandAttenEdit.text().toDouble()[0]
+        tb = sb - pb
+
+        taps = gr.firdes.low_pass_2(gain, fs, pb, tb, atten,
+                                    gr.firdes.WIN_BLACKMAN_hARRIS)
+        return taps
+    
+    def design_win_hpf(self, fs, gain):
+        print fs
+        print widget
+
+    def update_time_curves(self, taps):
+        ntaps = len(taps)
+        self.rcurve.setData(scipy.arange(ntaps), taps)
+
+        # Reset the x-axis to the new time scale
+        ymax = 1.5 * max(taps)
+        ymin = 1.5 * min(taps)
+        self.gui.timePlot.setAxisScale(self.gui.timePlot.xBottom,
+                                       0, ntaps)
+        self.gui.timePlot.setAxisScale(self.gui.timePlot.yLeft,
+                                       ymin, ymax)
+
+        # Set the zoomer base to unzoom to the new axis
+        self.timeZoomer.setZoomBase()
+    
+        self.gui.timePlot.replot()
+        
+    def update_freq_curves(self, taps, Npts=1000):
+        fftpts = fftpack.fft(taps, Npts)
+        freq = scipy.arange(0, Npts)
+
+        fftdB = 20.0*scipy.log10(abs(fftpts))
+        
+        self.freqcurve.setData(freq, fftdB)
+
+        self.gui.freqPlot.setAxisScale(self.gui.freqPlot.xBottom,
+                                       0, Npts/2)
+
+        # Set the zoomer base to unzoom to the new axis
+        self.freqZoomer.setZoomBase()
+
+        self.gui.freqPlot.replot()
+
+
+def setup_options():
+    usage="%prog: [options] (input_filename)"
+    description = ""
+
+    parser = OptionParser(conflict_handler="resolve",
+                          usage=usage, description=description)
+    return parser
+
+def main(args):
+    parser = setup_options()
+    (options, args) = parser.parse_args ()
+
+    app = Qt.QApplication(args)
+    gplt = gr_plot_filter(app, options)
+    app.exec_()
+
+if __name__ == '__main__':
+    main(sys.argv)
+
diff --git a/gr-utils/src/python/pyqt_filter.py b/gr-utils/src/python/pyqt_filter.py
new file mode 100644 (file)
index 0000000..a02a8e7
--- /dev/null
@@ -0,0 +1,144 @@
+# -*- coding: utf-8 -*-
+
+# Form implementation generated from reading ui file 'pyqt_filter.ui'
+#
+# Created: Tue Aug 18 22:48:21 2009
+#      by: PyQt4 UI code generator 4.4.4
+#
+# WARNING! All changes made in this file will be lost!
+
+from PyQt4 import QtCore, QtGui
+
+class Ui_MainWindow(object):
+    def setupUi(self, MainWindow):
+        MainWindow.setObjectName("MainWindow")
+        MainWindow.resize(624, 696)
+        self.centralwidget = QtGui.QWidget(MainWindow)
+        self.centralwidget.setObjectName("centralwidget")
+        self.gridLayout = QtGui.QGridLayout(self.centralwidget)
+        self.gridLayout.setObjectName("gridLayout")
+        self.tabGroup = QtGui.QTabWidget(self.centralwidget)
+        self.tabGroup.setMinimumSize(QtCore.QSize(800, 0))
+        self.tabGroup.setObjectName("tabGroup")
+        self.freqTab = QtGui.QWidget()
+        self.freqTab.setObjectName("freqTab")
+        self.horizontalLayout_2 = QtGui.QHBoxLayout(self.freqTab)
+        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
+        self.freqPlot = Qwt5.QwtPlot(self.freqTab)
+        self.freqPlot.setObjectName("freqPlot")
+        self.horizontalLayout_2.addWidget(self.freqPlot)
+        self.tabGroup.addTab(self.freqTab, "")
+        self.timeTab = QtGui.QWidget()
+        self.timeTab.setObjectName("timeTab")
+        self.horizontalLayout = QtGui.QHBoxLayout(self.timeTab)
+        self.horizontalLayout.setObjectName("horizontalLayout")
+        self.timePlot = Qwt5.QwtPlot(self.timeTab)
+        self.timePlot.setObjectName("timePlot")
+        self.horizontalLayout.addWidget(self.timePlot)
+        self.tabGroup.addTab(self.timeTab, "")
+        self.gridLayout.addWidget(self.tabGroup, 1, 1, 1, 1)
+        self.filterFrame = QtGui.QFrame(self.centralwidget)
+        self.filterFrame.setMinimumSize(QtCore.QSize(300, 0))
+        self.filterFrame.setMaximumSize(QtCore.QSize(300, 16777215))
+        self.filterFrame.setFrameShape(QtGui.QFrame.StyledPanel)
+        self.filterFrame.setFrameShadow(QtGui.QFrame.Raised)
+        self.filterFrame.setObjectName("filterFrame")
+        self.verticalLayout = QtGui.QVBoxLayout(self.filterFrame)
+        self.verticalLayout.setObjectName("verticalLayout")
+        self.filterTypeComboBox = QtGui.QComboBox(self.filterFrame)
+        self.filterTypeComboBox.setObjectName("filterTypeComboBox")
+        self.filterTypeComboBox.addItem(QtCore.QString())
+        self.filterTypeComboBox.addItem(QtCore.QString())
+        self.filterTypeComboBox.addItem(QtCore.QString())
+        self.filterTypeComboBox.addItem(QtCore.QString())
+        self.filterTypeComboBox.addItem(QtCore.QString())
+        self.filterTypeComboBox.addItem(QtCore.QString())
+        self.filterTypeComboBox.addItem(QtCore.QString())
+        self.verticalLayout.addWidget(self.filterTypeComboBox)
+        self.filterDesignTypeComboBox = QtGui.QComboBox(self.filterFrame)
+        self.filterDesignTypeComboBox.setObjectName("filterDesignTypeComboBox")
+        self.filterDesignTypeComboBox.addItem(QtCore.QString())
+        self.filterDesignTypeComboBox.addItem(QtCore.QString())
+        self.verticalLayout.addWidget(self.filterDesignTypeComboBox)
+        self.formLayout_2 = QtGui.QFormLayout()
+        self.formLayout_2.setFieldGrowthPolicy(QtGui.QFormLayout.AllNonFixedFieldsGrow)
+        self.formLayout_2.setObjectName("formLayout_2")
+        self.sampleRateLabel = QtGui.QLabel(self.filterFrame)
+        self.sampleRateLabel.setMaximumSize(QtCore.QSize(16777215, 30))
+        self.sampleRateLabel.setObjectName("sampleRateLabel")
+        self.formLayout_2.setWidget(0, QtGui.QFormLayout.LabelRole, self.sampleRateLabel)
+        self.sampleRateEdit = QtGui.QLineEdit(self.filterFrame)
+        self.sampleRateEdit.setMaximumSize(QtCore.QSize(16777215, 30))
+        self.sampleRateEdit.setObjectName("sampleRateEdit")
+        self.formLayout_2.setWidget(0, QtGui.QFormLayout.FieldRole, self.sampleRateEdit)
+        self.filterGainLabel = QtGui.QLabel(self.filterFrame)
+        self.filterGainLabel.setObjectName("filterGainLabel")
+        self.formLayout_2.setWidget(1, QtGui.QFormLayout.LabelRole, self.filterGainLabel)
+        self.filterGainEdit = QtGui.QLineEdit(self.filterFrame)
+        self.filterGainEdit.setObjectName("filterGainEdit")
+        self.formLayout_2.setWidget(1, QtGui.QFormLayout.FieldRole, self.filterGainEdit)
+        self.verticalLayout.addLayout(self.formLayout_2)
+        self.filterTypeWidget = QtGui.QStackedWidget(self.filterFrame)
+        self.filterTypeWidget.setObjectName("filterTypeWidget")
+        self.firlpfPage = QtGui.QWidget()
+        self.firlpfPage.setObjectName("firlpfPage")
+        self.filterTypeWidget.addWidget(self.firlpfPage)
+        self.firhpfPage = QtGui.QWidget()
+        self.firhpfPage.setObjectName("firhpfPage")
+        self.filterTypeWidget.addWidget(self.firhpfPage)
+        self.verticalLayout.addWidget(self.filterTypeWidget)
+        self.designButton = QtGui.QPushButton(self.filterFrame)
+        self.designButton.setMinimumSize(QtCore.QSize(0, 0))
+        self.designButton.setMaximumSize(QtCore.QSize(200, 16777215))
+        self.designButton.setObjectName("designButton")
+        self.verticalLayout.addWidget(self.designButton)
+        self.gridLayout.addWidget(self.filterFrame, 1, 0, 1, 1)
+        MainWindow.setCentralWidget(self.centralwidget)
+        self.menubar = QtGui.QMenuBar(MainWindow)
+        self.menubar.setGeometry(QtCore.QRect(0, 0, 624, 25))
+        self.menubar.setObjectName("menubar")
+        self.menu_File = QtGui.QMenu(self.menubar)
+        self.menu_File.setObjectName("menu_File")
+        MainWindow.setMenuBar(self.menubar)
+        self.statusbar = QtGui.QStatusBar(MainWindow)
+        self.statusbar.setObjectName("statusbar")
+        MainWindow.setStatusBar(self.statusbar)
+        self.action_open = QtGui.QAction(MainWindow)
+        self.action_open.setObjectName("action_open")
+        self.action_exit = QtGui.QAction(MainWindow)
+        self.action_exit.setObjectName("action_exit")
+        self.menu_File.addAction(self.action_exit)
+        self.menubar.addAction(self.menu_File.menuAction())
+
+        self.retranslateUi(MainWindow)
+        self.tabGroup.setCurrentIndex(0)
+        QtCore.QObject.connect(self.action_exit, QtCore.SIGNAL("activated()"), MainWindow.close)
+        QtCore.QMetaObject.connectSlotsByName(MainWindow)
+        MainWindow.setTabOrder(self.filterTypeComboBox, self.filterDesignTypeComboBox)
+        MainWindow.setTabOrder(self.filterDesignTypeComboBox, self.sampleRateEdit)
+        MainWindow.setTabOrder(self.sampleRateEdit, self.filterGainEdit)
+        MainWindow.setTabOrder(self.filterGainEdit, self.designButton)
+        MainWindow.setTabOrder(self.designButton, self.tabGroup)
+
+    def retranslateUi(self, MainWindow):
+        MainWindow.setWindowTitle(QtGui.QApplication.translate("MainWindow", "MainWindow", None, QtGui.QApplication.UnicodeUTF8))
+        self.tabGroup.setTabText(self.tabGroup.indexOf(self.freqTab), QtGui.QApplication.translate("MainWindow", "Frequency Domain", None, QtGui.QApplication.UnicodeUTF8))
+        self.tabGroup.setTabText(self.tabGroup.indexOf(self.timeTab), QtGui.QApplication.translate("MainWindow", "Time Domain", None, QtGui.QApplication.UnicodeUTF8))
+        self.filterTypeComboBox.setItemText(0, QtGui.QApplication.translate("MainWindow", "Low Pass", None, QtGui.QApplication.UnicodeUTF8))
+        self.filterTypeComboBox.setItemText(1, QtGui.QApplication.translate("MainWindow", "Band Pass", None, QtGui.QApplication.UnicodeUTF8))
+        self.filterTypeComboBox.setItemText(2, QtGui.QApplication.translate("MainWindow", "Complex Band Pass", None, QtGui.QApplication.UnicodeUTF8))
+        self.filterTypeComboBox.setItemText(3, QtGui.QApplication.translate("MainWindow", "Band Notch", None, QtGui.QApplication.UnicodeUTF8))
+        self.filterTypeComboBox.setItemText(4, QtGui.QApplication.translate("MainWindow", "High Pass", None, QtGui.QApplication.UnicodeUTF8))
+        self.filterTypeComboBox.setItemText(5, QtGui.QApplication.translate("MainWindow", "Root Raised Cosine", None, QtGui.QApplication.UnicodeUTF8))
+        self.filterTypeComboBox.setItemText(6, QtGui.QApplication.translate("MainWindow", "Gaussian", None, QtGui.QApplication.UnicodeUTF8))
+        self.filterDesignTypeComboBox.setItemText(0, QtGui.QApplication.translate("MainWindow", "Windowed", None, QtGui.QApplication.UnicodeUTF8))
+        self.filterDesignTypeComboBox.setItemText(1, QtGui.QApplication.translate("MainWindow", "Equiripple", None, QtGui.QApplication.UnicodeUTF8))
+        self.sampleRateLabel.setText(QtGui.QApplication.translate("MainWindow", "Sample Rate (sps)", None, QtGui.QApplication.UnicodeUTF8))
+        self.filterGainLabel.setText(QtGui.QApplication.translate("MainWindow", "Filter Gain", None, QtGui.QApplication.UnicodeUTF8))
+        self.designButton.setText(QtGui.QApplication.translate("MainWindow", "Design", None, QtGui.QApplication.UnicodeUTF8))
+        self.menu_File.setTitle(QtGui.QApplication.translate("MainWindow", "&File", None, QtGui.QApplication.UnicodeUTF8))
+        self.action_open.setText(QtGui.QApplication.translate("MainWindow", "&Open", None, QtGui.QApplication.UnicodeUTF8))
+        self.action_open.setShortcut(QtGui.QApplication.translate("MainWindow", "Ctrl+O", None, QtGui.QApplication.UnicodeUTF8))
+        self.action_exit.setText(QtGui.QApplication.translate("MainWindow", "E&xit", None, QtGui.QApplication.UnicodeUTF8))
+
+from PyQt4 import Qwt5
diff --git a/gr-utils/src/python/pyqt_filter.ui b/gr-utils/src/python/pyqt_filter.ui
new file mode 100644 (file)
index 0000000..ed3b186
--- /dev/null
@@ -0,0 +1,261 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>MainWindow</class>
+ <widget class="QMainWindow" name="MainWindow">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>624</width>
+    <height>696</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>MainWindow</string>
+  </property>
+  <widget class="QWidget" name="centralwidget">
+   <layout class="QGridLayout" name="gridLayout">
+    <item row="1" column="1">
+     <widget class="QTabWidget" name="tabGroup">
+      <property name="minimumSize">
+       <size>
+        <width>800</width>
+        <height>0</height>
+       </size>
+      </property>
+      <property name="currentIndex">
+       <number>0</number>
+      </property>
+      <widget class="QWidget" name="freqTab">
+       <attribute name="title">
+        <string>Frequency Domain</string>
+       </attribute>
+       <layout class="QHBoxLayout" name="horizontalLayout_2">
+        <item>
+         <widget class="QwtPlot" name="freqPlot"/>
+        </item>
+       </layout>
+      </widget>
+      <widget class="QWidget" name="timeTab">
+       <attribute name="title">
+        <string>Time Domain</string>
+       </attribute>
+       <layout class="QHBoxLayout" name="horizontalLayout">
+        <item>
+         <widget class="QwtPlot" name="timePlot"/>
+        </item>
+       </layout>
+      </widget>
+     </widget>
+    </item>
+    <item row="1" column="0">
+     <widget class="QFrame" name="filterFrame">
+      <property name="minimumSize">
+       <size>
+        <width>300</width>
+        <height>0</height>
+       </size>
+      </property>
+      <property name="maximumSize">
+       <size>
+        <width>300</width>
+        <height>16777215</height>
+       </size>
+      </property>
+      <property name="frameShape">
+       <enum>QFrame::StyledPanel</enum>
+      </property>
+      <property name="frameShadow">
+       <enum>QFrame::Raised</enum>
+      </property>
+      <layout class="QVBoxLayout" name="verticalLayout">
+       <item>
+        <widget class="QComboBox" name="filterTypeComboBox">
+         <item>
+          <property name="text">
+           <string>Low Pass</string>
+          </property>
+         </item>
+         <item>
+          <property name="text">
+           <string>Band Pass</string>
+          </property>
+         </item>
+         <item>
+          <property name="text">
+           <string>Complex Band Pass</string>
+          </property>
+         </item>
+         <item>
+          <property name="text">
+           <string>Band Notch</string>
+          </property>
+         </item>
+         <item>
+          <property name="text">
+           <string>High Pass</string>
+          </property>
+         </item>
+         <item>
+          <property name="text">
+           <string>Root Raised Cosine</string>
+          </property>
+         </item>
+         <item>
+          <property name="text">
+           <string>Gaussian</string>
+          </property>
+         </item>
+        </widget>
+       </item>
+       <item>
+        <widget class="QComboBox" name="filterDesignTypeComboBox">
+         <item>
+          <property name="text">
+           <string>Windowed</string>
+          </property>
+         </item>
+         <item>
+          <property name="text">
+           <string>Equiripple</string>
+          </property>
+         </item>
+        </widget>
+       </item>
+       <item>
+        <layout class="QFormLayout" name="formLayout_2">
+         <property name="fieldGrowthPolicy">
+          <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
+         </property>
+         <item row="0" column="0">
+          <widget class="QLabel" name="sampleRateLabel">
+           <property name="maximumSize">
+            <size>
+             <width>16777215</width>
+             <height>30</height>
+            </size>
+           </property>
+           <property name="text">
+            <string>Sample Rate (sps)</string>
+           </property>
+          </widget>
+         </item>
+         <item row="0" column="1">
+          <widget class="QLineEdit" name="sampleRateEdit">
+           <property name="maximumSize">
+            <size>
+             <width>16777215</width>
+             <height>30</height>
+            </size>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="0">
+          <widget class="QLabel" name="filterGainLabel">
+           <property name="text">
+            <string>Filter Gain</string>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="1">
+          <widget class="QLineEdit" name="filterGainEdit"/>
+         </item>
+        </layout>
+       </item>
+       <item>
+        <widget class="QStackedWidget" name="filterTypeWidget">
+         <widget class="QWidget" name="firlpfPage"/>
+         <widget class="QWidget" name="firhpfPage"/>
+        </widget>
+       </item>
+       <item>
+        <widget class="QPushButton" name="designButton">
+         <property name="minimumSize">
+          <size>
+           <width>0</width>
+           <height>0</height>
+          </size>
+         </property>
+         <property name="maximumSize">
+          <size>
+           <width>200</width>
+           <height>16777215</height>
+          </size>
+         </property>
+         <property name="text">
+          <string>Design</string>
+         </property>
+        </widget>
+       </item>
+      </layout>
+     </widget>
+    </item>
+   </layout>
+  </widget>
+  <widget class="QMenuBar" name="menubar">
+   <property name="geometry">
+    <rect>
+     <x>0</x>
+     <y>0</y>
+     <width>624</width>
+     <height>25</height>
+    </rect>
+   </property>
+   <widget class="QMenu" name="menu_File">
+    <property name="title">
+     <string>&amp;File</string>
+    </property>
+    <addaction name="action_exit"/>
+   </widget>
+   <addaction name="menu_File"/>
+  </widget>
+  <widget class="QStatusBar" name="statusbar"/>
+  <action name="action_open">
+   <property name="text">
+    <string>&amp;Open</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+O</string>
+   </property>
+  </action>
+  <action name="action_exit">
+   <property name="text">
+    <string>E&amp;xit</string>
+   </property>
+  </action>
+ </widget>
+ <customwidgets>
+  <customwidget>
+   <class>QwtPlot</class>
+   <extends>QFrame</extends>
+   <header>qwt_plot.h</header>
+  </customwidget>
+ </customwidgets>
+ <tabstops>
+  <tabstop>filterTypeComboBox</tabstop>
+  <tabstop>filterDesignTypeComboBox</tabstop>
+  <tabstop>sampleRateEdit</tabstop>
+  <tabstop>filterGainEdit</tabstop>
+  <tabstop>designButton</tabstop>
+  <tabstop>tabGroup</tabstop>
+ </tabstops>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>action_exit</sender>
+   <signal>activated()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>close()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>399</x>
+     <y>347</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
diff --git a/gr-utils/src/python/pyqt_filter_firhpf.py b/gr-utils/src/python/pyqt_filter_firhpf.py
new file mode 100644 (file)
index 0000000..9aa8d0e
--- /dev/null
@@ -0,0 +1,47 @@
+# -*- coding: utf-8 -*-
+
+# Form implementation generated from reading ui file 'pyqt_filter_firhpf.ui'
+#
+# Created: Tue Aug 18 22:19:04 2009
+#      by: PyQt4 UI code generator 4.4.4
+#
+# WARNING! All changes made in this file will be lost!
+
+from PyQt4 import QtCore, QtGui
+
+class Ui_firhpfForm(object):
+    def setupUi(self, firhpfForm):
+        firhpfForm.setObjectName("firhpfForm")
+        firhpfForm.resize(335, 300)
+        firhpfForm.setMinimumSize(QtCore.QSize(200, 0))
+        self.formLayout = QtGui.QFormLayout(firhpfForm)
+        self.formLayout.setFieldGrowthPolicy(QtGui.QFormLayout.AllNonFixedFieldsGrow)
+        self.formLayout.setObjectName("formLayout")
+        self.endofPassBandLabel = QtGui.QLabel(firhpfForm)
+        self.endofPassBandLabel.setObjectName("endofPassBandLabel")
+        self.formLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.endofPassBandLabel)
+        self.endofPassBandEdit = QtGui.QLineEdit(firhpfForm)
+        self.endofPassBandEdit.setObjectName("endofPassBandEdit")
+        self.formLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.endofPassBandEdit)
+        self.startofStopBandLabel = QtGui.QLabel(firhpfForm)
+        self.startofStopBandLabel.setObjectName("startofStopBandLabel")
+        self.formLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.startofStopBandLabel)
+        self.startofStopBandEdit = QtGui.QLineEdit(firhpfForm)
+        self.startofStopBandEdit.setObjectName("startofStopBandEdit")
+        self.formLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.startofStopBandEdit)
+        self.stopBandAttenLabel = QtGui.QLabel(firhpfForm)
+        self.stopBandAttenLabel.setObjectName("stopBandAttenLabel")
+        self.formLayout.setWidget(2, QtGui.QFormLayout.LabelRole, self.stopBandAttenLabel)
+        self.stopBandAttenEdit = QtGui.QLineEdit(firhpfForm)
+        self.stopBandAttenEdit.setObjectName("stopBandAttenEdit")
+        self.formLayout.setWidget(2, QtGui.QFormLayout.FieldRole, self.stopBandAttenEdit)
+
+        self.retranslateUi(firhpfForm)
+        QtCore.QMetaObject.connectSlotsByName(firhpfForm)
+
+    def retranslateUi(self, firhpfForm):
+        firhpfForm.setWindowTitle(QtGui.QApplication.translate("firhpfForm", "Form", None, QtGui.QApplication.UnicodeUTF8))
+        self.endofPassBandLabel.setText(QtGui.QApplication.translate("firhpfForm", "End of Stop Band (Hz)", None, QtGui.QApplication.UnicodeUTF8))
+        self.startofStopBandLabel.setText(QtGui.QApplication.translate("firhpfForm", "Start of Pass Band (Hz)", None, QtGui.QApplication.UnicodeUTF8))
+        self.stopBandAttenLabel.setText(QtGui.QApplication.translate("firhpfForm", "Stop Band Attenuation (dB)", None, QtGui.QApplication.UnicodeUTF8))
+
diff --git a/gr-utils/src/python/pyqt_filter_firhpf.ui b/gr-utils/src/python/pyqt_filter_firhpf.ui
new file mode 100644 (file)
index 0000000..4c04ef9
--- /dev/null
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>firhpfForm</class>
+ <widget class="QWidget" name="firhpfForm">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>335</width>
+    <height>300</height>
+   </rect>
+  </property>
+  <property name="minimumSize">
+   <size>
+    <width>200</width>
+    <height>0</height>
+   </size>
+  </property>
+  <property name="windowTitle">
+   <string>Form</string>
+  </property>
+  <layout class="QFormLayout" name="formLayout">
+   <property name="fieldGrowthPolicy">
+    <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
+   </property>
+   <item row="0" column="0">
+    <widget class="QLabel" name="endofPassBandLabel">
+     <property name="text">
+      <string>End of Stop Band (Hz)</string>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="1">
+    <widget class="QLineEdit" name="endofPassBandEdit"/>
+   </item>
+   <item row="1" column="0">
+    <widget class="QLabel" name="startofStopBandLabel">
+     <property name="text">
+      <string>Start of Pass Band (Hz)</string>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="1">
+    <widget class="QLineEdit" name="startofStopBandEdit"/>
+   </item>
+   <item row="2" column="0">
+    <widget class="QLabel" name="stopBandAttenLabel">
+     <property name="text">
+      <string>Stop Band Attenuation (dB)</string>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="1">
+    <widget class="QLineEdit" name="stopBandAttenEdit"/>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/gr-utils/src/python/pyqt_filter_firlpf.py b/gr-utils/src/python/pyqt_filter_firlpf.py
new file mode 100644 (file)
index 0000000..47aca0f
--- /dev/null
@@ -0,0 +1,47 @@
+# -*- coding: utf-8 -*-
+
+# Form implementation generated from reading ui file 'pyqt_filter_firlpf.ui'
+#
+# Created: Tue Aug 18 22:19:03 2009
+#      by: PyQt4 UI code generator 4.4.4
+#
+# WARNING! All changes made in this file will be lost!
+
+from PyQt4 import QtCore, QtGui
+
+class Ui_firlpfForm(object):
+    def setupUi(self, firlpfForm):
+        firlpfForm.setObjectName("firlpfForm")
+        firlpfForm.resize(335, 300)
+        firlpfForm.setMinimumSize(QtCore.QSize(200, 0))
+        self.formLayout = QtGui.QFormLayout(firlpfForm)
+        self.formLayout.setFieldGrowthPolicy(QtGui.QFormLayout.AllNonFixedFieldsGrow)
+        self.formLayout.setObjectName("formLayout")
+        self.endofPassBandLabel = QtGui.QLabel(firlpfForm)
+        self.endofPassBandLabel.setObjectName("endofPassBandLabel")
+        self.formLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.endofPassBandLabel)
+        self.endofPassBandEdit = QtGui.QLineEdit(firlpfForm)
+        self.endofPassBandEdit.setObjectName("endofPassBandEdit")
+        self.formLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.endofPassBandEdit)
+        self.startofStopBandLabel = QtGui.QLabel(firlpfForm)
+        self.startofStopBandLabel.setObjectName("startofStopBandLabel")
+        self.formLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.startofStopBandLabel)
+        self.stopBandAttenLabel = QtGui.QLabel(firlpfForm)
+        self.stopBandAttenLabel.setObjectName("stopBandAttenLabel")
+        self.formLayout.setWidget(2, QtGui.QFormLayout.LabelRole, self.stopBandAttenLabel)
+        self.stopBandAttenEdit = QtGui.QLineEdit(firlpfForm)
+        self.stopBandAttenEdit.setObjectName("stopBandAttenEdit")
+        self.formLayout.setWidget(2, QtGui.QFormLayout.FieldRole, self.stopBandAttenEdit)
+        self.startofStopBandEdit = QtGui.QLineEdit(firlpfForm)
+        self.startofStopBandEdit.setObjectName("startofStopBandEdit")
+        self.formLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.startofStopBandEdit)
+
+        self.retranslateUi(firlpfForm)
+        QtCore.QMetaObject.connectSlotsByName(firlpfForm)
+
+    def retranslateUi(self, firlpfForm):
+        firlpfForm.setWindowTitle(QtGui.QApplication.translate("firlpfForm", "Form", None, QtGui.QApplication.UnicodeUTF8))
+        self.endofPassBandLabel.setText(QtGui.QApplication.translate("firlpfForm", "End of Pass Band (Hz)", None, QtGui.QApplication.UnicodeUTF8))
+        self.startofStopBandLabel.setText(QtGui.QApplication.translate("firlpfForm", "Start of Stop Band (Hz)", None, QtGui.QApplication.UnicodeUTF8))
+        self.stopBandAttenLabel.setText(QtGui.QApplication.translate("firlpfForm", "Stop Band Attenuation (dB)", None, QtGui.QApplication.UnicodeUTF8))
+
diff --git a/gr-utils/src/python/pyqt_filter_firlpf.ui b/gr-utils/src/python/pyqt_filter_firlpf.ui
new file mode 100644 (file)
index 0000000..a96d609
--- /dev/null
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>firlpfForm</class>
+ <widget class="QWidget" name="firlpfForm">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>335</width>
+    <height>300</height>
+   </rect>
+  </property>
+  <property name="minimumSize">
+   <size>
+    <width>200</width>
+    <height>0</height>
+   </size>
+  </property>
+  <property name="windowTitle">
+   <string>Form</string>
+  </property>
+  <layout class="QFormLayout" name="formLayout">
+   <property name="fieldGrowthPolicy">
+    <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
+   </property>
+   <item row="0" column="0">
+    <widget class="QLabel" name="endofPassBandLabel">
+     <property name="text">
+      <string>End of Pass Band (Hz)</string>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="1">
+    <widget class="QLineEdit" name="endofPassBandEdit"/>
+   </item>
+   <item row="1" column="0">
+    <widget class="QLabel" name="startofStopBandLabel">
+     <property name="text">
+      <string>Start of Stop Band (Hz)</string>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="0">
+    <widget class="QLabel" name="stopBandAttenLabel">
+     <property name="text">
+      <string>Stop Band Attenuation (dB)</string>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="1">
+    <widget class="QLineEdit" name="stopBandAttenEdit"/>
+   </item>
+   <item row="1" column="1">
+    <widget class="QLineEdit" name="startofStopBandEdit"/>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>