Example #1
0
    def populateGUI(self):
        self.nameLabel = ClickableLabel('<b>' + self.name + '</b>')
        self.stateButton = QtGui.QPushButton()
        self.stateButton.setCheckable(1)

        self.piezoVoltageLabel = ClickableLabel('Piezo Voltage: ')
        self.piezoVoltageBox = SuperSpinBox(self.device._piezo_voltage_range,
                                            self.piezoVoltageDisplayUnits,
                                            self.piezoVoltageDigits)
        self.piezoVoltageBox.setFixedWidth(self.spinboxWidth)
        self.piezoVoltageBox.display(0)

        self.diodeCurrentLabel = ClickableLabel('Diode Current: ')
        self.diodeCurrentBox = SuperSpinBox(self.device._diode_current_range,
                                            self.diodeCurrentDisplayUnits,
                                            self.diodeCurrentDigits)
        self.diodeCurrentBox.setFixedWidth(self.spinboxWidth)
        self.diodeCurrentBox.display(0)

        self.layout = QtGui.QGridLayout()
        self.layout.addWidget(self.nameLabel, 0, 0, 1, 1,
                              QtCore.Qt.AlignHCenter)
        self.layout.addWidget(self.stateButton, 0, 1)
        self.layout.addWidget(self.piezoVoltageLabel, 1, 0, 1, 1,
                              QtCore.Qt.AlignRight)
        self.layout.addWidget(self.piezoVoltageBox, 1, 1)
        self.layout.addWidget(self.diodeCurrentLabel, 2, 0, 1, 1,
                              QtCore.Qt.AlignRight)
        self.layout.addWidget(self.diodeCurrentBox, 2, 1)
        self.setLayout(self.layout)

        self.setWindowTitle(self.name)
        self.setFixedSize(120 + self.spinboxWidth, 100)

        self.reactor.callInThread(self.getAll)
Example #2
0
    def populateGUI(self):
        self.nameLabel = ClickableLabel('<b>' + self.name + '</b>')
        self.stateButton = QtGui.QPushButton()
        self.stateButton.setCheckable(True)
        
        self.frequencyLabel = ClickableLabel('Frequency: ')
        self.frequencyBox = SuperSpinBox(self.device._frequency_range, 
                                          self.frequencyDisplayUnits, 
                                          self.frequencyDigits)
        self.frequencyBox.setFixedWidth(self.spinboxWidth)
        
        self.amplitudeLabel = ClickableLabel('Amplitude: ')
        self.amplitudeBox = SuperSpinBox(self.device._amplitude_range, 
                                          self.amplitudeDisplayUnits, 
                                          self.amplitudeDigits)
        self.amplitudeBox.setFixedWidth(self.spinboxWidth)
        
        self.layout = QtGui.QGridLayout() 
        self.layout.addWidget(self.nameLabel, 0, 0, 1, 1, 
                              QtCore.Qt.AlignHCenter)
        self.layout.addWidget(self.stateButton, 0, 1)
        self.layout.addWidget(self.frequencyLabel, 1, 0, 1, 1, 
                              QtCore.Qt.AlignRight)
        self.layout.addWidget(self.frequencyBox, 1, 1)
        self.layout.addWidget(self.amplitudeLabel, 2, 0, 1, 1, 
                              QtCore.Qt.AlignRight)
        self.layout.addWidget(self.amplitudeBox, 2, 1)
        self.setLayout(self.layout)

        self.setWindowTitle(self.name)
        self.setFixedSize(110 + self.spinboxWidth, 100)
        
        self.connectSignals()
        self.reactor.callInThread(self.getAll)
    def populateGUI(self):
        self.nameLabel = ClickableLabel('<b>' + self.name + '</b>')
        self.stateButton = QtWidgets.QPushButton()
        self.stateButton.setCheckable(True)

        self.frequencyLabel = ClickableLabel('Frequency: ')
        self.frequencyBox = SuperSpinBox(self.device._frequency_range,
                                         self.frequencyDisplayUnits,
                                         self.frequencyDigits)
        self.frequencyBox.setFixedWidth(self.spinboxWidth)

        self.amplitudeLabel = ClickableLabel('Amplitude: ')
        self.amplitudeBox = SuperSpinBox(self.device._amplitude_range,
                                         self.amplitudeDisplayUnits,
                                         self.amplitudeDigits)
        self.amplitudeBox.setFixedWidth(self.spinboxWidth)

        self.fmstateButton = QtWidgets.QPushButton()
        self.fmfreqBox = SuperSpinBox(self.device._fmfreq_range,
                                      self.fmfreqDisplayUnits,
                                      self.fmfreqDigits)
        self.fmfreqBox.setFixedWidth(self.spinboxWidth)
        self.fmfreqBox.setReadOnly(True)

        self.fmstateButton.setCheckable(True)
        self.fmdevLabel = ClickableLabel('FM Dev: ')
        self.fmdevBox = QtWidgets.QDoubleSpinBox()
        self.fmdevBox.setKeyboardTracking(False)
        self.fmdevBox.setRange(*self.device._fmdev_range)
        #        self.fmdevBox.setButtonSymbols(QtWidgets.QAbstractSpinBox.NoButtons)
        self.fmdevBox.setDecimals(0)

        self.layout = QtWidgets.QGridLayout()
        self.layout.addWidget(self.nameLabel, 0, 0, 1, 1, QtCore.Qt.AlignRight)
        self.layout.addWidget(self.stateButton, 0, 1)
        self.layout.addWidget(self.frequencyLabel, 1, 0, 1, 1,
                              QtCore.Qt.AlignRight)
        self.layout.addWidget(self.frequencyBox, 1, 1)
        self.layout.addWidget(self.amplitudeLabel, 2, 0, 1, 1,
                              QtCore.Qt.AlignRight)
        self.layout.addWidget(self.amplitudeBox, 2, 1)

        self.layout.addWidget(self.fmstateButton, 3, 0, 1, 1,
                              QtCore.Qt.AlignRight)
        self.layout.addWidget(self.fmfreqBox, 3, 1)
        self.layout.addWidget(self.fmdevLabel, 4, 0, 1, 1,
                              QtCore.Qt.AlignRight)
        self.layout.addWidget(self.fmdevBox, 4, 1)

        self.setLayout(self.layout)

        self.setWindowTitle(self.name)
        self.setFixedSize(120 + self.spinboxWidth, 180)

        self.connectSignals()
        self.reactor.callInThread(self.getAll)
