Exemple #1
0
    def __init__(self, parent):
        QtGui.QDialog.__init__(self, parent)
        self.parent = parent
        self.setMinimumWidth(400)
        self.setMinimumHeight(400)
        self.setWindowTitle('Select Instrument')

        refreshButton = QtGui.QPushButton('Refresh Available Instrument List')
        acceptButton = QtGui.QPushButton(Shared.btn_label('confirm'))
        cancelButton = QtGui.QPushButton(Shared.btn_label('reject'))

        self.availableInst = QtGui.QLabel()
        instList, instStr = api_gen.list_inst()
        self.availableInst.setText(instStr)

        selInst = QtGui.QWidget()
        selInstLayout = QtGui.QFormLayout()
        self.selSyn = QtGui.QComboBox()
        self.selSyn.addItems(['N.A.'])
        self.selSyn.addItems(instList)
        self.selLockin = QtGui.QComboBox()
        self.selLockin.addItems(['N.A.'])
        self.selLockin.addItems(instList)
        self.selScope = QtGui.QComboBox()
        self.selScope.addItems(['N.A.'])
        self.selScope.addItems(instList)
        self.selMotor = QtGui.QComboBox()
        self.selMotor.addItems(['N.A.'])
        self.selMotor.addItems(instList)
        self.selPressure = QtGui.QComboBox()
        self.selPressure.addItems(['N.A.'])
        self.selPressure.addItems(instList)
        selInstLayout.addRow(QtGui.QLabel('Synthesizer'), self.selSyn)
        selInstLayout.addRow(QtGui.QLabel('Lock-in'), self.selLockin)
        selInstLayout.addRow(QtGui.QLabel('Oscilloscope'), self.selScope)
        selInstLayout.addRow(QtGui.QLabel('Step Motor'), self.selMotor)
        selInstLayout.addRow(QtGui.QLabel('CENTER TWO Pressure Readout'),
                             self.selPressure)
        selInst.setLayout(selInstLayout)

        # Set main layout
        mainLayout = QtGui.QGridLayout()
        mainLayout.addWidget(self.availableInst, 0, 0, 1, 2)
        mainLayout.addWidget(refreshButton, 1, 0, 1, 2)
        mainLayout.addWidget(selInst, 2, 0, 1, 2)
        mainLayout.addWidget(cancelButton, 3, 0)
        mainLayout.addWidget(acceptButton, 3, 1)

        self.setLayout(mainLayout)

        refreshButton.clicked.connect(self.refresh)
        cancelButton.clicked.connect(self.reject)
        acceptButton.clicked.connect(self.accept)
Exemple #2
0
    def __init__(self, parent):
        QtGui.QDialog.__init__(self, parent)
        self.parent = parent
        self.setMinimumWidth(400)
        self.setMinimumHeight(400)
        self.setWindowTitle('Close Instrument')

        inst = QtGui.QWidget()
        self.synToggle = QtGui.QCheckBox()
        self.liaToggle = QtGui.QCheckBox()
        self.pciToggle = QtGui.QCheckBox()
        self.motorToggle = QtGui.QCheckBox()
        self.pressureToggle = QtGui.QCheckBox()

        instLayout = QtGui.QFormLayout()
        instLayout.addRow(QtGui.QLabel('Instrument'), QtGui.QLabel('Status'))
        # only list currently connected instruments
        if self.parent.synHandle:
            self.synToggle.setCheckState(True)
            instLayout.addRow(QtGui.QLabel('Synthesizer'), self.synToggle)
        else:
            self.synToggle.setCheckState(False)

        if self.parent.liaHandle:
            self.liaToggle.setCheckState(True)
            instLayout.addRow(QtGui.QLabel('Lockin'), self.liaToggle)
        else:
            self.liaToggle.setCheckState(False)

        if self.parent.pciHandle:
            self.pciToggle.setCheckState(True)
            instLayout.addRow(QtGui.QLabel('Oscilloscope'), self.pciToggle)
        else:
            self.pciToggle.setCheckState(False)

        if self.parent.motorHandle:
            self.motorToggle.setCheckState(True)
            instLayout.addRow(QtGui.QLabel('Motor'), self.motorToggle)
        else:
            self.motorToggle.setCheckState(False)

        if self.parent.pressureHandle:
            self.pressureToggle.setCheckState(True)
            instLayout.addRow(QtGui.QLabel('Pressure Readout'),
                              self.pressureToggle)
        else:
            self.pressureToggle.setCheckState(False)

        inst.setLayout(instLayout)

        okButton = QtGui.QPushButton(Shared.btn_label('complete'))
        mainLayout = QtGui.QVBoxLayout()
        mainLayout.addWidget(inst)
        mainLayout.addWidget(
            QtGui.QLabel(
                'No command will be sent before you hit the accept button'))
        mainLayout.addWidget(okButton)
        self.setLayout(mainLayout)

        okButton.clicked.connect(self.accept)
