summaryrefslogtreecommitdiff
path: root/gr-utils/src/python
diff options
context:
space:
mode:
authorTom Rondeau2011-06-05 15:36:47 -0400
committerTom Rondeau2011-06-05 15:36:47 -0400
commit233f960474f86bc8cc519ce7257b29d8615c4000 (patch)
tree1a4c846119a01a5a195a9e9ee5b854384b0b6535 /gr-utils/src/python
parent024c79a7fb13c08bae7b97079a245f711ecf12a7 (diff)
parenta23a0a46c3bf446cbe09d71bc8e10b061256ef56 (diff)
downloadgnuradio-233f960474f86bc8cc519ce7257b29d8615c4000.tar.gz
gnuradio-233f960474f86bc8cc519ce7257b29d8615c4000.tar.bz2
gnuradio-233f960474f86bc8cc519ce7257b29d8615c4000.zip
Merge branch 'master' into turbo
Diffstat (limited to 'gr-utils/src/python')
-rw-r--r--gr-utils/src/python/Makefile.am2
-rwxr-xr-xgr-utils/src/python/gr_filter_design.py295
-rwxr-xr-xgr-utils/src/python/gr_plot_psd.py50
-rw-r--r--gr-utils/src/python/pyqt_filter.py61
-rw-r--r--gr-utils/src/python/pyqt_filter.ui505
5 files changed, 573 insertions, 340 deletions
diff --git a/gr-utils/src/python/Makefile.am b/gr-utils/src/python/Makefile.am
index 9c4e222c8..450032266 100644
--- a/gr-utils/src/python/Makefile.am
+++ b/gr-utils/src/python/Makefile.am
@@ -21,7 +21,7 @@
include $(top_srcdir)/Makefile.common
-EXTRA_DIST = \
+EXTRA_DIST += \
$(bin_SCRIPTS) \
README.plot \
pyqt_plot.ui \
diff --git a/gr-utils/src/python/gr_filter_design.py b/gr-utils/src/python/gr_filter_design.py
index bf83cf69f..e8703db4f 100755
--- a/gr-utils/src/python/gr_filter_design.py
+++ b/gr-utils/src/python/gr_filter_design.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
-import sys, os
+import sys, os, re, csv
from optparse import OptionParser
from gnuradio import gr, blks2, eng_notation
@@ -24,7 +24,7 @@ except ImportError:
raise SystemExit, 1
try:
- from pyqt_filter import Ui_MainWindow
+ from gnuradio.pyqt_filter import Ui_MainWindow
except ImportError:
print "Could not import from pyqt_filter. Please build with \"pyuic4 pyqt_filter.ui -o pyqt_filter.py\""
raise SystemExit, 1
@@ -36,6 +36,14 @@ class gr_plot_filter(QtGui.QMainWindow):
self.gui = Ui_MainWindow()
self.gui.setupUi(self)
+ self.connect(self.gui.action_save,
+ Qt.SIGNAL("activated()"),
+ self.action_save_dialog)
+ self.connect(self.gui.action_open,
+ Qt.SIGNAL("activated()"),
+ self.action_open_dialog)
+
+
self.connect(self.gui.filterTypeComboBox,
Qt.SIGNAL("currentIndexChanged(const QString&)"),
self.changed_filter_type)
@@ -182,7 +190,7 @@ class gr_plot_filter(QtGui.QMainWindow):
"Rectangular Window" : gr.firdes.WIN_RECTANGULAR,
"Kaiser Window" : gr.firdes.WIN_KAISER,
"Blackman-harris Window" : gr.firdes.WIN_BLACKMAN_hARRIS}
-
+ self.EQUIRIPPLE_FILT = 6 # const for equiripple filter window types
self.show()
def changed_filter_type(self, ftype):
@@ -295,7 +303,7 @@ class gr_plot_filter(QtGui.QMainWindow):
"Complex Band Pass" : self.design_opt_cbpf,
"Band Notch" : self.design_opt_bnf,
"High Pass" : self.design_opt_hpf}
- taps,r = designer[ftype](fs, gain)
+ taps,params,r = designer[ftype](fs, gain)
else:
designer = {"Low Pass" : self.design_win_lpf,
@@ -306,17 +314,10 @@ class gr_plot_filter(QtGui.QMainWindow):
"Root Raised Cosine" : self.design_win_rrc,
"Gaussian" : self.design_win_gaus}
wintype = self.filterWindows[winstr]
- taps,r = designer[ftype](fs, gain, wintype)
+ taps,params,r = designer[ftype](fs, gain, wintype)
if(r):
- self.taps = scipy.array(taps)
- self.get_fft(fs, self.taps, self.nfftpts)
- self.update_time_curves()
- self.update_freq_curves()
- self.update_phase_curves()
- self.update_group_curves()
-
- self.gui.nTapsEdit.setText(Qt.QString("%1").arg(self.taps.size))
+ self.draw_plots(taps, params)
# Filter design functions using a window
@@ -334,9 +335,12 @@ class gr_plot_filter(QtGui.QMainWindow):
taps = gr.firdes.low_pass_2(gain, fs, pb, tb,
atten, wintype)
- return (taps, ret)
+ params = {"fs": fs, "gain": gain, "wintype": wintype,
+ "filttype": "lpf", "pbend": pb, "sbstart": sb,
+ "atten": atten, "ntaps": len(taps)}
+ return (taps, params, ret)
else:
- return ([], ret)
+ return ([], [], ret)
def design_win_bpf(self, fs, gain, wintype):
ret = True
@@ -352,9 +356,12 @@ class gr_plot_filter(QtGui.QMainWindow):
if(r):
taps = gr.firdes.band_pass_2(gain, fs, pb1, pb2, tb,
atten, wintype)
- return (taps,r)
+ params = {"fs": fs, "gain": gain, "wintype": wintype,
+ "filttype": "bpf", "pbstart": pb1, "pbend": pb2,
+ "tb": tb, "atten": atten, "ntaps": len(taps)}
+ return (taps,params,r)
else:
- return ([],r)
+ return ([],[],r)
def design_win_cbpf(self, fs, gain, wintype):
ret = True
@@ -370,9 +377,12 @@ class gr_plot_filter(QtGui.QMainWindow):
if(r):
taps = gr.firdes.complex_band_pass_2(gain, fs, pb1, pb2, tb,
atten, wintype)
- return (taps,r)
+ params = {"fs": fs, "gain": gain, "wintype": wintype,
+ "filttype": "cbpf", "pbstart": pb1, "pbend": pb2,
+ "tb": tb, "atten": atten, "ntaps": len(taps)}
+ return (taps,params,r)
else:
- return ([],r)
+ return ([],[],r)
def design_win_bnf(self, fs, gain, wintype):
ret = True
@@ -388,9 +398,12 @@ class gr_plot_filter(QtGui.QMainWindow):
if(r):
taps = gr.firdes.band_reject_2(gain, fs, pb1, pb2, tb,
atten, wintype)
- return (taps,r)
+ params = {"fs": fs, "gain": gain, "wintype": wintype,
+ "filttype": "bnf", "sbstart": pb1, "sbend": pb2,
+ "tb": tb, "atten": atten, "ntaps": len(taps)}
+ return (taps,params,r)
else:
- return ([],r)
+ return ([],[],r)
def design_win_hpf(self, fs, gain, wintype):
ret = True
@@ -405,9 +418,12 @@ class gr_plot_filter(QtGui.QMainWindow):
tb = pb - sb
taps = gr.firdes.high_pass_2(gain, fs, pb, tb,
atten, wintype)
- return (taps,r)
+ params = {"fs": fs, "gain": gain, "wintype": wintype,
+ "filttype": "hpf", "sbend": sb, "pbstart": pb,
+ "atten": atten, "ntaps": len(taps)}
+ return (taps,params,r)
else:
- return ([],r)
+ return ([],[],r)
def design_win_rrc(self, fs, gain, wintype):
ret = True
@@ -421,9 +437,12 @@ class gr_plot_filter(QtGui.QMainWindow):
if(r):
taps = gr.firdes.root_raised_cosine(gain, fs, sr,
alpha, ntaps)
- return (taps,r)
+ params = {"fs": fs, "gain": gain, "wintype": wintype,
+ "filttype": "rrc", "srate": sr, "alpha": alpha,
+ "ntaps": ntaps}
+ return (taps,params,r)
else:
- return ([],r)
+ return ([],[],r)
def design_win_gaus(self, fs, gain, wintype):
ret = True
@@ -437,9 +456,12 @@ class gr_plot_filter(QtGui.QMainWindow):
if(r):
spb = fs / sr
taps = gr.firdes.gaussian(gain, spb, bt, ntaps)
- return (taps,r)
+ params = {"fs": fs, "gain": gain, "wintype": wintype,
+ "filttype": "gaus", "srate": sr, "bt": bt,
+ "ntaps": ntaps}
+ return (taps,params,r)
else:
- return ([],r)
+ return ([],[],r)
# Design Functions for Equiripple Filters
def design_opt_lpf(self, fs, gain):
@@ -454,11 +476,20 @@ class gr_plot_filter(QtGui.QMainWindow):
ret = r and ret
if(ret):
- taps = blks2.optfir.low_pass(gain, fs, pb, sb,
- ripple, atten)
- return (taps, ret)
+ try:
+ taps = blks2.optfir.low_pass(gain, fs, pb, sb,
+ ripple, atten)
+ except RuntimeError, e:
+ reply = QtGui.QMessageBox.information(self, "Filter did not converge",
+ e.args[0], "&Ok")
+ return ([],[],False)
+ else:
+ params = {"fs": fs, "gain": gain, "wintype": self.EQUIRIPPLE_FILT,
+ "filttype": "lpf", "pbend": pb, "sbstart": sb,
+ "atten": atten, "ripple": ripple, "ntaps": len(taps)}
+ return (taps, params, ret)
else:
- return ([], ret)
+ return ([], [], ret)
def design_opt_bpf(self, fs, gain):
ret = True
@@ -476,11 +507,22 @@ class gr_plot_filter(QtGui.QMainWindow):
if(r):
sb1 = pb1 - tb
sb2 = pb2 + tb
- taps = blks2.optfir.band_pass(gain, fs, sb1, pb1, pb2, sb2,
- ripple, atten)
- return (taps,r)
+ try:
+ taps = blks2.optfir.band_pass(gain, fs, sb1, pb1, pb2, sb2,
+ ripple, atten)
+ except RuntimeError, e:
+ reply = QtGui.QMessageBox.information(self, "Filter did not converge",
+ e.args[0], "&Ok")
+ return ([],[],False)
+
+ else:
+ params = {"fs": fs, "gain": gain, "wintype": self.EQUIRIPPLE_FILT,
+ "filttype": "bpf", "pbstart": pb1, "pbend": pb2,
+ "tb": tb, "atten": atten, "ripple": ripple,
+ "ntaps": len(taps)}
+ return (taps,params,r)
else:
- return ([],r)
+ return ([],[],r)
def design_opt_cbpf(self, fs, gain):
ret = True
@@ -498,11 +540,21 @@ class gr_plot_filter(QtGui.QMainWindow):
if(r):
sb1 = pb1 - tb
sb2 = pb2 + tb
- taps = blks2.optfir.complex_band_pass(gain, fs, sb1, pb1, pb2, sb2,
- ripple, atten)
- return (taps,r)
+ try:
+ taps = blks2.optfir.complex_band_pass(gain, fs, sb1, pb1, pb2, sb2,
+ ripple, atten)
+ except RuntimeError, e:
+ reply = QtGui.QMessageBox.information(self, "Filter did not converge",
+ e.args[0], "&Ok")
+ return ([],[],False)
+ else:
+ params = {"fs": fs, "gain": gain, "wintype": self.EQUIRIPPLE_FILT,
+ "filttype": "cbpf", "pbstart": pb1, "pbend": pb2,
+ "tb": tb, "atten": atten, "ripple": ripple,
+ "ntaps": len(taps)}
+ return (taps,params,r)
else:
- return ([],r)
+ return ([],[],r)
def design_opt_bnf(self, fs, gain):
ret = True
@@ -520,11 +572,21 @@ class gr_plot_filter(QtGui.QMainWindow):
if(r):
pb1 = sb1 - tb
pb2 = sb2 + tb
- taps = blks2.optfir.band_reject(gain, fs, pb1, sb1, sb2, pb2,
- ripple, atten)
- return (taps,r)
+ try:
+ taps = blks2.optfir.band_reject(gain, fs, pb1, sb1, sb2, pb2,
+ ripple, atten)
+ except RuntimeError, e:
+ reply = QtGui.QMessageBox.information(self, "Filter did not converge",
+ e.args[0], "&Ok")
+ return ([],[],False)
+ else:
+ params = {"fs": fs, "gain": gain, "wintype": self.EQUIRIPPLE_FILT,
+ "filttype": "bnf", "sbstart": pb1, "sbend": pb2,
+ "tb": tb, "atten": atten, "ripple": ripple,
+ "ntaps": len(taps)}
+ return (taps,params,r)
else:
- return ([],r)
+ return ([],[],r)
def design_opt_hpf(self, fs, gain):
ret = True
@@ -538,11 +600,21 @@ class gr_plot_filter(QtGui.QMainWindow):
ret = r and ret
if(r):
- taps = blks2.optfir.high_pass(gain, fs, sb, pb,
- atten, ripple)
- return (taps,r)
+ try:
+ taps = blks2.optfir.high_pass(gain, fs, sb, pb,
+ atten, ripple)
+ except RuntimeError, e:
+ reply = QtGui.QMessageBox.information(self, "Filter did not converge",
+ e.args[0], "&Ok")
+ return ([],[],False)
+ else:
+ params = {"fs": fs, "gain": gain, "wintype": self.EQUIRIPPLE_FILT,
+ "filttype": "hpf", "sbend": sb, "pbstart": pb,
+ "atten": atten, "ripple": ripple,
+ "ntaps": len(taps)}
+ return (taps,params,r)
else:
- return ([],r)
+ return ([],[],r)
def nfft_edit_changed(self, nfft):
infft,r = nfft.toInt()
@@ -651,6 +723,135 @@ class gr_plot_filter(QtGui.QMainWindow):
self.gui.groupPlot.replot()
+ def action_save_dialog(self):
+ filename = QtGui.QFileDialog.getSaveFileName(self, "Save CSV Filter File", ".", "")
+ try:
+ handle = open(filename, "wb")
+ except IOError:
+ reply = QtGui.QMessageBox.information(self, 'File Name',
+ ("Could not save to file: %s" % filename),
+ "&Ok")
+ return
+
+ csvhandle = csv.writer(handle, delimiter=",")
+ for k in self.params.keys():
+ csvhandle.writerow([k, self.params[k]])
+ csvhandle.writerow(["taps",] + self.taps.tolist())
+ handle.close()
+
+ def action_open_dialog(self):
+ filename = QtGui.QFileDialog.getOpenFileName(self, "Open CSV Filter File", ".", "")
+ if(len(filename) == 0):
+ return
+
+ try:
+ handle = open(filename, "rb")
+ except IOError:
+ reply = QtGui.QMessageBox.information(self, 'File Name',
+ ("Could not open file: %s" % filename),
+ "&Ok")
+ return
+
+ csvhandle = csv.reader(handle, delimiter=",")
+ taps = []
+ params = {}
+ for row in csvhandle:
+ if(row[0] != "taps"):
+ testcpx = re.findall("[+-]?\d+\.*\d*[Ee]?[-+]?\d+j", row[1])
+ if(len(testcpx) > 0): # it's a complex
+ params[row[0]] = complex(row[1])
+ else: # assume it's a float
+ try: # if it's not a float, its a string
+ params[row[0]] = float(row[1])
+ except ValueError:
+ params[row[0]] = row[1]
+ else:
+ testcpx = re.findall("[+-]?\d+\.*\d*[Ee]?[-+]?\d+j", row[1])
+ if(len(testcpx) > 0): # it's a complex
+ taps = [complex(r) for r in row[1:]]
+ else:
+ taps = [float(r) for r in row[1:]]
+ handle.close()
+ self.draw_plots(taps, params)
+
+ self.gui.sampleRateEdit.setText(Qt.QString("%1").arg(params["fs"]))
+ self.gui.filterGainEdit.setText(Qt.QString("%1").arg(params["gain"]))
+
+ # Set up GUI parameters for each filter type
+ if(params["filttype"] == "lpf"):
+ self.gui.filterTypeComboBox.setCurrentIndex(0)
+ self.gui.filterDesignTypeComboBox.setCurrentIndex(int(params["wintype"]))
+
+ self.gui.endofLpfPassBandEdit.setText(Qt.QString("%1").arg(params["pbend"]))
+ self.gui.startofLpfStopBandEdit.setText(Qt.QString("%1").arg(params["sbstart"]))
+ self.gui.lpfStopBandAttenEdit.setText(Qt.QString("%1").arg(params["atten"]))
+ if(params["wintype"] == self.EQUIRIPPLE_FILT):
+ self.gui.lpfPassBandRippleEdit.setText(Qt.QString("%1").arg(params["ripple"]))
+ elif(params["filttype"] == "bpf"):
+ self.gui.filterTypeComboBox.setCurrentIndex(1)
+ self.gui.filterDesignTypeComboBox.setCurrentIndex(int(params["wintype"]))
+
+ self.gui.startofBpfPassBandEdit.setText(Qt.QString("%1").arg(params["pbstart"]))
+ self.gui.endofBpfPassBandEdit.setText(Qt.QString("%1").arg(params["pbend"]))
+ self.gui.bpfTransitionEdit.setText(Qt.QString("%1").arg(params["tb"]))
+ self.gui.bpfStopBandAttenEdit.setText(Qt.QString("%1").arg(params["atten"]))
+ if(params["wintype"] == self.EQUIRIPPLE_FILT):
+ self.gui.bpfPassBandRippleEdit.setText(Qt.QString("%1").arg(params["ripple"]))
+ elif(params["filttype"] == "cbpf"):
+ self.gui.filterTypeComboBox.setCurrentIndex(2)
+ self.gui.filterDesignTypeComboBox.setCurrentIndex(int(params["wintype"]))
+
+ self.gui.startofBpfPassBandEdit.setText(Qt.QString("%1").arg(params["pbstart"]))
+ self.gui.endofBpfPassBandEdit.setText(Qt.QString("%1").arg(params["pbend"]))
+ self.gui.bpfTransitionEdit.setText(Qt.QString("%1").arg(params["tb"]))
+ self.gui.bpfStopBandAttenEdit.setText(Qt.QString("%1").arg(params["atten"]))
+ if(params["wintype"] == self.EQUIRIPPLE_FILT):
+ self.gui.bpfPassBandRippleEdit.setText(Qt.QString("%1").arg(params["ripple"]))
+ elif(params["filttype"] == "bnf"):
+ self.gui.filterTypeComboBox.setCurrentIndex(3)
+ self.gui.filterDesignTypeComboBox.setCurrentIndex(int(params["wintype"]))
+
+ self.gui.startofBnfStopBandEdit.setText(Qt.QString("%1").arg(params["sbstart"]))
+ self.gui.endofBnfStopBandEdit.setText(Qt.QString("%1").arg(params["sbend"]))
+ self.gui.bnfTransitionEdit.setText(Qt.QString("%1").arg(params["tb"]))
+ self.gui.bnfStopBandAttenEdit.setText(Qt.QString("%1").arg(params["atten"]))
+ if(params["wintype"] == self.EQUIRIPPLE_FILT):
+ self.gui.bnfPassBandRippleEdit.setText(Qt.QString("%1").arg(params["ripple"]))
+ elif(params["filttype"] == "hpf"):
+ self.gui.filterTypeComboBox.setCurrentIndex(4)
+ self.gui.filterDesignTypeComboBox.setCurrentIndex(int(params["wintype"]))
+
+ self.gui.endofHpfStopBandEdit.setText(Qt.QString("%1").arg(params["sbend"]))
+ self.gui.startofHpfPassBandEdit.setText(Qt.QString("%1").arg(params["pbstart"]))
+ self.gui.hpfStopBandAttenEdit.setText(Qt.QString("%1").arg(params["atten"]))
+ if(params["wintype"] == self.EQUIRIPPLE_FILT):
+ self.gui.hpfPassBandRippleEdit.setText(Qt.QString("%1").arg(params["ripple"]))
+ elif(params["filttype"] == "rrc"):
+ self.gui.filterTypeComboBox.setCurrentIndex(5)
+ self.gui.filterDesignTypeComboBox.setCurrentIndex(int(params["wintype"]))
+
+ self.gui.rrcSymbolRateEdit.setText(Qt.QString("%1").arg(params["srate"]))
+ self.gui.rrcAlphaEdit.setText(Qt.QString("%1").arg(params["alpha"]))
+ self.gui.rrcNumTapsEdit.setText(Qt.QString("%1").arg(params["ntaps"]))
+ elif(params["filttype"] == "gaus"):
+ self.gui.filterTypeComboBox.setCurrentIndex(6)
+ self.gui.filterDesignTypeComboBox.setCurrentIndex(int(params["wintype"]))
+
+ self.gui.gausSymbolRateEdit.setText(Qt.QString("%1").arg(params["srate"]))
+ self.gui.gausBTEdit.setText(Qt.QString("%1").arg(params["bt"]))
+ self.gui.gausNumTapsEdit.setText(Qt.QString("%1").arg(params["ntaps"]))
+
+ def draw_plots(self, taps, params):
+ self.params = params
+ self.taps = scipy.array(taps)
+ self.get_fft(self.params["fs"], self.taps, self.nfftpts)
+ self.update_time_curves()
+ self.update_freq_curves()
+ self.update_phase_curves()
+ self.update_group_curves()
+
+ self.gui.nTapsEdit.setText(Qt.QString("%1").arg(self.taps.size))
+
def setup_options():
usage="%prog: [options] (input_filename)"
diff --git a/gr-utils/src/python/gr_plot_psd.py b/gr-utils/src/python/gr_plot_psd.py
index e88995b72..3dab0535a 100755
--- a/gr-utils/src/python/gr_plot_psd.py
+++ b/gr-utils/src/python/gr_plot_psd.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright 2007,2008,2011 Free Software Foundation, Inc.
+# Copyright 2007,2008,2010,2011 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -35,6 +35,7 @@ except ImportError:
from optparse import OptionParser
from scipy import log10
+from gnuradio.eng_option import eng_option
class gr_plot_psd:
def __init__(self, datatype, filename, options):
@@ -92,21 +93,29 @@ class gr_plot_psd:
self.iq = scipy.fromfile(self.hfile, dtype=self.datatype, count=self.block_length)
except MemoryError:
print "End of File"
+ return False
else:
- tstep = 1.0 / self.sample_rate
- #self.time = scipy.array([tstep*(self.position + i) for i in xrange(len(self.iq))])
- self.time = scipy.array([tstep*(i) for i in xrange(len(self.iq))])
-
- self.iq_psd, self.freq = self.dopsd(self.iq)
+ # retesting length here as newer version of scipy does not throw a MemoryError, just
+ # returns a zero-length array
+ if(len(self.iq) > 0):
+ tstep = 1.0 / self.sample_rate
+ #self.time = scipy.array([tstep*(self.position + i) for i in xrange(len(self.iq))])
+ self.time = scipy.array([tstep*(i) for i in xrange(len(self.iq))])
+
+ self.iq_psd, self.freq = self.dopsd(self.iq)
+ return True
+ else:
+ print "End of File"
+ return False
def dopsd(self, iq):
''' Need to do this here and plot later so we can do the fftshift '''
overlap = self.psdfftsize/4
winfunc = scipy.blackman
- psd,freq = self.sp_psd.psd(iq, self.psdfftsize, self.sample_rate,
- window = lambda d: d*winfunc(self.psdfftsize),
- noverlap = overlap, visible=False)
- psd = 10.0*log10(abs(fftpack.fftshift(psd)))
+ psd,freq = mlab.psd(iq, self.psdfftsize, self.sample_rate,
+ window = lambda d: d*winfunc(self.psdfftsize),
+ noverlap = overlap)
+ psd = 10.0*log10(abs(psd))
return (psd, freq)
def make_plots(self):
@@ -129,7 +138,7 @@ class gr_plot_psd:
self.sp_psd.set_xlabel("Frequency (Hz)", fontsize=self.label_font_size, fontweight="bold")
self.sp_psd.set_ylabel("Power Spectrum (dBm)", fontsize=self.label_font_size, fontweight="bold")
- self.get_data()
+ r = self.get_data()
self.plot_iq = self.sp_iq.plot([], 'bo-') # make plot for reals
self.plot_iq += self.sp_iq.plot([], 'ro-') # make plot for imags
@@ -192,8 +201,8 @@ class gr_plot_psd:
xmin = max(0, int(ceil(self.sample_rate*(newxlim[0]))))
xmax = min(int(ceil(self.sample_rate*(newxlim[1]))), len(self.iq))
- iq = self.iq[xmin : xmax]
- time = self.time[xmin : xmax]
+ iq = scipy.array(self.iq[xmin : xmax])
+ time = scipy.array(self.time[xmin : xmax])
iq_psd, freq = self.dopsd(iq)
@@ -219,8 +228,9 @@ class gr_plot_psd:
self.step_forward()
def step_forward(self):
- self.get_data()
- self.update_plots()
+ r = self.get_data()
+ if(r):
+ self.update_plots()
def step_backward(self):
# Step back in file position
@@ -228,8 +238,9 @@ class gr_plot_psd:
self.hfile.seek(-2*self.sizeof_data*self.block_length, 1)
else:
self.hfile.seek(-self.hfile.tell(),1)
- self.get_data()
- self.update_plots()
+ r = self.get_data()
+ if(r):
+ self.update_plots()
def find(item_in, list_search):
try:
@@ -241,14 +252,15 @@ def setup_options():
usage="%prog: [options] input_filename"
description = "Takes a GNU Radio binary file (with specified data type using --data-type) and displays the I&Q data versus time as well as the power spectral density (PSD) plot. The y-axis values are plotted assuming volts as the amplitude of the I&Q streams and converted into dBm in the frequency domain (the 1/N power adjustment out of the FFT is performed internally). The script plots a certain block of data at a time, specified on the command line as -B or --block. The start position in the file can be set by specifying -s or --start and defaults to 0 (the start of the file). By default, the system assumes a sample rate of 1, so in time, each sample is plotted versus the sample number. To set a true time and frequency axis, set the sample rate (-R or --sample-rate) to the sample rate used when capturing the samples. Finally, the size of the FFT to use for the PSD and spectrogram plots can be set independently with --psd-size and --spec-size, respectively. The spectrogram plot does not display by default and is turned on with -S or --enable-spec."
- parser = OptionParser(conflict_handler="resolve", usage=usage, description=description)
+ parser = OptionParser(option_class=eng_option, conflict_handler="resolve",
+ usage=usage, description=description)
parser.add_option("-d", "--data-type", type="string", default="complex64",
help="Specify the data type (complex64, float32, (u)int32, (u)int16, (u)int8) [default=%default]")
parser.add_option("-B", "--block", type="int", default=8192,
help="Specify the block size [default=%default]")
parser.add_option("-s", "--start", type="int", default=0,
help="Specify where to start in the file [default=%default]")
- parser.add_option("-R", "--sample-rate", type="float", default=1.0,
+ parser.add_option("-R", "--sample-rate", type="eng_float", default=1.0,
help="Set the sampler rate of the data [default=%default]")
parser.add_option("", "--psd-size", type="int", default=1024,
help="Set the size of the PSD FFT [default=%default]")
diff --git a/gr-utils/src/python/pyqt_filter.py b/gr-utils/src/python/pyqt_filter.py
index 12ad183b0..0c781f234 100644
--- a/gr-utils/src/python/pyqt_filter.py
+++ b/gr-utils/src/python/pyqt_filter.py
@@ -2,8 +2,8 @@
# Form implementation generated from reading ui file 'pyqt_filter.ui'
#
-# Created: Tue Aug 25 11:13:57 2009
-# by: PyQt4 UI code generator 4.4.3
+# Created: Thu Mar 17 10:51:17 2011
+# by: PyQt4 UI code generator 4.7.4
#
# WARNING! All changes made in this file will be lost!
@@ -27,23 +27,23 @@ class Ui_MainWindow(object):
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.filterTypeComboBox.addItem("")
+ self.filterTypeComboBox.addItem("")
+ self.filterTypeComboBox.addItem("")
+ self.filterTypeComboBox.addItem("")
+ self.filterTypeComboBox.addItem("")
+ self.filterTypeComboBox.addItem("")
+ self.filterTypeComboBox.addItem("")
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.filterDesignTypeComboBox.addItem(QtCore.QString())
- self.filterDesignTypeComboBox.addItem(QtCore.QString())
- self.filterDesignTypeComboBox.addItem(QtCore.QString())
- self.filterDesignTypeComboBox.addItem(QtCore.QString())
- self.filterDesignTypeComboBox.addItem(QtCore.QString())
+ self.filterDesignTypeComboBox.addItem("")
+ self.filterDesignTypeComboBox.addItem("")
+ self.filterDesignTypeComboBox.addItem("")
+ self.filterDesignTypeComboBox.addItem("")
+ self.filterDesignTypeComboBox.addItem("")
+ self.filterDesignTypeComboBox.addItem("")
+ self.filterDesignTypeComboBox.addItem("")
self.verticalLayout.addWidget(self.filterDesignTypeComboBox)
self.globalParamsLayout = QtGui.QFormLayout()
self.globalParamsLayout.setFieldGrowthPolicy(QtGui.QFormLayout.AllNonFixedFieldsGrow)
@@ -255,6 +255,7 @@ class Ui_MainWindow(object):
self.nTapsEdit.setMaximumSize(QtCore.QSize(100, 16777215))
self.nTapsEdit.setFrameShape(QtGui.QFrame.Box)
self.nTapsEdit.setFrameShadow(QtGui.QFrame.Raised)
+ self.nTapsEdit.setText("")
self.nTapsEdit.setObjectName("nTapsEdit")
self.formLayout_8.setWidget(1, QtGui.QFormLayout.FieldRole, self.nTapsEdit)
self.verticalLayout.addWidget(self.filterPropsBox)
@@ -285,7 +286,7 @@ class Ui_MainWindow(object):
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 = QwtPlot(self.freqTab)
self.freqPlot.setObjectName("freqPlot")
self.horizontalLayout_2.addWidget(self.freqPlot)
self.tabGroup.addTab(self.freqTab, "")
@@ -293,7 +294,7 @@ class Ui_MainWindow(object):
self.timeTab.setObjectName("timeTab")
self.horizontalLayout = QtGui.QHBoxLayout(self.timeTab)
self.horizontalLayout.setObjectName("horizontalLayout")
- self.timePlot = Qwt5.QwtPlot(self.timeTab)
+ self.timePlot = QwtPlot(self.timeTab)
self.timePlot.setObjectName("timePlot")
self.horizontalLayout.addWidget(self.timePlot)
self.tabGroup.addTab(self.timeTab, "")
@@ -301,7 +302,7 @@ class Ui_MainWindow(object):
self.phaseTab.setObjectName("phaseTab")
self.horizontalLayout_3 = QtGui.QHBoxLayout(self.phaseTab)
self.horizontalLayout_3.setObjectName("horizontalLayout_3")
- self.phasePlot = Qwt5.QwtPlot(self.phaseTab)
+ self.phasePlot = QwtPlot(self.phaseTab)
self.phasePlot.setObjectName("phasePlot")
self.horizontalLayout_3.addWidget(self.phasePlot)
self.tabGroup.addTab(self.phaseTab, "")
@@ -309,14 +310,14 @@ class Ui_MainWindow(object):
self.groupTab.setObjectName("groupTab")
self.horizontalLayout_4 = QtGui.QHBoxLayout(self.groupTab)
self.horizontalLayout_4.setObjectName("horizontalLayout_4")
- self.groupPlot = Qwt5.QwtPlot(self.groupTab)
+ self.groupPlot = QwtPlot(self.groupTab)
self.groupPlot.setObjectName("groupPlot")
self.horizontalLayout_4.addWidget(self.groupPlot)
self.tabGroup.addTab(self.groupTab, "")
self.gridLayout.addWidget(self.tabGroup, 1, 1, 1, 1)
MainWindow.setCentralWidget(self.centralwidget)
self.menubar = QtGui.QMenuBar(MainWindow)
- self.menubar.setGeometry(QtCore.QRect(0, 0, 1124, 24))
+ self.menubar.setGeometry(QtCore.QRect(0, 0, 1124, 27))
self.menubar.setObjectName("menubar")
self.menu_File = QtGui.QMenu(self.menubar)
self.menu_File.setObjectName("menu_File")
@@ -324,15 +325,19 @@ class Ui_MainWindow(object):
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.action_save = QtGui.QAction(MainWindow)
+ self.action_save.setObjectName("action_save")
+ self.action_open = QtGui.QAction(MainWindow)
+ self.action_open.setObjectName("action_open")
+ self.menu_File.addAction(self.action_open)
+ self.menu_File.addAction(self.action_save)
self.menu_File.addAction(self.action_exit)
self.menubar.addAction(self.menu_File.menuAction())
self.retranslateUi(MainWindow)
- self.filterTypeWidget.setCurrentIndex(0)
+ self.filterTypeWidget.setCurrentIndex(5)
self.tabGroup.setCurrentIndex(0)
QtCore.QObject.connect(self.action_exit, QtCore.SIGNAL("activated()"), MainWindow.close)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
@@ -419,8 +424,12 @@ class Ui_MainWindow(object):
self.tabGroup.setTabText(self.tabGroup.indexOf(self.phaseTab), QtGui.QApplication.translate("MainWindow", "Phase", None, QtGui.QApplication.UnicodeUTF8))
self.tabGroup.setTabText(self.tabGroup.indexOf(self.groupTab), QtGui.QApplication.translate("MainWindow", "Group Delay", None, QtGui.QApplication.UnicodeUTF8))
self.menu_File.setTitle(QtGui.QApplication.translate("MainWindow", "&File", None, QtGui.QApplication.UnicodeUTF8))
+ self.action_exit.setText(QtGui.QApplication.translate("MainWindow", "E&xit", None, QtGui.QApplication.UnicodeUTF8))
+ self.action_save.setText(QtGui.QApplication.translate("MainWindow", "&Save", None, QtGui.QApplication.UnicodeUTF8))
+ self.action_save.setShortcut(QtGui.QApplication.translate("MainWindow", "Ctrl+S", 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
+#from qwt_plot import QwtPlot
+from PyQt4.Qwt5 import QwtPlot
+
diff --git a/gr-utils/src/python/pyqt_filter.ui b/gr-utils/src/python/pyqt_filter.ui
index 9b31112e8..9853352e2 100644
--- a/gr-utils/src/python/pyqt_filter.ui
+++ b/gr-utils/src/python/pyqt_filter.ui
@@ -1,7 +1,8 @@
-<ui version="4.0" >
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
<class>MainWindow</class>
- <widget class="QMainWindow" name="MainWindow" >
- <property name="geometry" >
+ <widget class="QMainWindow" name="MainWindow">
+ <property name="geometry">
<rect>
<x>0</x>
<y>0</y>
@@ -9,131 +10,131 @@
<height>696</height>
</rect>
</property>
- <property name="windowTitle" >
+ <property name="windowTitle">
<string>GNU Radio Filter Design Tool</string>
</property>
- <widget class="QWidget" name="centralwidget" >
- <layout class="QGridLayout" name="gridLayout" >
- <item row="1" column="0" >
- <widget class="QFrame" name="filterFrame" >
- <property name="minimumSize" >
+ <widget class="QWidget" name="centralwidget">
+ <layout class="QGridLayout" name="gridLayout">
+ <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" >
+ <property name="maximumSize">
<size>
<width>300</width>
<height>16777215</height>
</size>
</property>
- <property name="frameShape" >
+ <property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
- <property name="frameShadow" >
+ <property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
- <layout class="QVBoxLayout" name="verticalLayout" >
+ <layout class="QVBoxLayout" name="verticalLayout">
<item>
- <widget class="QComboBox" name="filterTypeComboBox" >
+ <widget class="QComboBox" name="filterTypeComboBox">
<item>
- <property name="text" >
+ <property name="text">
<string>Low Pass</string>
</property>
</item>
<item>
- <property name="text" >
+ <property name="text">
<string>Band Pass</string>
</property>
</item>
<item>
- <property name="text" >
+ <property name="text">
<string>Complex Band Pass</string>
</property>
</item>
<item>
- <property name="text" >
+ <property name="text">
<string>Band Notch</string>
</property>
</item>
<item>
- <property name="text" >
+ <property name="text">
<string>High Pass</string>
</property>
</item>
<item>
- <property name="text" >
+ <property name="text">
<string>Root Raised Cosine</string>
</property>
</item>
<item>
- <property name="text" >
+ <property name="text">
<string>Gaussian</string>
</property>
</item>
</widget>
</item>
<item>
- <widget class="QComboBox" name="filterDesignTypeComboBox" >
+ <widget class="QComboBox" name="filterDesignTypeComboBox">
<item>
- <property name="text" >
+ <property name="text">
<string>Hamming Window</string>
</property>
</item>
<item>
- <property name="text" >
+ <property name="text">
<string>Hann Window</string>
</property>
</item>
<item>
- <property name="text" >
+ <property name="text">
<string>Blackman Window</string>
</property>
</item>
<item>
- <property name="text" >
+ <property name="text">
<string>Rectangular Window</string>
</property>
</item>
<item>
- <property name="text" >
+ <property name="text">
<string>Kaiser Window</string>
</property>
</item>
<item>
- <property name="text" >
+ <property name="text">
<string>Blackman-harris Window</string>
</property>
</item>
<item>
- <property name="text" >
+ <property name="text">
<string>Equiripple</string>
</property>
</item>
</widget>
</item>
<item>
- <layout class="QFormLayout" name="globalParamsLayout" >
- <property name="fieldGrowthPolicy" >
+ <layout class="QFormLayout" name="globalParamsLayout">
+ <property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
- <item row="0" column="0" >
- <widget class="QLabel" name="sampleRateLabel" >
- <property name="maximumSize" >
+ <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" >
+ <property name="text">
<string>Sample Rate (sps)</string>
</property>
</widget>
</item>
- <item row="0" column="1" >
- <widget class="QLineEdit" name="sampleRateEdit" >
- <property name="maximumSize" >
+ <item row="0" column="1">
+ <widget class="QLineEdit" name="sampleRateEdit">
+ <property name="maximumSize">
<size>
<width>16777215</width>
<height>30</height>
@@ -141,332 +142,332 @@
</property>
</widget>
</item>
- <item row="1" column="0" >
- <widget class="QLabel" name="filterGainLabel" >
- <property name="text" >
+ <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 row="1" column="1">
+ <widget class="QLineEdit" name="filterGainEdit"/>
</item>
</layout>
</item>
<item>
- <widget class="QStackedWidget" name="filterTypeWidget" >
- <property name="currentIndex" >
- <number>0</number>
+ <widget class="QStackedWidget" name="filterTypeWidget">
+ <property name="currentIndex">
+ <number>5</number>
</property>
- <widget class="QWidget" name="firlpfPage" >
- <layout class="QFormLayout" name="formLayout" >
- <item row="0" column="0" >
- <widget class="QLabel" name="endofLpfPassBandLabel" >
- <property name="text" >
+ <widget class="QWidget" name="firlpfPage">
+ <layout class="QFormLayout" name="formLayout">
+ <item row="0" column="0">
+ <widget class="QLabel" name="endofLpfPassBandLabel">
+ <property name="text">
<string>End of Pass Band (Hz)</string>
</property>
</widget>
</item>
- <item row="0" column="1" >
- <widget class="QLineEdit" name="endofLpfPassBandEdit" />
+ <item row="0" column="1">
+ <widget class="QLineEdit" name="endofLpfPassBandEdit"/>
</item>
- <item row="1" column="0" >
- <widget class="QLabel" name="startofLpfStopBandLabel" >
- <property name="text" >
+ <item row="1" column="0">
+ <widget class="QLabel" name="startofLpfStopBandLabel">
+ <property name="text">
<string>Start of Stop Band (Hz)</string>
</property>
</widget>
</item>
- <item row="1" column="1" >
- <widget class="QLineEdit" name="startofLpfStopBandEdit" />
+ <item row="1" column="1">
+ <widget class="QLineEdit" name="startofLpfStopBandEdit"/>
</item>
- <item row="2" column="0" >
- <widget class="QLabel" name="lpfStopBandAttenLabel" >
- <property name="text" >
+ <item row="2" column="0">
+ <widget class="QLabel" name="lpfStopBandAttenLabel">
+ <property name="text">
<string>Stop Band Attenuation (dB)</string>
</property>
</widget>
</item>
- <item row="2" column="1" >
- <widget class="QLineEdit" name="lpfStopBandAttenEdit" />
+ <item row="2" column="1">
+ <widget class="QLineEdit" name="lpfStopBandAttenEdit"/>
</item>
- <item row="3" column="1" >
- <widget class="QLineEdit" name="lpfPassBandRippleEdit" />
+ <item row="3" column="1">
+ <widget class="QLineEdit" name="lpfPassBandRippleEdit"/>
</item>
- <item row="3" column="0" >
- <widget class="QLabel" name="lpfPassBandRippleLabel" >
- <property name="text" >
+ <item row="3" column="0">
+ <widget class="QLabel" name="lpfPassBandRippleLabel">
+ <property name="text">
<string>Pass Band Ripple (dB)</string>
</property>
</widget>
</item>
</layout>
</widget>
- <widget class="QWidget" name="firbpfPage" >
- <layout class="QFormLayout" name="formLayout_2" >
- <item row="0" column="0" >
- <widget class="QLabel" name="startofBpfPassBandLabel" >
- <property name="text" >
+ <widget class="QWidget" name="firbpfPage">
+ <layout class="QFormLayout" name="formLayout_2">
+ <item row="0" column="0">
+ <widget class="QLabel" name="startofBpfPassBandLabel">
+ <property name="text">
<string>Start of Pass Band (Hz)</string>
</property>
</widget>
</item>
- <item row="0" column="1" >
- <widget class="QLineEdit" name="startofBpfPassBandEdit" />
+ <item row="0" column="1">
+ <widget class="QLineEdit" name="startofBpfPassBandEdit"/>
</item>
- <item row="1" column="0" >
- <widget class="QLabel" name="endofBpfPassBandLabel" >
- <property name="text" >
+ <item row="1" column="0">
+ <widget class="QLabel" name="endofBpfPassBandLabel">
+ <property name="text">
<string>End of Pass Band (Hz)</string>
</property>
</widget>
</item>
- <item row="1" column="1" >
- <widget class="QLineEdit" name="endofBpfPassBandEdit" />
+ <item row="1" column="1">
+ <widget class="QLineEdit" name="endofBpfPassBandEdit"/>
</item>
- <item row="3" column="1" >
- <widget class="QLineEdit" name="bpfStopBandAttenEdit" />
+ <item row="3" column="1">
+ <widget class="QLineEdit" name="bpfStopBandAttenEdit"/>
</item>
- <item row="3" column="0" >
- <widget class="QLabel" name="bpfStopBandAttenLabel" >
- <property name="text" >
+ <item row="3" column="0">
+ <widget class="QLabel" name="bpfStopBandAttenLabel">
+ <property name="text">
<string>Stop Band Attenuation (dB)</string>
</property>
</widget>
</item>
- <item row="2" column="0" >
- <widget class="QLabel" name="bpfTransitionLabel" >
- <property name="text" >
+ <item row="2" column="0">
+ <widget class="QLabel" name="bpfTransitionLabel">
+ <property name="text">
<string>Transition Width (Hz)</string>
</property>
</widget>
</item>
- <item row="2" column="1" >
- <widget class="QLineEdit" name="bpfTransitionEdit" />
+ <item row="2" column="1">
+ <widget class="QLineEdit" name="bpfTransitionEdit"/>
</item>
- <item row="4" column="1" >
- <widget class="QLineEdit" name="bpfPassBandRippleEdit" />
+ <item row="4" column="1">
+ <widget class="QLineEdit" name="bpfPassBandRippleEdit"/>
</item>
- <item row="4" column="0" >
- <widget class="QLabel" name="bpfPassBandRippleLabel" >
- <property name="text" >
+ <item row="4" column="0">
+ <widget class="QLabel" name="bpfPassBandRippleLabel">
+ <property name="text">
<string>Pass Band Ripple (dB)</string>
</property>
</widget>
</item>
</layout>
</widget>
- <widget class="QWidget" name="firbnfPage" >
- <layout class="QFormLayout" name="formLayout_5" >
- <property name="fieldGrowthPolicy" >
+ <widget class="QWidget" name="firbnfPage">
+ <layout class="QFormLayout" name="formLayout_5">
+ <property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
- <item row="0" column="0" >
- <widget class="QLabel" name="startofBnfStopBandLabel" >
- <property name="text" >
+ <item row="0" column="0">
+ <widget class="QLabel" name="startofBnfStopBandLabel">
+ <property name="text">
<string>Start of Stop Band (Hz)</string>
</property>
</widget>
</item>
- <item row="0" column="1" >
- <widget class="QLineEdit" name="startofBnfStopBandEdit" />
+ <item row="0" column="1">
+ <widget class="QLineEdit" name="startofBnfStopBandEdit"/>
</item>
- <item row="1" column="0" >
- <widget class="QLabel" name="endofBnfStopBandLabel" >
- <property name="text" >
+ <item row="1" column="0">
+ <widget class="QLabel" name="endofBnfStopBandLabel">
+ <property name="text">
<string>End of Stop Band (Hz)</string>
</property>
</widget>
</item>
- <item row="1" column="1" >
- <widget class="QLineEdit" name="endofBnfStopBandEdit" />
+ <item row="1" column="1">
+ <widget class="QLineEdit" name="endofBnfStopBandEdit"/>
</item>
- <item row="2" column="0" >
- <widget class="QLabel" name="bnfTransitionLabel" >
- <property name="text" >
+ <item row="2" column="0">
+ <widget class="QLabel" name="bnfTransitionLabel">
+ <property name="text">
<string>Transition Width (Hz)</string>
</property>
</widget>
</item>
- <item row="2" column="1" >
- <widget class="QLineEdit" name="bnfTransitionEdit" />
+ <item row="2" column="1">
+ <widget class="QLineEdit" name="bnfTransitionEdit"/>
</item>
- <item row="3" column="0" >
- <widget class="QLabel" name="bnfStopBandAttenLabel" >
- <property name="text" >
+ <item row="3" column="0">
+ <widget class="QLabel" name="bnfStopBandAttenLabel">
+ <property name="text">
<string>Stop Band Attenuation (dB)</string>
</property>
</widget>
</item>
- <item row="3" column="1" >
- <widget class="QLineEdit" name="bnfStopBandAttenEdit" />
+ <item row="3" column="1">
+ <widget class="QLineEdit" name="bnfStopBandAttenEdit"/>
</item>
- <item row="4" column="0" >
- <widget class="QLabel" name="bnfPassBandRippleLabel" >
- <property name="text" >
+ <item row="4" column="0">
+ <widget class="QLabel" name="bnfPassBandRippleLabel">
+ <property name="text">
<string>Pass Band Ripple (dB)</string>
</property>
</widget>
</item>
- <item row="4" column="1" >
- <widget class="QLineEdit" name="bnfPassBandRippleEdit" />
+ <item row="4" column="1">
+ <widget class="QLineEdit" name="bnfPassBandRippleEdit"/>
</item>
</layout>
</widget>
- <widget class="QWidget" name="firhpfPage" >
- <layout class="QFormLayout" name="formLayout_3" >
- <property name="fieldGrowthPolicy" >
+ <widget class="QWidget" name="firhpfPage">
+ <layout class="QFormLayout" name="formLayout_3">
+ <property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
- <item row="0" column="0" >
- <widget class="QLabel" name="endofHpfStopBandLabel" >
- <property name="text" >
+ <item row="0" column="0">
+ <widget class="QLabel" name="endofHpfStopBandLabel">
+ <property name="text">
<string>End of Stop Band (Hz)</string>
</property>
</widget>
</item>
- <item row="0" column="1" >
- <widget class="QLineEdit" name="endofHpfStopBandEdit" />
+ <item row="0" column="1">
+ <widget class="QLineEdit" name="endofHpfStopBandEdit"/>
</item>
- <item row="1" column="0" >
- <widget class="QLabel" name="startofHpfPassBandLabel" >
- <property name="text" >
+ <item row="1" column="0">
+ <widget class="QLabel" name="startofHpfPassBandLabel">
+ <property name="text">
<string>Start of Pass Band (Hz)</string>
</property>
</widget>
</item>
- <item row="1" column="1" >
- <widget class="QLineEdit" name="startofHpfPassBandEdit" />
+ <item row="1" column="1">
+ <widget class="QLineEdit" name="startofHpfPassBandEdit"/>
</item>
- <item row="2" column="0" >
- <widget class="QLabel" name="hpfStopBandAttenLabel" >
- <property name="text" >
+ <item row="2" column="0">
+ <widget class="QLabel" name="hpfStopBandAttenLabel">
+ <property name="text">
<string>Stop Band Attenuation (dB)</string>
</property>
</widget>
</item>
- <item row="2" column="1" >
- <widget class="QLineEdit" name="hpfStopBandAttenEdit" />
+ <item row="2" column="1">
+ <widget class="QLineEdit" name="hpfStopBandAttenEdit"/>
</item>
- <item row="3" column="0" >
- <widget class="QLabel" name="hpfPassBandRippleLabel" >
- <property name="text" >
+ <item row="3" column="0">
+ <widget class="QLabel" name="hpfPassBandRippleLabel">
+ <property name="text">
<string>Pass Band Ripple (dB)</string>
</property>
</widget>
</item>
- <item row="3" column="1" >
- <widget class="QLineEdit" name="hpfPassBandRippleEdit" />
+ <item row="3" column="1">
+ <widget class="QLineEdit" name="hpfPassBandRippleEdit"/>
</item>
</layout>
</widget>
- <widget class="QWidget" name="rrcPage" >
- <layout class="QFormLayout" name="formLayout_6" >
- <item row="0" column="0" >
- <widget class="QLabel" name="rrcSymbolRateLabel" >
- <property name="text" >
+ <widget class="QWidget" name="rrcPage">
+ <layout class="QFormLayout" name="formLayout_6">
+ <item row="0" column="0">
+ <widget class="QLabel" name="rrcSymbolRateLabel">
+ <property name="text">
<string>Symbol Rate (sps)</string>
</property>
</widget>
</item>
- <item row="1" column="0" >
- <widget class="QLabel" name="rrcAlphaLabel" >
- <property name="text" >
+ <item row="1" column="0">
+ <widget class="QLabel" name="rrcAlphaLabel">
+ <property name="text">
<string>Roll-off Factor</string>
</property>
</widget>
</item>
- <item row="2" column="0" >
- <widget class="QLabel" name="rrcNumTapsLabel" >
- <property name="text" >
+ <item row="2" column="0">
+ <widget class="QLabel" name="rrcNumTapsLabel">
+ <property name="text">
<string>Number of Taps</string>
</property>
</widget>
</item>
- <item row="0" column="1" >
- <widget class="QLineEdit" name="rrcSymbolRateEdit" />
+ <item row="0" column="1">
+ <widget class="QLineEdit" name="rrcSymbolRateEdit"/>
</item>
- <item row="1" column="1" >
- <widget class="QLineEdit" name="rrcAlphaEdit" />
+ <item row="1" column="1">
+ <widget class="QLineEdit" name="rrcAlphaEdit"/>
</item>
- <item row="2" column="1" >
- <widget class="QLineEdit" name="rrcNumTapsEdit" />
+ <item row="2" column="1">
+ <widget class="QLineEdit" name="rrcNumTapsEdit"/>
</item>
</layout>
</widget>
- <widget class="QWidget" name="gausPage" >
- <layout class="QFormLayout" name="formLayout_7" >
- <item row="0" column="0" >
- <widget class="QLabel" name="gausSymbolRateLabel" >
- <property name="text" >
+ <widget class="QWidget" name="gausPage">
+ <layout class="QFormLayout" name="formLayout_7">
+ <item row="0" column="0">
+ <widget class="QLabel" name="gausSymbolRateLabel">
+ <property name="text">
<string>Symbol Rate (sps)</string>
</property>
</widget>
</item>
- <item row="0" column="1" >
- <widget class="QLineEdit" name="gausSymbolRateEdit" />
+ <item row="0" column="1">
+ <widget class="QLineEdit" name="gausSymbolRateEdit"/>
</item>
- <item row="1" column="0" >
- <widget class="QLabel" name="gausBTLabel" >
- <property name="text" >
+ <item row="1" column="0">
+ <widget class="QLabel" name="gausBTLabel">
+ <property name="text">
<string>Roll-off Factor</string>
</property>
</widget>
</item>
- <item row="1" column="1" >
- <widget class="QLineEdit" name="gausBTEdit" />
+ <item row="1" column="1">
+ <widget class="QLineEdit" name="gausBTEdit"/>
</item>
- <item row="2" column="0" >
- <widget class="QLabel" name="gausNumTapsLabel" >
- <property name="text" >
+ <item row="2" column="0">
+ <widget class="QLabel" name="gausNumTapsLabel">
+ <property name="text">
<string>Number of Taps</string>
</property>
</widget>
</item>
- <item row="2" column="1" >
- <widget class="QLineEdit" name="gausNumTapsEdit" />
+ <item row="2" column="1">
+ <widget class="QLineEdit" name="gausNumTapsEdit"/>
</item>
</layout>
</widget>
</widget>
</item>
<item>
- <widget class="QGroupBox" name="filterPropsBox" >
- <property name="title" >
+ <widget class="QGroupBox" name="filterPropsBox">
+ <property name="title">
<string>Filter Properties</string>
</property>
- <layout class="QFormLayout" name="formLayout_8" >
- <property name="fieldGrowthPolicy" >
+ <layout class="QFormLayout" name="formLayout_8">
+ <property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
- <item row="1" column="0" >
- <widget class="QLabel" name="nTapsLabel" >
- <property name="minimumSize" >
+ <item row="1" column="0">
+ <widget class="QLabel" name="nTapsLabel">
+ <property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
- <property name="text" >
+ <property name="text">
<string>Number of Taps:</string>
</property>
</widget>
</item>
- <item row="1" column="1" >
- <widget class="QLabel" name="nTapsEdit" >
- <property name="maximumSize" >
+ <item row="1" column="1">
+ <widget class="QLabel" name="nTapsEdit">
+ <property name="maximumSize">
<size>
<width>100</width>
<height>16777215</height>
</size>
</property>
- <property name="frameShape" >
+ <property name="frameShape">
<enum>QFrame::Box</enum>
</property>
- <property name="frameShadow" >
+ <property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
- <property name="text" >
+ <property name="text">
<string/>
</property>
</widget>
@@ -475,23 +476,23 @@
</widget>
</item>
<item>
- <widget class="QGroupBox" name="sysParamsBox" >
- <property name="title" >
+ <widget class="QGroupBox" name="sysParamsBox">
+ <property name="title">
<string>System Parameters</string>
</property>
- <layout class="QFormLayout" name="formLayout_4" >
- <item row="1" column="1" >
- <widget class="QLineEdit" name="nfftEdit" />
+ <layout class="QFormLayout" name="formLayout_4">
+ <item row="1" column="1">
+ <widget class="QLineEdit" name="nfftEdit"/>
</item>
- <item row="1" column="0" >
- <widget class="QLabel" name="nfftLabel" >
- <property name="minimumSize" >
+ <item row="1" column="0">
+ <widget class="QLabel" name="nfftLabel">
+ <property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
- <property name="text" >
+ <property name="text">
<string>Num FFT points</string>
</property>
</widget>
@@ -500,26 +501,26 @@
</widget>
</item>
<item>
- <widget class="QPushButton" name="designButton" >
- <property name="minimumSize" >
+ <widget class="QPushButton" name="designButton">
+ <property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
- <property name="maximumSize" >
+ <property name="maximumSize">
<size>
<width>200</width>
<height>16777215</height>
</size>
</property>
- <property name="text" >
+ <property name="text">
<string>Design</string>
</property>
- <property name="autoDefault" >
+ <property name="autoDefault">
<bool>true</bool>
</property>
- <property name="default" >
+ <property name="default">
<bool>true</bool>
</property>
</widget>
@@ -527,54 +528,54 @@
</layout>
</widget>
</item>
- <item row="1" column="1" >
- <widget class="QTabWidget" name="tabGroup" >
- <property name="minimumSize" >
+ <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" >
+ <property name="currentIndex">
<number>0</number>
</property>
- <widget class="QWidget" name="freqTab" >
- <attribute name="title" >
+ <widget class="QWidget" name="freqTab">
+ <attribute name="title">
<string>Frequency Domain</string>
</attribute>
- <layout class="QHBoxLayout" name="horizontalLayout_2" >
+ <layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
- <widget class="QwtPlot" name="freqPlot" />
+ <widget class="QwtPlot" name="freqPlot"/>
</item>
</layout>
</widget>
- <widget class="QWidget" name="timeTab" >
- <attribute name="title" >
+ <widget class="QWidget" name="timeTab">
+ <attribute name="title">
<string>Time Domain</string>
</attribute>
- <layout class="QHBoxLayout" name="horizontalLayout" >
+ <layout class="QHBoxLayout" name="horizontalLayout">
<item>
- <widget class="QwtPlot" name="timePlot" />
+ <widget class="QwtPlot" name="timePlot"/>
</item>
</layout>
</widget>
- <widget class="QWidget" name="phaseTab" >
- <attribute name="title" >
+ <widget class="QWidget" name="phaseTab">
+ <attribute name="title">
<string>Phase</string>
</attribute>
- <layout class="QHBoxLayout" name="horizontalLayout_3" >
+ <layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
- <widget class="QwtPlot" name="phasePlot" />
+ <widget class="QwtPlot" name="phasePlot"/>
</item>
</layout>
</widget>
- <widget class="QWidget" name="groupTab" >
- <attribute name="title" >
+ <widget class="QWidget" name="groupTab">
+ <attribute name="title">
<string>Group Delay</string>
</attribute>
- <layout class="QHBoxLayout" name="horizontalLayout_4" >
+ <layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
- <widget class="QwtPlot" name="groupPlot" />
+ <widget class="QwtPlot" name="groupPlot"/>
</item>
</layout>
</widget>
@@ -582,35 +583,45 @@
</item>
</layout>
</widget>
- <widget class="QMenuBar" name="menubar" >
- <property name="geometry" >
+ <widget class="QMenuBar" name="menubar">
+ <property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>1124</width>
- <height>24</height>
+ <height>27</height>
</rect>
</property>
- <widget class="QMenu" name="menu_File" >
- <property name="title" >
+ <widget class="QMenu" name="menu_File">
+ <property name="title">
<string>&amp;File</string>
</property>
- <addaction name="action_exit" />
+ <addaction name="action_open"/>
+ <addaction name="action_save"/>
+ <addaction name="action_exit"/>
</widget>
- <addaction name="menu_File" />
+ <addaction name="menu_File"/>
</widget>
- <widget class="QStatusBar" name="statusbar" />
- <action name="action_open" >
- <property name="text" >
- <string>&amp;Open</string>
+ <widget class="QStatusBar" name="statusbar"/>
+ <action name="action_exit">
+ <property name="text">
+ <string>E&amp;xit</string>
</property>
- <property name="shortcut" >
- <string>Ctrl+O</string>
+ </action>
+ <action name="action_save">
+ <property name="text">
+ <string>&amp;Save</string>
+ </property>
+ <property name="shortcut">
+ <string>Ctrl+S</string>
</property>
</action>
- <action name="action_exit" >
- <property name="text" >
- <string>E&amp;xit</string>
+ <action name="action_open">
+ <property name="text">
+ <string>&amp;Open</string>
+ </property>
+ <property name="shortcut">
+ <string>Ctrl+O</string>
</property>
</action>
</widget>
@@ -662,11 +673,11 @@
<receiver>MainWindow</receiver>
<slot>close()</slot>
<hints>
- <hint type="sourcelabel" >
+ <hint type="sourcelabel">
<x>-1</x>
<y>-1</y>
</hint>
- <hint type="destinationlabel" >
+ <hint type="destinationlabel">
<x>399</x>
<y>347</y>
</hint>