Example #4
0
    def populateGUI(self):
        self.state_button = QtGui.QPushButton()
        self.state_button.setCheckable(1)

        self.frequency_box = SuperSpinBox(self.frequency_range,
                                          self.frequency_display_units,
                                          self.frequency_digits)
        self.frequency_box.setFixedWidth(self.spinbox_width)
        self.frequency_box.display(0)

        self.amplitude_box = SuperSpinBox(self.amplitude_range,
                                          self.amplitude_display_units,
                                          self.amplitude_digits)
        self.amplitude_box.setFixedWidth(self.spinbox_width)
        self.amplitude_box.display(0)

        self.offset_box = SuperSpinBox(self.offset_range,
                                       self.offset_display_units,
                                       self.offset_digits)
        self.offset_box.setFixedWidth(self.spinbox_width)
        self.offset_box.display(0)

        self.layout = QtGui.QGridLayout()

        row = 0
        height = 40
        self.layout.addWidget(QtGui.QLabel('<b>' + self.name + '</b>'), 0, 0,
                              1, 1, QtCore.Qt.AlignHCenter)
        if 'state' in self.update_parameters:
            self.layout.addWidget(self.state_button, 0, 1)
        else:
            self.layout.addWidget(QtGui.QLabel('always on'), 0, 0, 1, 1,
                                  QtCore.Qt.AlignHCenter)
        if 'frequency' in self.update_parameters:
            row += 1
            height += 30
            self.layout.addWidget(QtGui.QLabel('Frequency: '), row, 0, 1, 1,
                                  QtCore.Qt.AlignRight)
            self.layout.addWidget(self.frequency_box, row, 1)
        if 'amplitude' in self.update_parameters:
            row += 1
            height += 30
            self.layout.addWidget(QtGui.QLabel('Amplitude: '), row, 0, 1, 1,
                                  QtCore.Qt.AlignRight)
            self.layout.addWidget(self.amplitude_box, row, 1)
        if 'offset' in self.update_parameters:
            row += 1
            height += 30
            self.layout.addWidget(QtGui.QLabel('Offset: '), row, 0, 1, 1,
                                  QtCore.Qt.AlignRight)
            self.layout.addWidget(self.offset_box, row, 1)

        self.setWindowTitle('{} - {} - client'.format(self.servername,
                                                      self.name))
        self.setLayout(self.layout)
        self.setFixedSize(100 + self.spinbox_width, height)
Example #5
0
 def make_pbox(self, p, r, s, n):
     pbox = SuperSpinBox(r, s, n)
     pbox.display(1)
     label = QtWidgets.QLabel(p + ': ')
     label.setFixedWidth(30)
     label.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter)
     pbox.setFixedWidth(80)
     pbox.setFixedHeight(20)
     return p, pbox
 def populate(self):
     units =  [(0, 's'), (-3, 'ms'), (-6, 'us'), (-9, 'ns')]
     self.boxes = [SuperSpinBox([500e-9, 60], units) for i in range(self.parent.max_columns)]
     self.layout = QtGui.QHBoxLayout()
     for db in self.boxes:
         self.layout.addWidget(db)
     self.setLayout(self.layout)
     self.layout.setSpacing(0)
     self.layout.setContentsMargins(0, 0, 0, 0)
Example #7
0
    def populateGUI(self):
        self.state_button = QtGui.QPushButton()
        self.state_button.setCheckable(1)

        self.piezo_voltage_box = SuperSpinBox(self.piezo_voltage_range,
                                              self.piezo_voltage_display_units,
                                              self.piezo_voltage_digits)
        self.piezo_voltage_box.setFixedWidth(self.spinbox_width)
        self.piezo_voltage_box.display(0)

        self.diode_current_box = SuperSpinBox(self.diode_current_range,
                                              self.diode_current_display_units,
                                              self.diode_current_digits)
        self.diode_current_box.setFixedWidth(self.spinbox_width)
        self.diode_current_box.display(0)

        self.layout = QtGui.QGridLayout()

        row = 0
        self.layout.addWidget(QtGui.QLabel('<b>' + self.name + '</b>'), 0, 0,
                              1, 1, QtCore.Qt.AlignHCenter)
        if 'state' in self.update_parameters:
            self.layout.addWidget(self.state_button, 0, 1)
        else:
            self.layout.addWidget(QtGui.QLabel('always on'), 0, 0, 1, 1,
                                  QtCore.Qt.AlignHCenter)
        if 'piezo_voltage' in self.update_parameters:
            row += 1
            self.piezo_voltage_label = ParameterLabel('Piezo Voltage: ')
            self.layout.addWidget(self.piezo_voltage_label, row, 0, 1, 1,
                                  QtCore.Qt.AlignRight)
            self.layout.addWidget(self.piezo_voltage_box, row, 1)
        if 'diode_current' in self.update_parameters:
            row += 1
            self.diode_current_label = ParameterLabel('Diode Current: ')
            self.layout.addWidget(self.diode_current_label, row, 0, 1, 1,
                                  QtCore.Qt.AlignRight)
            self.layout.addWidget(self.diode_current_box, row, 1)

        self.setWindowTitle(self.name)
        self.setLayout(self.layout)
        self.setFixedSize(120 + self.spinbox_width, 100)
    def populateGUI(self):
        self.mode_button = QtWidgets.QPushButton()
        self.mode_button.setCheckable(1)
        self.mode_button.setFixedWidth(self.spinbox_width)
        
        self.voltage_box = SuperSpinBox(self.voltage_range, self.voltage_units,
                                        self.voltage_digits)
        self.voltage_box.setFixedWidth(self.spinbox_width)
        self.voltage_box.display(0)

        if self.layout is None:
            self.layout = QtWidgets.QGridLayout()

        self.layout.addWidget(QtWidgets.QLabel('<b>'+self.name+'</b>'), 1, 0, 1, 1,
                              QtCore.Qt.AlignHCenter)
        self.layout.addWidget(self.mode_button, 1, 1)
        self.layout.addWidget(QtWidgets.QLabel('Voltage: '), 2, 0, 1, 1,
                              QtCore.Qt.AlignRight)
        self.layout.addWidget(self.voltage_box, 2, 1)
        self.setLayout(self.layout)
        self.setFixedSize(100 + self.spinbox_width, 90)