Exemple #3
0
    def display(self):

        self.acceptButton.setText(Shared.btn_label('accept'))

        if self.parent.synHandle:
            self.print_info()
            self.instGroup.show()
            self.rfGroup.show()
            self.modGroup.show()
        else:
            self.instGroup.hide()
            self.rfGroup.hide()
            self.modGroup.hide()

        self.exec_()
Exemple #4
0
    def display(self):

        self.acceptButton.setText(Shared.btn_label('accept'))

        if self.parent.liaHandle:
            self.print_info()
            self.instGroup.show()
            self.refGroup.show()
            self.gainGroup.show()
            self.inputGroup.show()
            self.outputGroup.show()
        else:
            self.instGroup.hide()
            self.refGroup.hide()
            self.gainGroup.hide()
            self.inputGroup.hide()
            self.outputGroup.hide()

        self.exec_()
Exemple #5
0
 def save_data(self):
     try:
         filename, _ = QtGui.QFileDialog.getSaveFileName(
             self, 'Save Data', './test_pressure.txt', 'Data File (*.txt)')
         if filename:
             np.savetxt(
                 filename,
                 self.data,
                 comments='#',
                 fmt=['%g', '%.3e'],
                 header=
                 'Data collection starts at {:s} \ntime({:s}) pressure({:s})'
                 .format(
                     self.data_start_time.strftime(
                         '%I:%M:%S %p, %m-%d-%Y (%a)'),
                     self.updateRateUnitSel.currentText(),
                     self.currentUnit.text()))
         else:
             pass
     except AttributeError:
         msg = Shared.MsgError(self, Shared.btn_label('error'),
                               'No data has been collected!')
         msg.exec_()
