-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtemplate.py
125 lines (119 loc) · 7.16 KB
/
template.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'dashboard.ui'
#
# Created: Sun Dec 1 19:51:00 2013
# by: pyside-uic 0.2.13 running on PySide 1.1.1
#
# WARNING! All changes made in this file will be lost!
from PySide import QtCore, QtGui
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(1361, 690)
MainWindow.setMouseTracking(False)
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap("../../../../../usr/share/pixmaps/cubeview48.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
MainWindow.setWindowIcon(icon)
MainWindow.setWindowOpacity(1.0)
MainWindow.setToolTip("")
MainWindow.setAutoFillBackground(False)
MainWindow.setToolButtonStyle(QtCore.Qt.ToolButtonIconOnly)
MainWindow.setTabShape(QtGui.QTabWidget.Rounded)
self.centralwidget = QtGui.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
self.init_button = QtGui.QPushButton(self.centralwidget)
self.init_button.setGeometry(QtCore.QRect(1150, 20, 201, 41))
self.init_button.setObjectName("init_button")
self.label = QtGui.QLabel(self.centralwidget)
self.label.setGeometry(QtCore.QRect(630, 0, 441, 21))
font = QtGui.QFont()
font.setFamily("URW Chancery L")
font.setPointSize(12)
font.setWeight(75)
font.setItalic(True)
font.setBold(True)
self.label.setFont(font)
self.label.setObjectName("label")
self.ygraph = PlotWidget(self.centralwidget)
self.ygraph.setGeometry(QtCore.QRect(10, 180, 501, 161))
self.ygraph.setObjectName("ygraph")
self.Save_data = QtGui.QPushButton(self.centralwidget)
self.Save_data.setGeometry(QtCore.QRect(1280, 640, 71, 27))
self.Save_data.setObjectName("Save_data")
self.filename = QtGui.QLineEdit(self.centralwidget)
self.filename.setGeometry(QtCore.QRect(1140, 640, 131, 27))
self.filename.setObjectName("filename")
self.xgraph = PlotWidget(self.centralwidget)
self.xgraph.setGeometry(QtCore.QRect(10, 10, 501, 161))
self.xgraph.setObjectName("xgraph")
self.ampgraph = PlotWidget(self.centralwidget)
self.ampgraph.setGeometry(QtCore.QRect(10, 350, 501, 161))
self.ampgraph.setObjectName("ampgraph")
self.phasegraph = PlotWidget(self.centralwidget)
self.phasegraph.setGeometry(QtCore.QRect(10, 520, 501, 161))
self.phasegraph.setObjectName("phasegraph")
self.auto_phase_button = QtGui.QPushButton(self.centralwidget)
self.auto_phase_button.setGeometry(QtCore.QRect(1030, 20, 101, 41))
self.auto_phase_button.setObjectName("auto_phase_button")
self.freq = QtGui.QDoubleSpinBox(self.centralwidget)
self.freq.setGeometry(QtCore.QRect(670, 20, 111, 21))
self.freq.setMinimum(0.1)
self.freq.setMaximum(100.0)
self.freq.setSingleStep(0.1)
self.freq.setProperty("value", 5.0)
self.freq.setObjectName("freq")
self.set_freq_button = QtGui.QPushButton(self.centralwidget)
self.set_freq_button.setGeometry(QtCore.QRect(670, 41, 111, 20))
self.set_freq_button.setObjectName("set_freq_button")
self.zoomgraph = PlotWidget(self.centralwidget)
self.zoomgraph.setGeometry(QtCore.QRect(530, 80, 821, 561))
self.zoomgraph.setObjectName("zoomgraph")
self.cleardata = QtGui.QPushButton(self.centralwidget)
self.cleardata.setGeometry(QtCore.QRect(540, 640, 191, 31))
self.cleardata.setObjectName("cleardata")
self.set_amp_button = QtGui.QPushButton(self.centralwidget)
self.set_amp_button.setGeometry(QtCore.QRect(540, 41, 111, 20))
self.set_amp_button.setObjectName("set_amp_button")
self.amplitude = QtGui.QDoubleSpinBox(self.centralwidget)
self.amplitude.setGeometry(QtCore.QRect(540, 20, 111, 21))
self.amplitude.setDecimals(3)
self.amplitude.setMinimum(0.004)
self.amplitude.setMaximum(5.0)
self.amplitude.setSingleStep(0.002)
self.amplitude.setProperty("value", 0.5)
self.amplitude.setObjectName("amplitude")
self.label_2 = QtGui.QLabel(self.centralwidget)
self.label_2.setGeometry(QtCore.QRect(1280, 669, 81, 31))
font = QtGui.QFont()
font.setPointSize(7)
font.setWeight(75)
font.setItalic(True)
font.setBold(True)
self.label_2.setFont(font)
self.label_2.setObjectName("label_2")
MainWindow.setCentralWidget(self.centralwidget)
self.actionSave_as = QtGui.QAction(MainWindow)
self.actionSave_as.setObjectName("actionSave_as")
self.retranslateUi(MainWindow)
QtCore.QObject.connect(self.init_button, QtCore.SIGNAL("clicked()"), MainWindow.start_measuring)
QtCore.QObject.connect(self.auto_phase_button, QtCore.SIGNAL("clicked()"), MainWindow.autophase)
QtCore.QObject.connect(self.set_freq_button, QtCore.SIGNAL("clicked()"), MainWindow.set_frequency)
QtCore.QObject.connect(self.cleardata, QtCore.SIGNAL("clicked()"), MainWindow.cleartraces)
QtCore.QObject.connect(self.Save_data, QtCore.SIGNAL("clicked()"), MainWindow.saveall)
QtCore.QObject.connect(self.set_amp_button, QtCore.SIGNAL("clicked()"), MainWindow.set_amp)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
MainWindow.setWindowTitle(QtGui.QApplication.translate("MainWindow", "AC susceptometry", None, QtGui.QApplication.UnicodeUTF8))
self.init_button.setText(QtGui.QApplication.translate("MainWindow", "Start measurements", None, QtGui.QApplication.UnicodeUTF8))
self.label.setText(QtGui.QApplication.translate("MainWindow", "AC susceptometry to measure superconducting phase transition temperature", None, QtGui.QApplication.UnicodeUTF8))
self.Save_data.setText(QtGui.QApplication.translate("MainWindow", "Save", None, QtGui.QApplication.UnicodeUTF8))
self.filename.setText(QtGui.QApplication.translate("MainWindow", "datafile", None, QtGui.QApplication.UnicodeUTF8))
self.auto_phase_button.setText(QtGui.QApplication.translate("MainWindow", "Auto Phase", None, QtGui.QApplication.UnicodeUTF8))
self.freq.setSuffix(QtGui.QApplication.translate("MainWindow", " KHz", None, QtGui.QApplication.UnicodeUTF8))
self.set_freq_button.setText(QtGui.QApplication.translate("MainWindow", "Set frequency", None, QtGui.QApplication.UnicodeUTF8))
self.cleardata.setText(QtGui.QApplication.translate("MainWindow", "Clear all data", None, QtGui.QApplication.UnicodeUTF8))
self.set_amp_button.setText(QtGui.QApplication.translate("MainWindow", "Set amplitude", None, QtGui.QApplication.UnicodeUTF8))
self.amplitude.setSuffix(QtGui.QApplication.translate("MainWindow", " V", None, QtGui.QApplication.UnicodeUTF8))
self.label_2.setText(QtGui.QApplication.translate("MainWindow", "Author: Jithin B.P.", None, QtGui.QApplication.UnicodeUTF8))
self.actionSave_as.setText(QtGui.QApplication.translate("MainWindow", "Save as", None, QtGui.QApplication.UnicodeUTF8))
from pyqtgraph import PlotWidget