Example #9
0
    def populateGUI(self):
        self.nameLabel = ClickableLabel('<b>' + self.name + '</b>')

        self.channelLabel1 = ClickableLabel('<b>' + 'CH 1' + '</b>')
        self.stateButton1 = QtWidgets.QPushButton()
        self.stateButton1.setCheckable(True)

        self.frequencyLabel1 = ClickableLabel('Frequency: ')
        self.frequencyBox1 = SuperSpinBox(self.device._frequency_range,
                                          self.frequencyDisplayUnits,
                                          self.frequencyDigits)
        self.frequencyBox1.setFixedWidth(self.spinboxWidth)

        self.amplitudeLabel1 = ClickableLabel('Amplitude: ')
        self.amplitudeBox1 = SuperSpinBox(self.device._amplitude_range,
                                          self.amplitudeDisplayUnits,
                                          self.amplitudeDigits)
        self.amplitudeBox1.setFixedWidth(self.spinboxWidth)

        #############

        self.channelLabel2 = ClickableLabel('<b>' + 'CH 2' + '</b>')
        self.stateButton2 = QtWidgets.QPushButton()
        self.stateButton2.setCheckable(True)

        self.frequencyLabel2 = ClickableLabel('Frequency: ')
        self.frequencyBox2 = SuperSpinBox(self.device._frequency_range,
                                          self.frequencyDisplayUnits,
                                          self.frequencyDigits)
        self.frequencyBox2.setFixedWidth(self.spinboxWidth)

        self.amplitudeLabel2 = ClickableLabel('Amplitude: ')
        self.amplitudeBox2 = SuperSpinBox(self.device._amplitude_range,
                                          self.amplitudeDisplayUnits,
                                          self.amplitudeDigits)
        self.amplitudeBox2.setFixedWidth(self.spinboxWidth)

        ##############

        self.layout = QtWidgets.QGridLayout()
        self.layout.addWidget(self.nameLabel, 0, 0, 1, 2,
                              QtCore.Qt.AlignHCenter)

        self.layout.addWidget(self.channelLabel1, 1, 0, 1, 1,
                              QtCore.Qt.AlignRight)
        self.layout.addWidget(self.stateButton1, 1, 1)
        self.layout.addWidget(self.frequencyLabel1, 2, 0, 1, 1,
                              QtCore.Qt.AlignRight)
        self.layout.addWidget(self.frequencyBox1, 2, 1)
        self.layout.addWidget(self.amplitudeLabel1, 3, 0, 1, 1,
                              QtCore.Qt.AlignRight)
        self.layout.addWidget(self.amplitudeBox1, 3, 1)

        self.layout.addWidget(self.channelLabel2, 4, 0, 1, 1,
                              QtCore.Qt.AlignRight)
        self.layout.addWidget(self.stateButton2, 4, 1)
        self.layout.addWidget(self.frequencyLabel2, 5, 0, 1, 1,
                              QtCore.Qt.AlignRight)
        self.layout.addWidget(self.frequencyBox2, 5, 1)
        self.layout.addWidget(self.amplitudeLabel2, 6, 0, 1, 1,
                              QtCore.Qt.AlignRight)
        self.layout.addWidget(self.amplitudeBox2, 6, 1)

        self.setLayout(self.layout)

        self.setWindowTitle(self.name)
        self.setFixedSize(120 + self.spinboxWidth, 250)

        self.connectSignals()
        self.reactor.callInThread(self.getAll)
    def populate(self):
        self.nameLabel = ClickableLabel('<b> MSquared Laser Control </b>')

        self.statusLabel = ClickableLabel('<b> MSquared Status: </b>')
        self.statusText = QtWidgets.QLineEdit()
        self.statusText.setReadOnly(True)
        self.statusText.setAlignment(QtCore.Qt.AlignCenter)
        self.statusText.setFixedHeight(40)
        self.statusText.setFont(QtGui.QFont('Arial', 10))

        self.wlmLabel = ClickableLabel('<b> HF Wavemeter: </b>')
        self.wlmText = QtWidgets.QLineEdit()
        self.wlmText.setReadOnly(True)
        self.wlmText.setAlignment(QtCore.Qt.AlignCenter)
        self.wlmText.setFixedHeight(40)
        self.wlmText.setFont(QtGui.QFont('Arial', 10))

        self.lockButton = QtWidgets.QPushButton()
        self.lockButton.setCheckable(True)
        self.lockButton.setFixedHeight(40)
        self.lockButton.setFixedWidth(120)

        self.oneshotButton = QtWidgets.QPushButton()
        self.oneshotButton.setFixedHeight(40)
        self.oneshotButton.setFixedWidth(120)
        self.oneshotButton.setText('One Shot Alignment')

        self.manualButton = QtWidgets.QPushButton()
        self.manualButton.setFixedHeight(40)
        self.manualButton.setFixedWidth(120)
        self.manualButton.setText('Manual Alignment')

        self.EtalonTunerLabel = ClickableLabel('Etalon Tuner: ')
        self.EtalonTunerBox = SuperSpinBox(self.etalon_range,
                                           self.etalon_units,
                                           self.etalon_digits)
        self.EtalonTunerBox.setFixedHeight(self.spinbox_height)
        self.EtalonTunerBox.setFixedWidth(self.spinbox_width)

        self.ResonatorTunerLabel = ClickableLabel('Resonator Tuner: ')
        self.ResonatorTunerBox = SuperSpinBox(self.resonator_range,
                                              self.resonator_units,
                                              self.resonator_digits)
        self.ResonatorTunerBox.setFixedHeight(self.spinbox_height)
        self.ResonatorTunerBox.setFixedWidth(self.spinbox_width)

        self.ResonatorFineTunerLabel = ClickableLabel(
            'Resonator Fine \n Tuner:')
        self.ResonatorFineTunerLabel.setAlignment(QtCore.Qt.AlignRight
                                                  | QtCore.Qt.AlignVCenter)
        self.ResonatorFineTunerBox = SuperSpinBox(self.fineresonator_range,
                                                  self.fineresonator_units,
                                                  self.fineresonator_digits)
        self.ResonatorFineTunerBox.setFixedHeight(self.spinbox_height)
        self.ResonatorFineTunerBox.setFixedWidth(self.spinbox_width)

        self.XLabel = ClickableLabel('X Tuner: ')
        self.XBox = SuperSpinBox(self.xy_range, self.xy_units, self.xy_digits)
        self.XBox.setFixedHeight(self.spinbox_height)
        self.XBox.setFixedWidth(self.spinbox_width)

        self.YLabel = ClickableLabel('Y Tuner: ')
        self.YBox = SuperSpinBox(self.xy_range, self.xy_units, self.xy_digits)
        self.YBox.setFixedHeight(self.spinbox_height)
        self.YBox.setFixedWidth(self.spinbox_width)

        self.wavelengthLabel = ClickableLabel(
            'Preset wavelength: \n (rough tune)')
        self.wavelengthLabel.setAlignment(QtCore.Qt.AlignRight
                                          | QtCore.Qt.AlignVCenter)
        self.wavelengthBox = SuperSpinBox(self.wl_range, self.wl_units,
                                          self.wl_digits)
        self.wavelengthBox.setFixedHeight(self.spinbox_height)
        self.wavelengthBox.setFixedWidth(self.spinbox_width)

        self.EtalonPDLabel = ClickableLabel('Etalon PD DC:')
        self.EtalonPDLabel.setAlignment(QtCore.Qt.AlignRight
                                        | QtCore.Qt.AlignVCenter)
        self.EtalonPDBox = SuperSpinBox(self.PD_range, self.PD_units,
                                        self.PD_digits)
        self.EtalonPDBox.setFixedHeight(self.spinbox_height)
        self.EtalonPDBox.setFixedWidth(self.spinbox_width)
        self.EtalonPDBox.setReadOnly(True)

        self.OutputPDLabel = ClickableLabel('Output PD:')
        self.OutputPDLabel.setAlignment(QtCore.Qt.AlignRight
                                        | QtCore.Qt.AlignVCenter)
        self.OutputPDBox = SuperSpinBox(self.PD_range, self.PD_units,
                                        self.PD_digits)
        self.OutputPDBox.setFixedHeight(self.spinbox_height)
        self.OutputPDBox.setFixedWidth(self.spinbox_width)
        self.OutputPDBox.setReadOnly(True)

        self.layout = QtWidgets.QGridLayout()
        self.layout.addWidget(self.nameLabel, 1, 0, 1, 6,
                              QtCore.Qt.AlignHCenter)
        self.layout.addWidget(self.statusLabel, 2, 0, 2, 1,
                              QtCore.Qt.AlignRight)
        self.layout.addWidget(self.statusText, 2, 1, 2, 5)
        self.layout.addWidget(self.wlmLabel, 4, 0, 2, 1, QtCore.Qt.AlignRight)
        self.layout.addWidget(self.wlmText, 4, 1, 2, 5)
        self.layout.addWidget(self.lockButton, 6, 0, 2, 2,
                              QtCore.Qt.AlignHCenter)
        self.layout.addWidget(self.oneshotButton, 6, 2, 2, 2,
                              QtCore.Qt.AlignHCenter)
        self.layout.addWidget(self.manualButton, 6, 4, 2, 2,
                              QtCore.Qt.AlignHCenter)
        self.layout.addWidget(self.EtalonTunerLabel, 8, 0, 2, 1,
                              QtCore.Qt.AlignRight)
        self.layout.addWidget(self.EtalonTunerBox, 8, 1, 2, 2,
                              QtCore.Qt.AlignLeft)
        self.layout.addWidget(self.XLabel, 8, 3, 2, 1, QtCore.Qt.AlignRight)
        self.layout.addWidget(self.XBox, 8, 4, 2, 2, QtCore.Qt.AlignLeft)
        self.layout.addWidget(self.ResonatorTunerLabel, 10, 0, 2, 1,
                              QtCore.Qt.AlignRight)
        self.layout.addWidget(self.ResonatorTunerBox, 10, 1, 2, 2,
                              QtCore.Qt.AlignLeft)
        self.layout.addWidget(self.YLabel, 10, 3, 2, 1, QtCore.Qt.AlignRight)
        self.layout.addWidget(self.YBox, 10, 4, 2, 2, QtCore.Qt.AlignLeft)
        self.layout.addWidget(self.ResonatorFineTunerLabel, 12, 0, 2, 1,
                              QtCore.Qt.AlignRight)
        self.layout.addWidget(self.ResonatorFineTunerBox, 12, 1, 2, 2,
                              QtCore.Qt.AlignLeft)
        self.layout.addWidget(self.wavelengthLabel, 12, 3, 2, 1,
                              QtCore.Qt.AlignRight)
        self.layout.addWidget(self.wavelengthBox, 12, 4, 2, 2,
                              QtCore.Qt.AlignLeft)
        self.layout.addWidget(self.EtalonPDLabel, 14, 0, 2, 1,
                              QtCore.Qt.AlignRight)
        self.layout.addWidget(self.EtalonPDBox, 14, 1, 2, 2,
                              QtCore.Qt.AlignLeft)
        self.layout.addWidget(self.OutputPDLabel, 14, 3, 2, 1,
                              QtCore.Qt.AlignRight)
        self.layout.addWidget(self.OutputPDBox, 14, 4, 2, 2,
                              QtCore.Qt.AlignLeft)

        self.layout.setContentsMargins(5, 5, 5, 5)
        self.layout.setSpacing(5)
        self.setLayout(self.layout)
        self.setFixedSize(450, 450)