Exemple #6
0
    def __init__(self, parent):
        QtGui.QDialog.__init__(self, parent)
        self.parent = parent
        self.setMinimumWidth(600)
        self.setMinimumHeight(400)
        self.setWindowTitle('Lockin Amplifier Settings')

        self.instGroup = QtGui.QGroupBox()
        self.refGroup = QtGui.QGroupBox()
        self.inputGroup = QtGui.QGroupBox()
        self.gainGroup = QtGui.QGroupBox()
        self.outputGroup = QtGui.QGroupBox()

        self.instGroup.setTitle('Instrument Session')
        self.instNameLabel = QtGui.QLabel()
        self.instInterfaceLabel = QtGui.QLabel()
        self.instInterfaceNumLabel = QtGui.QLabel()
        instGroupLayout = QtGui.QFormLayout()
        instGroupLayout.addRow(QtGui.QLabel('Instrument Name'),
                               self.instNameLabel)
        instGroupLayout.addRow(QtGui.QLabel('Interface Type'),
                               self.instInterfaceLabel)
        instGroupLayout.addRow(QtGui.QLabel('Interface Number'),
                               self.instInterfaceNumLabel)
        self.instGroup.setLayout(instGroupLayout)

        self.refGroup.setTitle('Reference and Phase')
        self.refSrcLabel = QtGui.QLabel()
        self.refFreqLabel = QtGui.QLabel()
        self.refHarmLabel = QtGui.QLabel()
        self.refPhaseLabel = QtGui.QLabel()
        refGroupLayout = QtGui.QFormLayout()
        refGroupLayout.addRow(QtGui.QLabel('Reference Source'),
                              self.refSrcLabel)
        refGroupLayout.addRow(QtGui.QLabel('Reference Freq'),
                              self.refFreqLabel)
        refGroupLayout.addRow(QtGui.QLabel('Harmonics'), self.refHarmLabel)
        refGroupLayout.addRow(QtGui.QLabel('Phase'), self.refPhaseLabel)
        self.refGroup.setLayout(refGroupLayout)

        self.inputGroup.setTitle('Input and Filter')
        self.inputConfigLabel = QtGui.QLabel()
        self.inputGroundingLabel = QtGui.QLabel()
        self.inputCoupleLabel = QtGui.QLabel()
        self.inputFilterLabel = QtGui.QLabel()
        inputGroupLayout = QtGui.QFormLayout()
        inputGroupLayout.addRow(QtGui.QLabel('Input Config'),
                                self.inputConfigLabel)
        inputGroupLayout.addRow(QtGui.QLabel('Input Grounding'),
                                self.inputGroundingLabel)
        inputGroupLayout.addRow(QtGui.QLabel('Input Coupling'),
                                self.inputCoupleLabel)
        inputGroupLayout.addRow(QtGui.QLabel('Input Filter'),
                                self.inputFilterLabel)
        self.inputGroup.setLayout(inputGroupLayout)

        self.gainGroup.setTitle('Gain')
        self.gainSensLabel = QtGui.QLabel()
        self.gainReserveLabel = QtGui.QLabel()
        self.gainTCLabel = QtGui.QLabel()
        self.lpSlopeLabel = QtGui.QLabel()
        gainGroupLayout = QtGui.QFormLayout()
        gainGroupLayout.addRow(QtGui.QLabel('Sensitivity'), self.gainSensLabel)
        gainGroupLayout.addRow(QtGui.QLabel('Time Constant'), self.gainTCLabel)
        gainGroupLayout.addRow(QtGui.QLabel('Reserve'), self.gainReserveLabel)
        gainGroupLayout.addRow(QtGui.QLabel('Low-pass Filter Slope'),
                               self.lpSlopeLabel)
        self.gainGroup.setLayout(gainGroupLayout)

        self.outputGroup.setTitle('Display and Output')
        self.outputDisp1Label = QtGui.QLabel()
        self.outputDisp2Label = QtGui.QLabel()
        self.outputFront1Label = QtGui.QLabel()
        self.outputFront2Label = QtGui.QLabel()
        self.outputSRateLabel = QtGui.QLabel()
        outputGroupLayout = QtGui.QGridLayout()
        outputGroupLayout.addWidget(QtGui.QLabel('Chanel 1'), 0, 1)
        outputGroupLayout.addWidget(QtGui.QLabel('Chanel 2'), 0, 2)
        outputGroupLayout.addWidget(QtGui.QLabel('Display Output'), 1, 0)
        outputGroupLayout.addWidget(self.outputDisp1Label, 1, 1)
        outputGroupLayout.addWidget(self.outputDisp2Label, 1, 2)
        outputGroupLayout.addWidget(QtGui.QLabel('Front Panel Output'), 2, 0)
        outputGroupLayout.addWidget(self.outputFront1Label, 2, 1)
        outputGroupLayout.addWidget(self.outputFront2Label, 2, 2)
        outputGroupLayout.addWidget(QtGui.QLabel('Sampling Rate'), 3, 0)
        outputGroupLayout.addWidget(self.outputSRateLabel, 3, 1, 1, 2)
        self.outputGroup.setLayout(outputGroupLayout)

        self.refreshButton = QtGui.QPushButton('Manual Refresh')
        self.acceptButton = QtGui.QPushButton(Shared.btn_label('accept'))

        mainLayout = QtGui.QGridLayout()
        mainLayout.addWidget(self.instGroup, 0, 0, 1, 6)
        mainLayout.addWidget(self.inputGroup, 1, 0, 1, 3)
        mainLayout.addWidget(self.outputGroup, 1, 3, 1, 3)
        mainLayout.addWidget(self.refGroup, 2, 0, 1, 3)
        mainLayout.addWidget(self.gainGroup, 2, 3, 1, 3)
        mainLayout.addWidget(self.acceptButton, 3, 2, 1, 2)
        self.setLayout(mainLayout)

        self.refreshButton.clicked.connect(self.manual_refresh)
        self.acceptButton.clicked.connect(self.accept)
