From e19946f858e7ede2e76cfd78bc194a3f81c13197 Mon Sep 17 00:00:00 2001 From: Tom Date: Tue, 18 Aug 2009 22:57:27 -0400 Subject: [PATCH] Adding a graphical tool to design and analyze filters. --- gr-utils/src/python/gr_filter_design.py | 164 ++++++++++++++ gr-utils/src/python/pyqt_filter.py | 144 ++++++++++++ gr-utils/src/python/pyqt_filter.ui | 261 ++++++++++++++++++++++ gr-utils/src/python/pyqt_filter_firhpf.py | 47 ++++ gr-utils/src/python/pyqt_filter_firhpf.ui | 60 +++++ gr-utils/src/python/pyqt_filter_firlpf.py | 47 ++++ gr-utils/src/python/pyqt_filter_firlpf.ui | 60 +++++ 7 files changed, 783 insertions(+) create mode 100755 gr-utils/src/python/gr_filter_design.py create mode 100644 gr-utils/src/python/pyqt_filter.py create mode 100644 gr-utils/src/python/pyqt_filter.ui create mode 100644 gr-utils/src/python/pyqt_filter_firhpf.py create mode 100644 gr-utils/src/python/pyqt_filter_firhpf.ui create mode 100644 gr-utils/src/python/pyqt_filter_firlpf.py create mode 100644 gr-utils/src/python/pyqt_filter_firlpf.ui diff --git a/gr-utils/src/python/gr_filter_design.py b/gr-utils/src/python/gr_filter_design.py new file mode 100755 index 00000000..a9f36ed0 --- /dev/null +++ b/gr-utils/src/python/gr_filter_design.py @@ -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 index 00000000..a02a8e7f --- /dev/null +++ b/gr-utils/src/python/pyqt_filter.py @@ -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 index 00000000..ed3b1860 --- /dev/null +++ b/gr-utils/src/python/pyqt_filter.ui @@ -0,0 +1,261 @@ + + + MainWindow + + + + 0 + 0 + 624 + 696 + + + + MainWindow + + + + + + + + 800 + 0 + + + + 0 + + + + Frequency Domain + + + + + + + + + + Time Domain + + + + + + + + + + + + + + 300 + 0 + + + + + 300 + 16777215 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + + + + Low Pass + + + + + Band Pass + + + + + Complex Band Pass + + + + + Band Notch + + + + + High Pass + + + + + Root Raised Cosine + + + + + Gaussian + + + + + + + + + Windowed + + + + + Equiripple + + + + + + + + QFormLayout::AllNonFixedFieldsGrow + + + + + + 16777215 + 30 + + + + Sample Rate (sps) + + + + + + + + 16777215 + 30 + + + + + + + + Filter Gain + + + + + + + + + + + + + + + + + + + 0 + 0 + + + + + 200 + 16777215 + + + + Design + + + + + + + + + + + + 0 + 0 + 624 + 25 + + + + + &File + + + + + + + + + &Open + + + Ctrl+O + + + + + E&xit + + + + + + QwtPlot + QFrame +
qwt_plot.h
+
+
+ + filterTypeComboBox + filterDesignTypeComboBox + sampleRateEdit + filterGainEdit + designButton + tabGroup + + + + + action_exit + activated() + MainWindow + close() + + + -1 + -1 + + + 399 + 347 + + + + +
diff --git a/gr-utils/src/python/pyqt_filter_firhpf.py b/gr-utils/src/python/pyqt_filter_firhpf.py new file mode 100644 index 00000000..9aa8d0ed --- /dev/null +++ b/gr-utils/src/python/pyqt_filter_firhpf.py @@ -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 index 00000000..4c04ef9c --- /dev/null +++ b/gr-utils/src/python/pyqt_filter_firhpf.ui @@ -0,0 +1,60 @@ + + + firhpfForm + + + + 0 + 0 + 335 + 300 + + + + + 200 + 0 + + + + Form + + + + QFormLayout::AllNonFixedFieldsGrow + + + + + End of Stop Band (Hz) + + + + + + + + + + Start of Pass Band (Hz) + + + + + + + + + + Stop Band Attenuation (dB) + + + + + + + + + + + diff --git a/gr-utils/src/python/pyqt_filter_firlpf.py b/gr-utils/src/python/pyqt_filter_firlpf.py new file mode 100644 index 00000000..47aca0f2 --- /dev/null +++ b/gr-utils/src/python/pyqt_filter_firlpf.py @@ -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 index 00000000..a96d609b --- /dev/null +++ b/gr-utils/src/python/pyqt_filter_firlpf.ui @@ -0,0 +1,60 @@ + + + firlpfForm + + + + 0 + 0 + 335 + 300 + + + + + 200 + 0 + + + + Form + + + + QFormLayout::AllNonFixedFieldsGrow + + + + + End of Pass Band (Hz) + + + + + + + + + + Start of Stop Band (Hz) + + + + + + + Stop Band Attenuation (dB) + + + + + + + + + + + + + + -- 2.30.2