Example #11
0
    def populate(self):
        self.andorLabel = ClickableLabel('<b>' + 'IXon - 888' + '</b>')

        self.tempLabel = ClickableLabel('Temp: ')
        self.tempBox = QtWidgets.QDoubleSpinBox()
        self.tempBox.setRange(-150, 50)
        self.tempBox.setReadOnly(True)
        self.tempBox.setButtonSymbols(QtWidgets.QAbstractSpinBox.NoButtons)
        self.tempBox.setDecimals(0)
        self.tempBox.setSuffix(' \u00b0 C')
        self.tempBox.setFixedWidth(80)

        self.emgainLabel = ClickableLabel('EM Gain: ')
        self.emgainBox = QtWidgets.QDoubleSpinBox()
        self.emgainBox.setRange(0, 300)
        self.emgainBox.setReadOnly(True)
        self.emgainBox.setButtonSymbols(QtWidgets.QAbstractSpinBox.NoButtons)
        self.emgainBox.setDecimals(0)
        self.emgainBox.setFixedWidth(80)

        self.exposureLabel = ClickableLabel('Exposure Time: ')
        self.exposureBox = SuperSpinBox(self.timeRange, self.timeDisplayUnits,
                                        self.timeDigits)
        self.exposureBox.setReadOnly(True)
        self.exposureBox.setFixedWidth(80)

        self.accumulationLabel = ClickableLabel('Accumulation Time: ')
        self.accumulationBox = SuperSpinBox(self.timeRange,
                                            self.timeDisplayUnits,
                                            self.timeDigits)
        self.accumulationBox.setReadOnly(True)
        self.accumulationBox.setFixedWidth(80)

        self.kineticLabel = ClickableLabel('Kinetic Time: ')
        self.kineticBox = SuperSpinBox(self.timeRange, self.timeDisplayUnits,
                                       self.timeDigits)
        self.kineticBox.setReadOnly(True)
        self.kineticBox.setFixedWidth(80)

        self.readoutLabel = ClickableLabel('Readout Time: ')
        self.readoutBox = SuperSpinBox(self.timeRange, self.timeDisplayUnits,
                                       self.timeDigits)
        self.readoutBox.setReadOnly(True)
        self.readoutBox.setFixedWidth(80)

        self.imageView = pg.ImageView()
        self.imageView.setColorMap(MyColorMap)
        self.imageView.show()

        self.layout = QtWidgets.QGridLayout()
        self.layout.setSpacing(5)
        self.layout.setContentsMargins(5, 5, 5, 5)

        self.layout.addWidget(self.andorLabel, 1, 0, 1, 2,
                              QtCore.Qt.AlignCenter)
        self.layout.addWidget(self.tempLabel, 1, 2, 1, 1, QtCore.Qt.AlignRight)
        self.layout.addWidget(self.tempBox, 1, 3, 1, 1)
        self.layout.addWidget(self.emgainLabel, 1, 4, 1, 1,
                              QtCore.Qt.AlignRight)
        self.layout.addWidget(self.emgainBox, 1, 5, 1, 1)
        self.layout.addWidget(self.exposureLabel, 1, 6, 1, 1,
                              QtCore.Qt.AlignRight)
        self.layout.addWidget(self.exposureBox, 1, 7, 1, 1)
        self.layout.addWidget(self.accumulationLabel, 1, 8, 1, 1,
                              QtCore.Qt.AlignRight)
        self.layout.addWidget(self.accumulationBox, 1, 9, 1, 1)
        self.layout.addWidget(self.kineticLabel, 1, 10, 1, 1,
                              QtCore.Qt.AlignRight)
        self.layout.addWidget(self.kineticBox, 1, 11, 1, 1)
        self.layout.addWidget(self.readoutLabel, 1, 12, 1, 1,
                              QtCore.Qt.AlignRight)
        self.layout.addWidget(self.readoutBox, 1, 13, 1, 1)
        self.layout.addWidget(self.imageView, 2, 0, 15, 15)
        self.setLayout(self.layout)
        # self.setFixedSize(1200, 800)
        self.setWindowTitle('{} - {} - client'.format(self.servername,
                                                      self.name))