Exemple #7
0
    def __init__(self, parent):
        QtGui.QDialog.__init__(self, parent)
        self.parent = parent
        self.setMinimumWidth(800)
        self.setMinimumHeight(400)
        self.setWindowTitle('Synthesizer Settings')

        self.instGroup = QtGui.QGroupBox()
        self.rfGroup = QtGui.QGroupBox()
        self.modGroup = QtGui.QGroupBox()

        self.instGroup.setTitle('Instrument Session')
        self.instNameLabel = QtGui.QLabel()
        self.instInterfaceLabel = QtGui.QLabel()
        self.instInterfaceNumLabel = QtGui.QLabel()
        self.instRemoteDispLabel = QtGui.QLabel()
        instGroupLayout = QtGui.QFormLayout()
        instGroupLayout.addRow(QtGui.QLabel('Instrument Name'),
                               self.instNameLabel)
        instGroupLayout.addRow(QtGui.QLabel('Interface Type'),
                               self.instInterfaceLabel)
        instGroupLayout.addRow(QtGui.QLabel('Interface Number'),
                               self.instInterfaceNumLabel)
        instGroupLayout.addRow(QtGui.QLabel('Remote Display'),
                               self.instRemoteDispLabel)
        self.instGroup.setLayout(instGroupLayout)

        self.rfGroup.setTitle('RF Settings')
        self.rfOutputLabel = QtGui.QLabel()
        self.modOutputLabel = QtGui.QLabel()
        self.synFreqLabel = QtGui.QLabel()
        rfGroupLayout = QtGui.QGridLayout()
        rfGroupLayout.addWidget(QtGui.QLabel('RF Output'), 0, 0)
        rfGroupLayout.addWidget(self.rfOutputLabel, 0, 1)
        rfGroupLayout.addWidget(QtGui.QLabel('Synth Frequency'), 0, 2)
        rfGroupLayout.addWidget(self.synFreqLabel, 0, 3)
        rfGroupLayout.addWidget(QtGui.QLabel('Modulation Output'), 0, 4)
        rfGroupLayout.addWidget(self.modOutputLabel, 0, 5)
        self.rfGroup.setLayout(rfGroupLayout)

        self.modGroup.setTitle('Modulation Settings')
        self.am1StateLabel = QtGui.QLabel()
        self.am2StateLabel = QtGui.QLabel()
        self.fm1StateLabel = QtGui.QLabel()
        self.fm2StateLabel = QtGui.QLabel()
        self.pm1StateLabel = QtGui.QLabel()
        self.pm2StateLabel = QtGui.QLabel()
        self.lfStateLabel = QtGui.QLabel()
        self.am1DepthLabel = QtGui.QLabel()
        self.am2DepthLabel = QtGui.QLabel()
        self.fm1DevLabel = QtGui.QLabel()
        self.fm2DevLabel = QtGui.QLabel()
        self.pm1DevLabel = QtGui.QLabel()
        self.pm2DevLabel = QtGui.QLabel()
        self.lfVolLabel = QtGui.QLabel()
        self.am1SrcLabel = QtGui.QLabel()
        self.am2SrcLabel = QtGui.QLabel()
        self.fm1SrcLabel = QtGui.QLabel()
        self.fm2SrcLabel = QtGui.QLabel()
        self.pm1SrcLabel = QtGui.QLabel()
        self.pm2SrcLabel = QtGui.QLabel()
        self.lfSrcLabel = QtGui.QLabel()
        self.am1FreqLabel = QtGui.QLabel()
        self.am2FreqLabel = QtGui.QLabel()
        self.fm1FreqLabel = QtGui.QLabel()
        self.fm2FreqLabel = QtGui.QLabel()
        self.pm1FreqLabel = QtGui.QLabel()
        self.pm2FreqLabel = QtGui.QLabel()
        self.am1WaveLabel = QtGui.QLabel()
        self.am2WaveLabel = QtGui.QLabel()
        self.fm1WaveLabel = QtGui.QLabel()
        self.fm2WaveLabel = QtGui.QLabel()
        self.pm1WaveLabel = QtGui.QLabel()
        self.pm2WaveLabel = QtGui.QLabel()

        modGroupLayout = QtGui.QGridLayout()
        modGroupLayout.addWidget(QtGui.QLabel('Channel'), 0, 0)
        modGroupLayout.addWidget(QtGui.QLabel('Source'), 0, 1)
        modGroupLayout.addWidget(QtGui.QLabel('State'), 0, 2)
        modGroupLayout.addWidget(QtGui.QLabel('Depth/Dev'), 0, 3)
        modGroupLayout.addWidget(QtGui.QLabel('Rate'), 0, 4)
        modGroupLayout.addWidget(QtGui.QLabel('Waveform'), 0, 5)
        modGroupLayout.addWidget(QtGui.QLabel('AM1'), 1, 0)
        modGroupLayout.addWidget(self.am1StateLabel, 1, 1)
        modGroupLayout.addWidget(self.am1SrcLabel, 1, 2)
        modGroupLayout.addWidget(self.am1DepthLabel, 1, 3)
        modGroupLayout.addWidget(self.am1FreqLabel, 1, 4)
        modGroupLayout.addWidget(self.am1WaveLabel, 1, 5)
        modGroupLayout.addWidget(QtGui.QLabel('AM2'), 2, 0)
        modGroupLayout.addWidget(self.am2StateLabel, 2, 1)
        modGroupLayout.addWidget(self.am2SrcLabel, 2, 2)
        modGroupLayout.addWidget(self.am2DepthLabel, 2, 3)
        modGroupLayout.addWidget(self.am2FreqLabel, 2, 4)
        modGroupLayout.addWidget(self.am2WaveLabel, 2, 5)
        modGroupLayout.addWidget(QtGui.QLabel('FM1'), 3, 0)
        modGroupLayout.addWidget(self.fm1StateLabel, 3, 1)
        modGroupLayout.addWidget(self.fm1SrcLabel, 3, 2)
        modGroupLayout.addWidget(self.fm1DevLabel, 3, 3)
        modGroupLayout.addWidget(self.fm1FreqLabel, 3, 4)
        modGroupLayout.addWidget(self.fm1WaveLabel, 3, 5)
        modGroupLayout.addWidget(QtGui.QLabel('FM2'), 4, 0)
        modGroupLayout.addWidget(self.fm2StateLabel, 4, 1)
        modGroupLayout.addWidget(self.fm2SrcLabel, 4, 2)
        modGroupLayout.addWidget(self.fm2DevLabel, 4, 3)
        modGroupLayout.addWidget(self.fm2FreqLabel, 4, 4)
        modGroupLayout.addWidget(self.fm2WaveLabel, 4, 5)
        modGroupLayout.addWidget(QtGui.QLabel('φM1'), 5, 0)
        modGroupLayout.addWidget(self.pm1StateLabel, 5, 1)
        modGroupLayout.addWidget(self.pm1SrcLabel, 5, 2)
        modGroupLayout.addWidget(self.pm1DevLabel, 5, 3)
        modGroupLayout.addWidget(self.pm1FreqLabel, 5, 4)
        modGroupLayout.addWidget(self.pm1WaveLabel, 5, 5)
        modGroupLayout.addWidget(QtGui.QLabel('φM2'), 6, 0)
        modGroupLayout.addWidget(self.pm2StateLabel, 6, 1)
        modGroupLayout.addWidget(self.pm2SrcLabel, 6, 2)
        modGroupLayout.addWidget(self.pm2DevLabel, 6, 3)
        modGroupLayout.addWidget(self.pm2FreqLabel, 6, 4)
        modGroupLayout.addWidget(self.pm2WaveLabel, 6, 5)
        modGroupLayout.addWidget(QtGui.QLabel('LF OUT'), 7, 0)
        modGroupLayout.addWidget(self.lfStateLabel, 7, 1)
        modGroupLayout.addWidget(self.lfSrcLabel, 7, 2)
        modGroupLayout.addWidget(self.lfVolLabel, 7, 3)
        self.modGroup.setLayout(modGroupLayout)

        self.refreshButton = QtGui.QPushButton('Manual Refresh')
        self.acceptButton = QtGui.QPushButton(Shared.btn_label('accept'))

        mainLayout = QtGui.QGridLayout()
        mainLayout.addWidget(self.instGroup, 0, 0, 1, 5)
        mainLayout.addWidget(self.rfGroup, 1, 0, 1, 5)
        mainLayout.addWidget(self.modGroup, 2, 0, 1, 5)
        mainLayout.addWidget(self.acceptButton, 3, 2, 1, 1)
        self.setLayout(mainLayout)

        self.refreshButton.clicked.connect(self.manual_refresh)
        self.acceptButton.clicked.connect(self.accept)
