Commit 216c27103e223ad4a338ddcb524d1c608c96e457
Committed by
GitHub
1 parent
b629599168
Exists in
master
Add files via upload
Showing 3 changed files with 159 additions and 68 deletions Inline Diff
allanplot-gui.py
#!/usr/bin/python | 1 | 1 | #!/usr/bin/python | |
# -*- coding: utf-8 -*- | 2 | 2 | # -*- coding: utf-8 -*- | |
3 | 3 | |||
from PyQt4 import QtGui, QtCore | 4 | 4 | from PyQt4 import QtGui, QtCore | |
import sys, Gnuplot, csv, numpy, allantools | 5 | 5 | import sys, csv, numpy, allantools, pyqtgraph | |
6 | ||||
import allanplotUI | 7 | 6 | import allanplotUI | |
8 | 7 | |||
class allanplot(QtGui.QMainWindow, allanplotUI.Ui_MainWindow): | 9 | 8 | class allanplot(QtGui.QMainWindow, allanplotUI.Ui_MainWindow): | |
def __init__(self, parent=None): | 10 | 9 | def __init__(self, parent=None): | |
super(allanplot, self).__init__(parent) | 11 | 10 | super(allanplot, self).__init__(parent) | |
self.setupUi(self) | 12 | 11 | self.setupUi(self) | |
self.connectActions() | 13 | 12 | self.connectActions() | |
13 | self.pqg_widget(self.frame) | |||
14 | 14 | |||
15 | def pqg_widget(self, frame): | |||
16 | pyqtgraph.setConfigOption('background', 'w') | |||
17 | pyqtgraph.setConfigOption('foreground', 'k') | |||
18 | self.plot_widget = pyqtgraph.PlotWidget() | |||
19 | self.layout_pqg = QtGui.QVBoxLayout(frame) | |||
20 | self.layout_pqg.addWidget(self.plot_widget) | |||
21 | self.plot_widget.showGrid(True, True, 0.5) | |||
22 | self.plot_widget.addLegend() | |||
23 | self.plot_widget.getViewBox().setMouseMode(pyqtgraph.ViewBox.RectMode) | |||
24 | ||||
def connectActions(self): | 15 | 25 | def connectActions(self): | |
self.pushQuit.clicked.connect(QtGui.qApp.quit) | 16 | 26 | self.pushQuit.clicked.connect(QtGui.qApp.quit) | |
self.pushOpen.clicked.connect(self.openDat) | 17 | 27 | self.pushOpen.clicked.connect(self.openDat) | |
self.pushTimePlot.clicked.connect(self.timePlot) | 18 | 28 | self.pushTimePlot.clicked.connect(self.timePlot) | |
self.pushAdevPlot.clicked.connect(self.adevPlot) | 19 | 29 | self.pushAdevPlot.clicked.connect(self.adevPlot) | |
self.pushRelativeTimePlot.clicked.connect(self.relativeTimePlot) | 20 | 30 | self.pushRelativeTimePlot.clicked.connect(self.relativeTimePlot) | |
self.pushRelativeAdevPlot.clicked.connect(self.relativeAdevPlot) | 21 | 31 | self.pushRelativeAdevPlot.clicked.connect(self.relativeAdevPlot) | |
22 | 32 | |||
def openDat(self): | 23 | 33 | def openDat(self): | |
fileNames = QtGui.QFileDialog.getOpenFileNames(self, "Open datafile", QtCore.QDir.homePath(), "data files (*.dat)") | 24 | 34 | fileNames = QtGui.QFileDialog.getOpenFileNames(self, "Open datafile", QtCore.QDir.homePath(), "data files (*.dat)") | |
if fileNames: | 25 | 35 | if fileNames: | |
fileList = sorted([str(f) for f in fileNames]) | 26 | 36 | fileList = sorted([str(f) for f in fileNames]) | |
self.data = [] | 27 | 37 | self.data = [] | |
textList = '' | 28 | 38 | textList = '' | |
for f in fileList: | 29 | 39 | for f in fileList: | |
if textList=='': | 30 | 40 | if textList=='': | |
textList = str(f) | 31 | 41 | textList = str(f) | |
else: | 32 | 42 | else: | |
textList = textList+'\n'+str(f) | 33 | 43 | textList = textList+'\n'+str(f) | |
with open(f, 'r') as dest_f: | 34 | 44 | with open(f, 'r') as dest_f: | |
data_iter = csv.reader(dest_f, delimiter = '\t', quotechar = '"') | 35 | 45 | data_iter = csv.reader(dest_f, delimiter = '\t', quotechar = '"') | |
temp_data = [value for value in data_iter] | 36 | 46 | temp_data = [value for value in data_iter] | |
self.data.extend(temp_data) | 37 | 47 | self.data.extend(temp_data) | |
self.data = numpy.asarray(self.data, dtype = float) | 38 | 48 | self.data = numpy.asarray(self.data, dtype = float) | |
self.textFileList.setText(textList) | 39 | 49 | self.textFileList.setText(textList) | |
self.textValue.setText(str(self.data[:])) | 40 | 50 | self.textValue.setText(str(self.data[:])) | |
41 | 51 | |||
def timePlot(self): | 42 | 52 | def timePlot(self): | |
g = Gnuplot.Gnuplot(persist = 1) | 43 | 53 | self.plot_widget.clear() | |
g('set grid') | 44 | 54 | self.plot_widget.setTitle('time plot') | |
g.xlabel('t (s)') | 45 | 55 | self.plot_widget.setLabel('bottom', "Time", "s") | |
g.ylabel('y (unit)') | 46 | 56 | self.plot_widget.setLabel('left', "y") | |
57 | self.plot_widget.setLogMode(False, False) | |||
for i in range(2, self.data.shape[1]): | 47 | 58 | for i in range(2, self.data.shape[1]): | |
g.replot(Gnuplot.Data(self.data[:,0], self.data[:,i], with_='l', title='#%s'%str(i))) | 48 | 59 | self.curve = self.plot_widget.plot() | |
60 | self.curve.setData(self.data[:,0], self.data[:,i], pen=5*i, name='#%s'%i) | |||
49 | 61 | |||
def relativeTimePlot(self): | 50 | 62 | def relativeTimePlot(self): | |
g = Gnuplot.Gnuplot(persist = 1) | 51 | 63 | self.plot_widget.clear() | |
g('set grid') | 52 | 64 | self.plot_widget.setTitle('relative time plot') | |
g.xlabel('t (s)') | 53 | 65 | self.plot_widget.setLabel('bottom', "Time", "s") | |
g.ylabel('y (unit)') | 54 | 66 | self.plot_widget.setLabel('left', "y") | |
67 | self.plot_widget.setLogMode(False, False) | |||
for i in range(2, self.data.shape[1]): | 55 | 68 | for i in range(2, self.data.shape[1]): | |
g.replot(Gnuplot.Data(self.data[:,0], self.data[:,i]/self.data[:,i].mean(), with_='l', title='#%s'%str(i))) | 56 | 69 | self.curve = self.plot_widget.plot() | |
70 | self.curve.setData(self.data[:,0], self.data[:,i]/self.data[:,i].mean(), pen=5*i, name='#%s'%i) | |||
57 | 71 | |||
def adevPlot(self): | 58 | 72 | def adevPlot(self): | |
g = Gnuplot.Gnuplot(persist = 1) | 59 | 73 | self.plot_widget.clear() | |
g('set logscale xy') | 60 | 74 | self.plot_widget.setTitle('adev plot') | |
g('set grid') | 61 | 75 | self.plot_widget.setLabel('bottom', "Tau", "s") | |
g.xlabel('Tau (s)') | 62 | 76 | self.plot_widget.setLabel('left', "adev") | |
g.ylabel('Adev') | 63 | 77 | self.plot_widget.setLogMode(True, True) | |
for i in range(2, self.data.shape[1]): | 64 | 78 | for i in range(2, self.data.shape[1]): | |
(tau2, ad, ade, adn) = allantools.adev(self.data[:,i], rate=1, data_type="freq", taus='decade') | 65 | 79 | (tau2, ad, ade, adn) = allantools.adev(self.data[:,i], rate=1, data_type="freq", taus='decade') | |
g.replot(Gnuplot.Data(tau2, ad, ade, with_='yerrorbars', title='#%s'%str(i))) | 66 | 80 | self.curve = self.plot_widget.plot() | |
81 | self.curve.setData(tau2, ad, pen=5*i, name='#%s'%i) | |||
67 | 82 | |||
def relativeAdevPlot(self): | 68 | 83 | def relativeAdevPlot(self): | |
g = Gnuplot.Gnuplot(persist = 1) | 69 | 84 | self.plot_widget.clear() | |
g('set logscale xy') | 70 | 85 | self.plot_widget.setTitle('relative adev plot') | |
g('set grid') | 71 | 86 | self.plot_widget.setLabel('bottom', "Tau", "s") | |
g.xlabel('Tau (s)') | 72 | 87 | self.plot_widget.setLabel('left', "relative adev") | |
g.ylabel('Adev') | 73 | 88 | self.plot_widget.setLogMode(True, True) | |
for i in range(2, self.data.shape[1]): | 74 | 89 | for i in range(2, self.data.shape[1]): | |
(tau2, ad, ade, adn) = allantools.adev(self.data[:,i]/self.data[:,i].mean(), rate=1, data_type="freq", taus='decade') | 75 | 90 | (tau2, ad, ade, adn) = allantools.adev(self.data[:,i]/self.data[:,i].mean(), rate=1, data_type="freq", taus='decade') | |
g.replot(Gnuplot.Data(tau2, ad, ade, with_='yerrorbars', title='#%s'%str(i))) | 76 | 91 | self.curve = self.plot_widget.plot() | |
92 | self.curve.setData(tau2, ad, pen=5*i, name='#%s'%i) | |||
77 | 93 | |||
def main(self): | 78 | 94 | def main(self): | |
self.show() | 79 | 95 | self.show() | |
80 | 96 | |||
if __name__=='__main__': | 81 | 97 | if __name__=='__main__': | |
app = QtGui.QApplication(sys.argv) | 82 | 98 | app = QtGui.QApplication(sys.argv) | |
allanplot = allanplot() | 83 | 99 | allanplot = allanplot() | |
allanplot.main() | 84 | 100 | allanplot.main() | |
app.exec_() | 85 | 101 | app.exec_() | |
86 | 102 | |||
allanplotUI.py
# -*- coding: utf-8 -*- | 1 | 1 | # -*- coding: utf-8 -*- | |
2 | 2 | |||
# Form implementation generated from reading ui file 'allanplotUI.ui' | 3 | 3 | # Form implementation generated from reading ui file 'allanplotUI.ui' | |
# | 4 | 4 | # | |
# Created: Wed Jul 6 15:05:06 2016 | 5 | 5 | # Created: Thu Jul 7 17:46:05 2016 | |
# by: PyQt4 UI code generator 4.11.2 | 6 | 6 | # by: PyQt4 UI code generator 4.11.2 | |
# | 7 | 7 | # | |
# WARNING! All changes made in this file will be lost! | 8 | 8 | # WARNING! All changes made in this file will be lost! | |
9 | 9 | |||
from PyQt4 import QtCore, QtGui | 10 | 10 | from PyQt4 import QtCore, QtGui | |
11 | 11 | |||
try: | 12 | 12 | try: | |
_fromUtf8 = QtCore.QString.fromUtf8 | 13 | 13 | _fromUtf8 = QtCore.QString.fromUtf8 | |
except AttributeError: | 14 | 14 | except AttributeError: | |
def _fromUtf8(s): | 15 | 15 | def _fromUtf8(s): | |
return s | 16 | 16 | return s | |
17 | 17 | |||
try: | 18 | 18 | try: | |
_encoding = QtGui.QApplication.UnicodeUTF8 | 19 | 19 | _encoding = QtGui.QApplication.UnicodeUTF8 | |
def _translate(context, text, disambig): | 20 | 20 | def _translate(context, text, disambig): | |
return QtGui.QApplication.translate(context, text, disambig, _encoding) | 21 | 21 | return QtGui.QApplication.translate(context, text, disambig, _encoding) | |
except AttributeError: | 22 | 22 | except AttributeError: | |
def _translate(context, text, disambig): | 23 | 23 | def _translate(context, text, disambig): | |
return QtGui.QApplication.translate(context, text, disambig) | 24 | 24 | return QtGui.QApplication.translate(context, text, disambig) | |
25 | 25 | |||
class Ui_MainWindow(object): | 26 | 26 | class Ui_MainWindow(object): | |
def setupUi(self, MainWindow): | 27 | 27 | def setupUi(self, MainWindow): | |
MainWindow.setObjectName(_fromUtf8("MainWindow")) | 28 | 28 | MainWindow.setObjectName(_fromUtf8("MainWindow")) | |
MainWindow.resize(903, 240) | 29 | 29 | MainWindow.resize(766, 780) | |
self.centralwidget = QtGui.QWidget(MainWindow) | 30 | 30 | self.centralwidget = QtGui.QWidget(MainWindow) | |
self.centralwidget.setObjectName(_fromUtf8("centralwidget")) | 31 | 31 | self.centralwidget.setObjectName(_fromUtf8("centralwidget")) | |
self.gridLayout = QtGui.QGridLayout(self.centralwidget) | 32 | 32 | self.gridLayout = QtGui.QGridLayout(self.centralwidget) | |
self.gridLayout.setObjectName(_fromUtf8("gridLayout")) | 33 | 33 | self.gridLayout.setObjectName(_fromUtf8("gridLayout")) | |
self.textFileList = QtGui.QTextBrowser(self.centralwidget) | 34 | |||
self.textFileList.setObjectName(_fromUtf8("textFileList")) | 35 | |||
self.gridLayout.addWidget(self.textFileList, 1, 3, 4, 1) | 36 | |||
self.pushOpen = QtGui.QPushButton(self.centralwidget) | 37 | 34 | self.pushOpen = QtGui.QPushButton(self.centralwidget) | |
self.pushOpen.setObjectName(_fromUtf8("pushOpen")) | 38 | 35 | self.pushOpen.setObjectName(_fromUtf8("pushOpen")) | |
self.gridLayout.addWidget(self.pushOpen, 1, 1, 1, 1) | 39 | 36 | self.gridLayout.addWidget(self.pushOpen, 1, 1, 1, 1) | |
self.groupBox = QtGui.QGroupBox(self.centralwidget) | 40 | 37 | self.groupBox = QtGui.QGroupBox(self.centralwidget) | |
38 | sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Minimum) | |||
39 | sizePolicy.setHorizontalStretch(0) | |||
40 | sizePolicy.setVerticalStretch(0) | |||
41 | sizePolicy.setHeightForWidth(self.groupBox.sizePolicy().hasHeightForWidth()) | |||
42 | self.groupBox.setSizePolicy(sizePolicy) | |||
self.groupBox.setObjectName(_fromUtf8("groupBox")) | 41 | 43 | self.groupBox.setObjectName(_fromUtf8("groupBox")) | |
self.verticalLayout_2 = QtGui.QVBoxLayout(self.groupBox) | 42 | 44 | self.verticalLayout_2 = QtGui.QVBoxLayout(self.groupBox) | |
self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2")) | 43 | 45 | self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2")) | |
self.pushTimePlot = QtGui.QPushButton(self.groupBox) | 44 | 46 | self.pushTimePlot = QtGui.QPushButton(self.groupBox) | |
self.pushTimePlot.setObjectName(_fromUtf8("pushTimePlot")) | 45 | 47 | self.pushTimePlot.setObjectName(_fromUtf8("pushTimePlot")) | |
self.verticalLayout_2.addWidget(self.pushTimePlot) | 46 | 48 | self.verticalLayout_2.addWidget(self.pushTimePlot) | |
self.pushRelativeTimePlot = QtGui.QPushButton(self.groupBox) | 47 | 49 | self.pushRelativeTimePlot = QtGui.QPushButton(self.groupBox) | |
self.pushRelativeTimePlot.setObjectName(_fromUtf8("pushRelativeTimePlot")) | 48 | 50 | self.pushRelativeTimePlot.setObjectName(_fromUtf8("pushRelativeTimePlot")) | |
self.verticalLayout_2.addWidget(self.pushRelativeTimePlot) | 49 | 51 | self.verticalLayout_2.addWidget(self.pushRelativeTimePlot) | |
self.pushAdevPlot = QtGui.QPushButton(self.groupBox) | 50 | 52 | self.pushAdevPlot = QtGui.QPushButton(self.groupBox) | |
self.pushAdevPlot.setObjectName(_fromUtf8("pushAdevPlot")) | 51 | 53 | self.pushAdevPlot.setObjectName(_fromUtf8("pushAdevPlot")) | |
self.verticalLayout_2.addWidget(self.pushAdevPlot) | 52 | 54 | self.verticalLayout_2.addWidget(self.pushAdevPlot) | |
self.pushRelativeAdevPlot = QtGui.QPushButton(self.groupBox) | 53 | 55 | self.pushRelativeAdevPlot = QtGui.QPushButton(self.groupBox) | |
self.pushRelativeAdevPlot.setObjectName(_fromUtf8("pushRelativeAdevPlot")) | 54 | 56 | self.pushRelativeAdevPlot.setObjectName(_fromUtf8("pushRelativeAdevPlot")) | |
self.verticalLayout_2.addWidget(self.pushRelativeAdevPlot) | 55 | 57 | self.verticalLayout_2.addWidget(self.pushRelativeAdevPlot) | |
self.gridLayout.addWidget(self.groupBox, 5, 1, 1, 1) | 56 | 58 | self.gridLayout.addWidget(self.groupBox, 4, 1, 1, 1) | |
spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) | 57 | 59 | self.textValue = QtGui.QTextBrowser(self.centralwidget) | |
self.gridLayout.addItem(spacerItem, 3, 1, 1, 1) | 58 | 60 | sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum) | |
61 | sizePolicy.setHorizontalStretch(0) | |||
62 | sizePolicy.setVerticalStretch(0) | |||
63 | sizePolicy.setHeightForWidth(self.textValue.sizePolicy().hasHeightForWidth()) | |||
64 | self.textValue.setSizePolicy(sizePolicy) | |||
65 | self.textValue.setMinimumSize(QtCore.QSize(600, 150)) | |||
66 | self.textValue.setMaximumSize(QtCore.QSize(16777215, 150)) | |||
67 | self.textValue.setObjectName(_fromUtf8("textValue")) | |||
68 | self.gridLayout.addWidget(self.textValue, 4, 2, 1, 1) | |||
self.pushQuit = QtGui.QPushButton(self.centralwidget) | 59 | 69 | self.pushQuit = QtGui.QPushButton(self.centralwidget) | |
self.pushQuit.setObjectName(_fromUtf8("pushQuit")) | 60 | 70 | self.pushQuit.setObjectName(_fromUtf8("pushQuit")) | |
self.gridLayout.addWidget(self.pushQuit, 2, 1, 1, 1) | 61 | 71 | self.gridLayout.addWidget(self.pushQuit, 2, 1, 1, 1) | |
self.textValue = QtGui.QTextBrowser(self.centralwidget) | 62 | 72 | self.textFileList = QtGui.QTextBrowser(self.centralwidget) | |
self.textValue.setObjectName(_fromUtf8("textValue")) | 63 | 73 | self.textFileList.setEnabled(True) | |
self.gridLayout.addWidget(self.textValue, 5, 3, 1, 1) | 64 | 74 | sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Maximum, QtGui.QSizePolicy.Maximum) | |
75 | sizePolicy.setHorizontalStretch(0) | |||
76 | sizePolicy.setVerticalStretch(0) | |||
77 | sizePolicy.setHeightForWidth(self.textFileList.sizePolicy().hasHeightForWidth()) | |||
78 | self.textFileList.setSizePolicy(sizePolicy) | |||
79 | self.textFileList.setMinimumSize(QtCore.QSize(600, 100)) | |||
80 | self.textFileList.setMaximumSize(QtCore.QSize(16777215, 100)) | |||
81 | self.textFileList.setObjectName(_fromUtf8("textFileList")) | |||
82 | self.gridLayout.addWidget(self.textFileList, 1, 2, 3, 1) | |||
83 | self.frame = QtGui.QFrame(self.centralwidget) | |||
84 | sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Expanding) | |||
85 | sizePolicy.setHorizontalStretch(0) | |||
86 | sizePolicy.setVerticalStretch(0) | |||
87 | sizePolicy.setHeightForWidth(self.frame.sizePolicy().hasHeightForWidth()) | |||
88 | self.frame.setSizePolicy(sizePolicy) | |||
89 | self.frame.setMinimumSize(QtCore.QSize(700, 500)) | |||
90 | self.frame.setObjectName(_fromUtf8("frame")) | |||
91 | self.gridLayout.addWidget(self.frame, 5, 1, 1, 2) | |||
MainWindow.setCentralWidget(self.centralwidget) | 65 | 92 | MainWindow.setCentralWidget(self.centralwidget) | |
self.actionOpen = QtGui.QAction(MainWindow) | 66 | 93 | self.actionOpen = QtGui.QAction(MainWindow) | |
self.actionOpen.setObjectName(_fromUtf8("actionOpen")) | 67 | 94 | self.actionOpen.setObjectName(_fromUtf8("actionOpen")) | |
self.actionPlot = QtGui.QAction(MainWindow) | 68 | 95 | self.actionPlot = QtGui.QAction(MainWindow) | |
self.actionPlot.setObjectName(_fromUtf8("actionPlot")) | 69 | 96 | self.actionPlot.setObjectName(_fromUtf8("actionPlot")) | |
self.actionQuit = QtGui.QAction(MainWindow) | 70 | 97 | self.actionQuit = QtGui.QAction(MainWindow) | |
self.actionQuit.setObjectName(_fromUtf8("actionQuit")) | 71 | 98 | self.actionQuit.setObjectName(_fromUtf8("actionQuit")) | |
72 | 99 | |||
self.retranslateUi(MainWindow) | 73 | 100 | self.retranslateUi(MainWindow) | |
QtCore.QMetaObject.connectSlotsByName(MainWindow) | 74 | 101 | QtCore.QMetaObject.connectSlotsByName(MainWindow) | |
75 | 102 | |||
def retranslateUi(self, MainWindow): | 76 | 103 | def retranslateUi(self, MainWindow): | |
MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow", None)) | 77 | 104 | MainWindow.setWindowTitle(_translate("MainWindow", "allanplot-gui", None)) | |
self.textFileList.setHtml(_translate("MainWindow", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n" | 78 | |||
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n" | 79 | |||
"p, li { white-space: pre-wrap; }\n" | 80 | |||
"</style></head><body style=\" font-family:\'DejaVu Sans\'; font-size:9pt; font-weight:400; font-style:normal;\">\n" | 81 | |||
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">.dat files</p></body></html>", None)) | 82 | |||
self.pushOpen.setText(_translate("MainWindow", "Open", None)) | 83 | 105 | self.pushOpen.setText(_translate("MainWindow", "Open", None)) | |
self.groupBox.setTitle(_translate("MainWindow", "Plotting tools", None)) | 84 | 106 | self.groupBox.setTitle(_translate("MainWindow", "Plotting tools", None)) | |
self.pushTimePlot.setText(_translate("MainWindow", "Time Plot", None)) | 85 | 107 | self.pushTimePlot.setText(_translate("MainWindow", "Time Plot", None)) | |
self.pushRelativeTimePlot.setText(_translate("MainWindow", "Relative Time Plot", None)) | 86 | 108 | self.pushRelativeTimePlot.setText(_translate("MainWindow", "Relative Time Plot", None)) | |
self.pushAdevPlot.setText(_translate("MainWindow", "Adev Plot", None)) | 87 | 109 | self.pushAdevPlot.setText(_translate("MainWindow", "Adev Plot", None)) | |
self.pushRelativeAdevPlot.setText(_translate("MainWindow", "Relative Adev Plot", None)) | 88 | 110 | self.pushRelativeAdevPlot.setText(_translate("MainWindow", "Relative Adev Plot", None)) | |
self.pushQuit.setText(_translate("MainWindow", "Quit", None)) | 89 | |||
self.textValue.setHtml(_translate("MainWindow", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n" | 90 | 111 | self.textValue.setHtml(_translate("MainWindow", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n" | |
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n" | 91 | 112 | "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n" | |
"p, li { white-space: pre-wrap; }\n" | 92 | 113 | "p, li { white-space: pre-wrap; }\n" | |
"</style></head><body style=\" font-family:\'DejaVu Sans\'; font-size:9pt; font-weight:400; font-style:normal;\">\n" | 93 | 114 | "</style></head><body style=\" font-family:\'DejaVu Sans\'; font-size:9pt; font-weight:400; font-style:normal;\">\n" | |
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><br /></p></body></html>", None)) | 94 | 115 | "<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><br /></p></body></html>", None)) | |
116 | self.pushQuit.setText(_translate("MainWindow", "Quit", None)) | |||
117 | self.textFileList.setHtml(_translate("MainWindow", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n" | |||
118 | "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n" | |||
119 | "p, li { white-space: pre-wrap; }\n" | |||
120 | "</style></head><body style=\" font-family:\'DejaVu Sans\'; font-size:9pt; font-weight:400; font-style:normal;\">\n" | |||
121 | "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">.dat files</p></body></html>", None)) | |||
self.actionOpen.setText(_translate("MainWindow", "Open", None)) | 95 | 122 | self.actionOpen.setText(_translate("MainWindow", "Open", None)) | |
self.actionPlot.setText(_translate("MainWindow", "Plot", None)) | 96 | 123 | self.actionPlot.setText(_translate("MainWindow", "Plot", None)) | |
self.actionQuit.setText(_translate("MainWindow", "Quit", None)) | 97 | 124 | self.actionQuit.setText(_translate("MainWindow", "Quit", None)) | |
98 | 125 | |||
99 | 126 |
allanplotUI.ui
<?xml version="1.0" encoding="UTF-8"?> | 1 | 1 | <?xml version="1.0" encoding="UTF-8"?> | |
<ui version="4.0"> | 2 | 2 | <ui version="4.0"> | |
<class>MainWindow</class> | 3 | 3 | <class>MainWindow</class> | |
<widget class="QMainWindow" name="MainWindow"> | 4 | 4 | <widget class="QMainWindow" name="MainWindow"> | |
<property name="geometry"> | 5 | 5 | <property name="geometry"> | |
<rect> | 6 | 6 | <rect> | |
<x>0</x> | 7 | 7 | <x>0</x> | |
<y>0</y> | 8 | 8 | <y>0</y> | |
<width>903</width> | 9 | 9 | <width>766</width> | |
<height>240</height> | 10 | 10 | <height>780</height> | |
</rect> | 11 | 11 | </rect> | |
</property> | 12 | 12 | </property> | |
<property name="windowTitle"> | 13 | 13 | <property name="windowTitle"> | |
<string>MainWindow</string> | 14 | 14 | <string>allanplot-gui</string> | |
</property> | 15 | 15 | </property> | |
<widget class="QWidget" name="centralwidget"> | 16 | 16 | <widget class="QWidget" name="centralwidget"> | |
<layout class="QGridLayout" name="gridLayout"> | 17 | 17 | <layout class="QGridLayout" name="gridLayout"> | |
<item row="1" column="3" rowspan="4"> | 18 | |||
<widget class="QTextBrowser" name="textFileList"> | 19 | |||
<property name="html"> | 20 | |||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> | 21 | |||
<html><head><meta name="qrichtext" content="1" /><style type="text/css"> | 22 | |||
p, li { white-space: pre-wrap; } | 23 | |||
</style></head><body style=" font-family:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;"> | 24 | |||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">.dat files</p></body></html></string> | 25 | |||
</property> | 26 | |||
</widget> | 27 | |||
</item> | 28 | |||
<item row="1" column="1"> | 29 | 18 | <item row="1" column="1"> | |
<widget class="QPushButton" name="pushOpen"> | 30 | 19 | <widget class="QPushButton" name="pushOpen"> | |
<property name="text"> | 31 | 20 | <property name="text"> | |
<string>Open</string> | 32 | 21 | <string>Open</string> | |
</property> | 33 | 22 | </property> | |
</widget> | 34 | 23 | </widget> | |
</item> | 35 | 24 | </item> | |
<item row="5" column="1"> | 36 | 25 | <item row="4" column="1"> | |
<widget class="QGroupBox" name="groupBox"> | 37 | 26 | <widget class="QGroupBox" name="groupBox"> | |
27 | <property name="sizePolicy"> | |||
28 | <sizepolicy hsizetype="Preferred" vsizetype="Minimum"> | |||
29 | <horstretch>0</horstretch> | |||
30 | <verstretch>0</verstretch> | |||
31 | </sizepolicy> | |||
32 | </property> | |||
<property name="title"> | 38 | 33 | <property name="title"> | |
<string>Plotting tools</string> | 39 | 34 | <string>Plotting tools</string> | |
</property> | 40 | 35 | </property> | |
<layout class="QVBoxLayout" name="verticalLayout_2"> | 41 | 36 | <layout class="QVBoxLayout" name="verticalLayout_2"> | |
<item> | 42 | 37 | <item> | |
<widget class="QPushButton" name="pushTimePlot"> | 43 | 38 | <widget class="QPushButton" name="pushTimePlot"> | |
<property name="text"> | 44 | 39 | <property name="text"> | |
<string>Time Plot</string> | 45 | 40 | <string>Time Plot</string> | |
</property> | 46 | 41 | </property> | |
</widget> | 47 | 42 | </widget> | |
</item> | 48 | 43 | </item> | |
<item> | 49 | 44 | <item> | |
<widget class="QPushButton" name="pushRelativeTimePlot"> | 50 | 45 | <widget class="QPushButton" name="pushRelativeTimePlot"> | |
<property name="text"> | 51 | 46 | <property name="text"> | |
<string>Relative Time Plot</string> | 52 | 47 | <string>Relative Time Plot</string> | |
</property> | 53 | 48 | </property> | |
</widget> | 54 | 49 | </widget> | |
</item> | 55 | 50 | </item> | |
<item> | 56 | 51 | <item> | |
<widget class="QPushButton" name="pushAdevPlot"> | 57 | 52 | <widget class="QPushButton" name="pushAdevPlot"> | |
<property name="text"> | 58 | 53 | <property name="text"> | |
<string>Adev Plot</string> | 59 | 54 | <string>Adev Plot</string> | |
</property> | 60 | 55 | </property> | |
</widget> | 61 | 56 | </widget> | |
</item> | 62 | 57 | </item> | |
<item> | 63 | 58 | <item> | |
<widget class="QPushButton" name="pushRelativeAdevPlot"> | 64 | 59 | <widget class="QPushButton" name="pushRelativeAdevPlot"> | |
<property name="text"> | 65 | 60 | <property name="text"> | |
<string>Relative Adev Plot</string> | 66 | 61 | <string>Relative Adev Plot</string> | |
</property> | 67 | 62 | </property> | |
</widget> | 68 | 63 | </widget> | |
</item> | 69 | 64 | </item> | |
</layout> | 70 | 65 | </layout> | |
</widget> | 71 | 66 | </widget> | |
</item> | 72 | 67 | </item> | |
<item row="3" column="1"> | 73 | 68 | <item row="4" column="2"> | |
<spacer name="verticalSpacer"> | 74 | 69 | <widget class="QTextBrowser" name="textValue"> | |
<property name="orientation"> | 75 | 70 | <property name="sizePolicy"> | |
<enum>Qt::Vertical</enum> | 76 | 71 | <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> | |
72 | <horstretch>0</horstretch> | |||
73 | <verstretch>0</verstretch> | |||
74 | </sizepolicy> | |||
</property> | 77 | 75 | </property> | |
<property name="sizeHint" stdset="0"> | 78 | 76 | <property name="minimumSize"> | |
<size> | 79 | 77 | <size> | |
<width>20</width> | 80 | 78 | <width>600</width> | |
<height>40</height> | 81 | 79 | <height>150</height> | |
</size> | 82 | 80 | </size> | |
</property> | 83 | 81 | </property> | |
</spacer> | 84 | 82 | <property name="maximumSize"> | |
83 | <size> | |||
84 | <width>16777215</width> | |||
85 | <height>150</height> | |||
86 | </size> | |||
87 | </property> | |||
88 | <property name="html"> | |||
89 | <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> | |||
90 | <html><head><meta name="qrichtext" content="1" /><style type="text/css"> | |||
91 | p, li { white-space: pre-wrap; } | |||
92 | </style></head><body style=" font-family:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;"> | |||
93 | <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html></string> | |||
94 | </property> | |||
95 | </widget> | |||
</item> | 85 | 96 | </item> | |
<item row="2" column="1"> | 86 | 97 | <item row="2" column="1"> | |
<widget class="QPushButton" name="pushQuit"> | 87 | 98 | <widget class="QPushButton" name="pushQuit"> | |
<property name="text"> | 88 | 99 | <property name="text"> | |
<string>Quit</string> | 89 | 100 | <string>Quit</string> | |
</property> | 90 | 101 | </property> | |
</widget> | 91 | 102 | </widget> | |
</item> | 92 | 103 | </item> | |
<item row="5" column="3"> | 93 | 104 | <item row="1" column="2" rowspan="3"> | |
<widget class="QTextBrowser" name="textValue"> | 94 | 105 | <widget class="QTextBrowser" name="textFileList"> | |
106 | <property name="enabled"> | |||
107 | <bool>true</bool> | |||
108 | </property> | |||
109 | <property name="sizePolicy"> | |||
110 | <sizepolicy hsizetype="Maximum" vsizetype="Maximum"> | |||
111 | <horstretch>0</horstretch> | |||
112 | <verstretch>0</verstretch> | |||
113 | </sizepolicy> | |||
114 | </property> | |||
115 | <property name="minimumSize"> | |||
116 | <size> | |||
117 | <width>600</width> | |||
118 | <height>100</height> | |||
119 | </size> | |||
120 | </property> | |||
121 | <property name="maximumSize"> | |||
122 | <size> | |||
123 | <width>16777215</width> | |||
124 | <height>100</height> | |||
125 | </size> | |||
126 | </property> | |||
<property name="html"> | 95 | 127 | <property name="html"> | |
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> | 96 | 128 | <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> | |
<html><head><meta name="qrichtext" content="1" /><style type="text/css"> | 97 | 129 | <html><head><meta name="qrichtext" content="1" /><style type="text/css"> | |
p, li { white-space: pre-wrap; } | 98 | 130 | p, li { white-space: pre-wrap; } | |
</style></head><body style=" font-family:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;"> | 99 | 131 | </style></head><body style=" font-family:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;"> | |
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html></string> | 100 | 132 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">.dat files</p></body></html></string> | |
133 | </property> | |||
134 | </widget> | |||
135 | </item> | |||
136 | <item row="5" column="1" colspan="2"> | |||
137 | <widget class="QFrame" name="frame"> | |||
138 | <property name="sizePolicy"> | |||
139 | <sizepolicy hsizetype="Preferred" vsizetype="Expanding"> | |||
140 | <horstretch>0</horstretch> | |||
141 | <verstretch>0</verstretch> | |||
142 | </sizepolicy> | |||
143 | </property> | |||
144 | <property name="minimumSize"> | |||
145 | <size> | |||
146 | <width>700</width> | |||
147 | <height>500</height> | |||
148 | </size> | |||
</property> | 101 | 149 | </property> | |
</widget> | 102 | 150 | </widget> | |
</item> | 103 | 151 | </item> | |
</layout> | 104 | 152 | </layout> | |
</widget> | 105 | 153 | </widget> | |
<action name="actionOpen"> | 106 | 154 | <action name="actionOpen"> | |
<property name="text"> | 107 | 155 | <property name="text"> | |
<string>Open</string> | 108 | 156 | <string>Open</string> | |
</property> | 109 | 157 | </property> | |
</action> | 110 | 158 | </action> | |
<action name="actionPlot"> | 111 | 159 | <action name="actionPlot"> | |
<property name="text"> | 112 | 160 | <property name="text"> | |
<string>Plot</string> | 113 | 161 | <string>Plot</string> | |
</property> | 114 | 162 | </property> | |
</action> | 115 | 163 | </action> | |
<action name="actionQuit"> | 116 | 164 | <action name="actionQuit"> | |
<property name="text"> | 117 | 165 | <property name="text"> | |
<string>Quit</string> | 118 | 166 | <string>Quit</string> | |
</property> | 119 | 167 | </property> | |
</action> | 120 | 168 | </action> | |
</widget> | 121 | 169 | </widget> | |
<resources/> | 122 | 170 | <resources/> | |
<connections/> | 123 | 171 | <connections/> | |
</ui> | 124 | 172 | </ui> | |
125 | 173 | |||