Example #12
0
    def populateGUI(self):
        self.nameLabel = ClickableLabel('<b>' + self.name + '</b>')
        
        self.beatnoteLabel = ClickableLabel('Beatnote Freq: ')
        self.beatnoteBox = SuperSpinBox(self.device._frequency_range, 
                                          self.frequencyDisplayUnits, 
                                          self.frequencyDigits)
        self.beatnoteBox.setFixedWidth(self.spinboxWidth)
        
        self.isotopeLabel = ClickableLabel('Choose isotope: ')
        self.isotopeBox = QtWidgets.QComboBox()
        isotope = 'Sr-88'
        isotope_list = ['Sr-87, F=11/2', 'Sr-87, F=9/2', 'Sr-86', 'Sr-84']
        
        self.isotopeBox.addItem(isotope)
        self.isotopeBox.addItems(isotope_list)
        
        self.transitionfreqLabel = ClickableLabel('1S0-3P1 freq: ')
        self.transitionfreqBox = QtWidgets.QDoubleSpinBox()
        self.transitionfreqBox.setRange(0, 3e9)
        self.transitionfreqBox.setReadOnly(True)
        self.transitionfreqBox.setButtonSymbols(QtWidgets.QAbstractSpinBox.NoButtons)
        self.transitionfreqBox.setDecimals(2)
        self.transitionfreqBox.setGroupSeparatorShown(True)
        self.transitionfreqBox.setSuffix(' MHz')
        
        self.redafreqLabel = ClickableLabel('Red-A freq: ')
        self.redafreqBox = QtWidgets.QDoubleSpinBox()
        self.redafreqBox.setRange(0, 3e9)
        self.redafreqBox.setReadOnly(True)
        self.redafreqBox.setButtonSymbols(QtWidgets.QAbstractSpinBox.NoButtons)
        self.redafreqBox.setDecimals(2)
        self.transitionfreqBox.setGroupSeparatorShown(True)
        self.transitionfreqBox.setSuffix(' MHz')
        
        # CH 2
        self.name2Label = ClickableLabel('<b>' + 'CH2' + '</b>')
        self.state2Button = QtWidgets.QPushButton()
        self.state2Button.setCheckable(True)
        
        self.layout = QtWidgets.QGridLayout() 
        self.layout.addWidget(self.nameLabel, 0, 0, 1, 2, 
                              QtCore.Qt.AlignCenter)
        
        self.layout.addWidget(self.beatnoteLabel, 1, 0, 1, 1,
                              QtCore.Qt.AlignRight)
        self.layout.addWidget(self.beatnoteBox, 1, 1)
        
        self.layout.addWidget(self.isotopeLabel, 2, 0, 1, 1,
                              QtCore.Qt.AlignRight)
        self.layout.addWidget(self.isotopeBox, 2, 1)
        
        self.layout.addWidget(self.transitionfreqLabel, 3, 0, 1, 1,
                              QtCore.Qt.AlignRight)
        self.layout.addWidget(self.transitionfreqBox, 3, 1)        

        self.layout.addWidget(self.redafreqLabel, 4, 0, 1, 1,
                              QtCore.Qt.AlignRight)
        self.layout.addWidget(self.redafreqBox, 4, 1)   
        
        self.layout.addWidget(self.name2Label, 5, 0, 1, 1, 
                              QtCore.Qt.AlignRight)
        self.layout.addWidget(self.state2Button, 5, 1)
        
        self.setLayout(self.layout)

        self.setWindowTitle(self.name)
        self.setFixedSize(120 + self.spinboxWidth, 170)
        
        self.connectSignals()
        self.reactor.callInThread(self.getAll)