Exemple #8
0
    def __init__(self, main=None):
        QtGui.QDialog.__init__(self, main)
        self.main = main
        self.setWindowTitle('Lockin scan configuration (JPL style)')
        self.setMinimumSize(1200, 600)

        # Add top buttons
        addBatchButton = QtGui.QPushButton('Add batch')
        removeBatchButton = QtGui.QPushButton('Remove last batch')
        saveButton = QtGui.QPushButton('Set File Directory')
        self.filename = 'default.lwa'
        self.fileLabel = QtGui.QLabel('Save Data to: {:s}'.format(self.filename))
        self.fileLabel.setStyleSheet('QLabel {color: #003366}')
        topButtonLayout = QtGui.QGridLayout()
        topButtonLayout.addWidget(saveButton, 0, 0)
        topButtonLayout.addWidget(addBatchButton, 0, 1)
        topButtonLayout.addWidget(removeBatchButton, 0, 2)
        topButtonLayout.addWidget(self.fileLabel, 1, 0, 1, 3)
        topButtons = QtGui.QWidget()
        topButtons.setLayout(topButtonLayout)

        # Add bottom buttons
        cancelButton = QtGui.QPushButton(Shared.btn_label('reject'))
        acceptButton = QtGui.QPushButton(Shared.btn_label('confirm'))
        acceptButton.setDefault(True)
        bottomButtonLayout = QtGui.QHBoxLayout()
        bottomButtonLayout.addWidget(cancelButton)
        bottomButtonLayout.addWidget(acceptButton)
        bottomButtons = QtGui.QWidget()
        bottomButtons.setLayout(bottomButtonLayout)

        # Add freq config entries
        self.entryWidgetList = []
        self.entryLayout = QtGui.QGridLayout()
        self.entryLayout.setAlignment(QtCore.Qt.AlignTop)
        # add entries
        self.entryLayout.addWidget(QtGui.QLabel('Comment'), 0, 0)
        self.entryLayout.addWidget(QtGui.QLabel('Start Freq (MHz)'), 0, 1)
        self.entryLayout.addWidget(QtGui.QLabel('Stop Freq (MHz)'), 0, 2)
        self.entryLayout.addWidget(QtGui.QLabel('Step (MHz)'), 0, 3)
        self.entryLayout.addWidget(QtGui.QLabel('Averages'), 0, 4)
        self.entryLayout.addWidget(QtGui.QLabel('Sensitivity'), 0, 5)
        self.entryLayout.addWidget(QtGui.QLabel('Time Const'), 0, 6)
        self.entryLayout.addWidget(QtGui.QLabel('Wait time (ms)'), 0, 7)
        self.entryLayout.addWidget(QtGui.QLabel('Modulation'), 0, 8)
        self.entryLayout.addWidget(QtGui.QLabel('Mod Freq (Hz)'), 0, 9)
        self.entryLayout.addWidget(QtGui.QLabel('Mod Depth/Dev'), 0, 10, 1, 2)
        self.entryLayout.addWidget(QtGui.QLabel('Harmonics'), 0, 12)
        self.entryLayout.addWidget(QtGui.QLabel('Phase'), 0, 13)

        self.add_entry()

        entryWidgets = QtGui.QWidget()
        entryWidgets.setLayout(self.entryLayout)

        entryArea = QtGui.QScrollArea()
        entryArea.setWidgetResizable(True)
        entryArea.setWidget(entryWidgets)

        # Set up main layout
        mainLayout = QtGui.QVBoxLayout(self)
        mainLayout.setSpacing(0)
        mainLayout.addWidget(topButtons)
        mainLayout.addWidget(entryArea)
        mainLayout.addWidget(bottomButtons)
        self.setLayout(mainLayout)

        cancelButton.clicked.connect(self.reject)
        acceptButton.clicked.connect(self.accept)
        saveButton.clicked.connect(self.set_file_directory)
        addBatchButton.clicked.connect(self.add_entry)
        removeBatchButton.clicked.connect(self.remove_entry)