Example #13
0
 def populate(self):
     self.nameLabel =  ClickableLabel('<b> PID Settings </b>')
     
     self.loadButton = QtWidgets.QPushButton()
     self.loadButton.setText('Load Settings')
     self.loadButton.setFixedHeight(40)
     self.loadButton.setFixedWidth(100)
     self.saveButton = QtWidgets.QPushButton()
     self.saveButton.setText('Save Settings')
     self.saveButton.setFixedHeight(40)
     self.saveButton.setFixedWidth(self.spinbox_width*1.5)
     
     self.setpointLabel = ClickableLabel('Set point: ')
     self.setpointBox = SuperSpinBox(self.setpoint_range, self.setpoint_units,
                                     self.setpoint_digits)
     self.setpointBox.setFixedHeight(self.spinbox_height)
     self.setpointBox.setFixedWidth(self.spinbox_width*1.5)
 
     self.offsetLabel = ClickableLabel('Offset: ')
     self.offsetBox = SuperSpinBox(self.offset_range, self.offset_units,
                                     self.offset_digits)
     self.offsetBox.setFixedHeight(self.spinbox_height)
     self.offsetBox.setFixedWidth(self.spinbox_width*1.5)
     
     self.unitsLabel = ClickableLabel('<b> Setpoint Units: </b>')
     self.unitsBox = QtWidgets.QComboBox()
     self.unitsBox.addItems(self.units_list)
     
     self.channelLabel = ClickableLabel('<b> WLM Channel: </b>')
     self.channelBox = QtWidgets.QComboBox()
     self.channelBox.addItems(self.channel_list)
     
     self.OverallGainLabel = ClickableLabel('Overall Gain: ')
     self.OverallGainBox = SuperSpinBox(self.gain_range, self.gain_units,
                                     4)
     self.OverallGainBox.setFixedHeight(self.spinbox_height)
     self.OverallGainBox.setFixedWidth(self.spinbox_width)
     self.PGainLabel = ClickableLabel('P Gain: ')
     self.PGainBox = SuperSpinBox(self.gain_range, self.gain_units,
                                     self.gain_digits)
     self.PGainBox.setFixedHeight(self.spinbox_height)
     self.PGainBox.setFixedWidth(self.spinbox_width)
     self.IGainLabel = ClickableLabel('I Gain: ')
     self.IGainBox = SuperSpinBox(self.gain_range, self.gain_units,
                                     self.gain_digits)
     self.IGainBox.setFixedHeight(self.spinbox_height)
     self.IGainBox.setFixedWidth(self.spinbox_width)
     self.DGainLabel = ClickableLabel('D Gain: ')
     self.DGainBox = SuperSpinBox(self.gain_range, self.gain_units,
                                     self.gain_digits)
     self.DGainBox.setFixedHeight(self.spinbox_height)
     self.DGainBox.setFixedWidth(self.spinbox_width)
     
     
     self.layout = QtWidgets.QGridLayout()
     self.layout.addWidget(self.nameLabel, 1, 0, 3, 1, 
                           QtCore.Qt.AlignHCenter)
     self.layout.addWidget(self.loadButton, 1, 1, 3, 2, 
                           QtCore.Qt.AlignHCenter)
     self.layout.addWidget(self.saveButton, 1, 3, 3, 2, 
                           QtCore.Qt.AlignHCenter)
     
     self.layout.addWidget(self.setpointLabel, 4, 0, 3, 1, 
                           QtCore.Qt.AlignRight)
     self.layout.addWidget(self.setpointBox, 4, 1, 3, 3, 
                           QtCore.Qt.AlignLeft)
     self.layout.addWidget(self.offsetLabel, 7, 0, 3, 1, 
                           QtCore.Qt.AlignRight)
     self.layout.addWidget(self.offsetBox, 7, 1, 3, 3, 
                           QtCore.Qt.AlignLeft)
     
     self.layout.addWidget(self.unitsLabel, 4, 3, 2, 2,
                           QtCore.Qt.AlignHCenter)
     self.layout.addWidget(self.unitsBox, 6, 3, 2, 2,
                           QtCore.Qt.AlignHCenter)
     self.layout.addWidget(self.channelLabel, 8, 3, 2, 2,
                           QtCore.Qt.AlignHCenter)
     self.layout.addWidget(self.channelBox, 10, 3, 2, 2,
                           QtCore.Qt.AlignHCenter)
     
     self.layout.addWidget(self.OverallGainLabel, 10, 0, 3, 1, 
                           QtCore.Qt.AlignRight)
     self.layout.addWidget(self.OverallGainBox, 10, 1, 3, 1,
                           QtCore.Qt.AlignLeft)
     self.layout.addWidget(self.PGainLabel, 13, 0, 3, 1, 
                           QtCore.Qt.AlignRight)
     self.layout.addWidget(self.PGainBox, 13, 1, 3, 1,
                           QtCore.Qt.AlignLeft)
     self.layout.addWidget(self.IGainLabel, 16, 0, 3, 1, 
                           QtCore.Qt.AlignRight)
     self.layout.addWidget(self.IGainBox, 16, 1, 3, 1,
                           QtCore.Qt.AlignLeft)
     self.layout.addWidget(self.DGainLabel, 19, 0, 3, 1, 
                           QtCore.Qt.AlignRight)
     self.layout.addWidget(self.DGainBox, 19, 1, 3, 1,
                           QtCore.Qt.AlignLeft)
     
     self.layout.setContentsMargins(5, 5, 5, 5)
     self.layout.setSpacing(10)
     self.setLayout(self.layout)
     self.setFixedSize(400, 300)
    def populateGUI(self):
        self.nameLabel = ClickableLabel('<b>' + self.name + '</b>')

        self.shape1Label = ClickableLabel('679 nm :')

        self.shape1Button = QtWidgets.QPushButton()
        self.shape1Button.setCheckable(True)

        self.dc1Label = ClickableLabel('DC 1 Voltage: ')
        self.dc1Box = SuperSpinBox(self.device._dc_v_range,
                                   self.voltageDisplayUnits,
                                   self.voltageDigits)
        self.dc1Box.setFixedWidth(self.spinboxWidth)

        self.ramp1Label = ClickableLabel('Ramp 1 Freq : ')
        self.ramp1AmpLabel = ClickableLabel('Ramp 1 Amp :')
        self.ramp1OffsetLabel = ClickableLabel('Ramp 1 Offset :')

        self.ramp1FreqBox = SuperSpinBox(self.device._ramp_freq_range,
                                         self.frequencyDisplayUnits,
                                         self.frequencyDigits)
        self.ramp1FreqBox.setFixedWidth(self.spinboxWidth)

        self.ramp1AmpBox = SuperSpinBox(self.device._dc_v_range,
                                        self.voltageDisplayUnits,
                                        self.voltageDigits)
        self.ramp1AmpBox.setFixedWidth(self.spinboxWidth)

        self.ramp1OffsetBox = SuperSpinBox(self.device._dc_v_range,
                                           self.voltageDisplayUnits,
                                           self.voltageDigits)
        self.ramp1OffsetBox.setFixedWidth(self.spinboxWidth)

        self.shape2Label = ClickableLabel('707 nm :')

        self.shape2Button = QtWidgets.QPushButton()
        self.shape2Button.setCheckable(True)

        self.dc2Label = ClickableLabel('DC 2 Voltage: ')
        self.dc2Box = SuperSpinBox(self.device._dc_v_range,
                                   self.voltageDisplayUnits,
                                   self.voltageDigits)
        self.dc2Box.setFixedWidth(self.spinboxWidth)

        self.ramp2Label = ClickableLabel('Ramp 2 Freq : ')
        self.ramp2AmpLabel = ClickableLabel('Ramp 2 Amp :')
        self.ramp2OffsetLabel = ClickableLabel('Ramp 2 Offset :')

        self.ramp2FreqBox = SuperSpinBox(self.device._ramp_freq_range,
                                         self.frequencyDisplayUnits,
                                         self.frequencyDigits)
        self.ramp2FreqBox.setFixedWidth(self.spinboxWidth)

        self.ramp2AmpBox = SuperSpinBox(self.device._dc_v_range,
                                        self.voltageDisplayUnits,
                                        self.voltageDigits)
        self.ramp2AmpBox.setFixedWidth(self.spinboxWidth)

        self.ramp2OffsetBox = SuperSpinBox(self.device._dc_v_range,
                                           self.voltageDisplayUnits,
                                           self.voltageDigits)
        self.ramp2OffsetBox.setFixedWidth(self.spinboxWidth)

        self.layout = QtWidgets.QGridLayout()
        self.layout.addWidget(self.nameLabel, 0, 0, 1, 2,
                              QtCore.Qt.AlignCenter)

        self.layout.addWidget(self.shape1Label, 1, 0, 1, 1,
                              QtCore.Qt.AlignRight)
        self.layout.addWidget(self.shape1Button, 1, 1)

        self.layout.addWidget(self.dc1Label, 2, 0, 1, 1, QtCore.Qt.AlignRight)
        self.layout.addWidget(self.dc1Box, 2, 1)

        self.layout.addWidget(self.ramp1Label, 3, 0, 1, 1,
                              QtCore.Qt.AlignRight)
        self.layout.addWidget(self.ramp1FreqBox, 3, 1)

        self.layout.addWidget(self.ramp1AmpLabel, 4, 0, 1, 1,
                              QtCore.Qt.AlignRight)
        self.layout.addWidget(self.ramp1AmpBox, 4, 1)
        self.layout.addWidget(self.ramp1OffsetLabel, 5, 0, 1, 1,
                              QtCore.Qt.AlignRight)
        self.layout.addWidget(self.ramp1OffsetBox, 5, 1)

        self.layout.addWidget(self.shape2Label, 6, 0, 1, 1,
                              QtCore.Qt.AlignRight)
        self.layout.addWidget(self.shape2Button, 6, 1)

        self.layout.addWidget(self.dc2Label, 7, 0, 1, 1, QtCore.Qt.AlignRight)
        self.layout.addWidget(self.dc2Box, 7, 1)

        self.layout.addWidget(self.ramp2Label, 8, 0, 1, 1,
                              QtCore.Qt.AlignRight)
        self.layout.addWidget(self.ramp2FreqBox, 8, 1)

        self.layout.addWidget(self.ramp2AmpLabel, 9, 0, 1, 1,
                              QtCore.Qt.AlignRight)
        self.layout.addWidget(self.ramp2AmpBox, 9, 1)
        self.layout.addWidget(self.ramp2OffsetLabel, 10, 0, 1, 1,
                              QtCore.Qt.AlignRight)
        self.layout.addWidget(self.ramp2OffsetBox, 10, 1)

        self.setLayout(self.layout)

        self.setWindowTitle(self.name)
        self.setFixedSize(120 + self.spinboxWidth, 300)

        self.connectSignals()
        self.reactor.callInThread(self.getAll)