Exemple #9
0
    def __init__(self, main=None):
        QtGui.QDialog.__init__(self, main)
        self.main = main
        self.setWindowTitle('Lockin scan configuration (JPL style)')
        self.setMinimumSize(1200, 600)

        # Add top buttons
        addBatchButton = QtGui.QPushButton('Add batch')
        removeBatchButton = QtGui.QPushButton('Remove last batch')
        saveButton = QtGui.QPushButton('Set File Directory')
        self.filename = 'default.lwa'
        self.fileLabel = QtGui.QLabel('Save Data to: {:s}'.format(
            self.filename))
        self.fileLabel.setStyleSheet('QLabel {color: #003366}')
        topButtonLayout = QtGui.QGridLayout()
        topButtonLayout.addWidget(saveButton, 0, 0)
        topButtonLayout.addWidget(addBatchButton, 0, 1)
        topButtonLayout.addWidget(removeBatchButton, 0, 2)
        topButtonLayout.addWidget(self.fileLabel, 1, 0, 1, 3)
        topButtons = QtGui.QWidget()
        topButtons.setLayout(topButtonLayout)

        # Add bottom buttons
        cancelButton = QtGui.QPushButton(Shared.btn_label('reject'))
        acceptButton = QtGui.QPushButton(Shared.btn_label('confirm'))
        acceptButton.setDefault(True)
        bottomButtonLayout = QtGui.QHBoxLayout()
        bottomButtonLayout.addWidget(cancelButton)
        bottomButtonLayout.addWidget(acceptButton)
        bottomButtons = QtGui.QWidget()
        bottomButtons.setLayout(bottomButtonLayout)

        # Add freq config entries
        self.entryWidgetList = []
        self.entryLayout = QtGui.QGridLayout()
        self.entryLayout.setAlignment(QtCore.Qt.AlignTop)
        # add entries
        self.entryLayout.addWidget(QtGui.QLabel('Comment'), 0, 0)
        self.entryLayout.addWidget(QtGui.QLabel('Start Freq (MHz)'), 0, 1)
        self.entryLayout.addWidget(QtGui.QLabel('Stop Freq (MHz)'), 0, 2)
        self.entryLayout.addWidget(QtGui.QLabel('Step (MHz)'), 0, 3)
        self.entryLayout.addWidget(QtGui.QLabel('Averages'), 0, 4)
        self.entryLayout.addWidget(QtGui.QLabel('Sensitivity'), 0, 5)
        self.entryLayout.addWidget(QtGui.QLabel('Time Const'), 0, 6)
        self.entryLayout.addWidget(QtGui.QLabel('Wait time (ms)'), 0, 7)
        self.entryLayout.addWidget(QtGui.QLabel('Modulation'), 0, 8)
        self.entryLayout.addWidget(QtGui.QLabel('Mod Freq (Hz)'), 0, 9)
        self.entryLayout.addWidget(QtGui.QLabel('Mod Depth/Dev'), 0, 10, 1, 2)
        self.entryLayout.addWidget(QtGui.QLabel('Harmonics'), 0, 12)
        self.entryLayout.addWidget(QtGui.QLabel('Phase'), 0, 13)

        self.add_entry()

        entryWidgets = QtGui.QWidget()
        entryWidgets.setLayout(self.entryLayout)

        entryArea = QtGui.QScrollArea()
        entryArea.setWidgetResizable(True)
        entryArea.setWidget(entryWidgets)

        # Set up main layout
        mainLayout = QtGui.QVBoxLayout(self)
        mainLayout.setSpacing(0)
        mainLayout.addWidget(topButtons)
        mainLayout.addWidget(entryArea)
        mainLayout.addWidget(bottomButtons)
        self.setLayout(mainLayout)

        cancelButton.clicked.connect(self.reject)
        acceptButton.clicked.connect(self.accept)
        saveButton.clicked.connect(self.set_file_directory)
        addBatchButton.clicked.connect(self.add_entry)
        removeBatchButton.clicked.connect(self.remove_entry)