Example #15
0
    def populateGUI(self):
        self.AFGnameLabel = ClickableLabel('<b> RED MOT AFG </b>')

        self.ch1Label = ClickableLabel('CH1: ')
        self.ch1Button = QtWidgets.QPushButton()
        self.ch1Button.setText('Configure')

        self.scale1Label = ClickableLabel('Scale 1: ')
        self.scale1Box = SuperSpinBox(self.device.scaleRange,
                                      self.scaleDisplayUnits, self.scaleDigits)
        self.scale1Box.setFixedWidth(self.spinboxWidth)

        self.offset1Label = ClickableLabel('Offset 1: ')
        self.offset1Box = SuperSpinBox(self.device.offsetRange,
                                       self.offsetDisplayUnits,
                                       self.offsetDigits)
        self.offset1Box.setFixedWidth(self.spinboxWidth)

        self.ch2Label = ClickableLabel('CH2: ')
        self.ch2Button = QtWidgets.QPushButton()
        self.ch2Button.setText('Configure')

        self.scale2Label = ClickableLabel('Scale 2: ')
        self.scale2Box = SuperSpinBox(self.device.scaleRange,
                                      self.scaleDisplayUnits, self.scaleDigits)
        self.scale2Box.setFixedWidth(self.spinboxWidth)

        self.offset2Label = ClickableLabel('Offset 2: ')
        self.offset2Box = SuperSpinBox(self.device.offsetRange,
                                       self.offsetDisplayUnits,
                                       self.offsetDigits)
        self.offset2Box.setFixedWidth(self.spinboxWidth)

        # lAYOUT #
        self.layout = QtWidgets.QGridLayout()
        self.layout.addWidget(self.AFGnameLabel, 0, 0, 1, 2,
                              QtCore.Qt.AlignHCenter)

        self.layout.addWidget(self.ch1Label, 1, 0, 1, 1, QtCore.Qt.AlignRight)
        self.layout.addWidget(self.ch1Button, 1, 1)
        self.layout.addWidget(self.scale1Label, 2, 0, 1, 1,
                              QtCore.Qt.AlignRight)
        self.layout.addWidget(self.scale1Box, 2, 1)
        self.layout.addWidget(self.offset1Label, 3, 0, 1, 1,
                              QtCore.Qt.AlignRight)
        self.layout.addWidget(self.offset1Box, 3, 1)

        self.layout.addWidget(self.ch2Label, 4, 0, 1, 1, QtCore.Qt.AlignRight)
        self.layout.addWidget(self.ch2Button, 4, 1)
        self.layout.addWidget(self.scale2Label, 5, 0, 1, 1,
                              QtCore.Qt.AlignRight)
        self.layout.addWidget(self.scale2Box, 5, 1)
        self.layout.addWidget(self.offset2Label, 6, 0, 1, 1,
                              QtCore.Qt.AlignRight)
        self.layout.addWidget(self.offset2Box, 6, 1)

        self.setWindowTitle(self.name)
        self.setLayout(self.layout)
        self.setFixedSize(180, 200)

        self.reactor.callInThread(self.getAll)