Ejemplo n.º 1
0
    def __init__(self, controlPanel):
        CommandsGB.__init__(self, controlPanel)
        self.statusButton = CmdButton(controlPanel=controlPanel,
                                      label='STATUS',
                                      cmdStr='%s motors status' %
                                      controlPanel.actorName)
        self.initButton = CmdButton(controlPanel=controlPanel,
                                    label='INIT',
                                    cmdStr='%s motors init' %
                                    controlPanel.actorName)

        self.abortButton = AbortButton(controlPanel=controlPanel,
                                       cmdStr='%s motors halt' %
                                       controlPanel.actorName)

        self.homeCmd = HomeCmd(controlPanel=controlPanel)
        self.moveCmd = MoveCmd(controlPanel=controlPanel)
        self.toSwitchCmd = ToSwitchCmd(controlPanel=controlPanel)
        self.rawCmd = RawCmd(controlPanel=controlPanel)

        self.grid.addWidget(self.statusButton, 0, 0)
        self.grid.addWidget(self.initButton, 1, 0)
        self.grid.addWidget(self.abortButton, 1, 1)
        self.grid.addLayout(self.homeCmd, 2, 0, 1, 2)
        self.grid.addLayout(self.moveCmd, 3, 0, 1, 5)
        self.grid.addLayout(self.toSwitchCmd, 4, 0, 1, 5)
        self.grid.addLayout(self.rawCmd, 5, 0, 1, 5)
Ejemplo n.º 2
0
    def __init__(self, controlPanel):
        EnuDeviceCmd.__init__(self, controlPanel)
        self.initCmd = InitCmd(controlPanel=controlPanel)
        self.abortButton = AbortButton(controlPanel=controlPanel,
                                       cmdStr='%s slit abort' %
                                       controlPanel.actorName)
        self.goHomeButton = CmdButton(controlPanel=controlPanel,
                                      label='GO HOME',
                                      cmdStr='%s slit move home' %
                                      controlPanel.actorName)

        self.enableButton = CmdButton(controlPanel=controlPanel,
                                      label='ENABLE',
                                      cmdStr='%s slit enable' %
                                      controlPanel.actorName)
        self.disableButton = CmdButton(controlPanel=controlPanel,
                                       label='DISABLE',
                                       cmdStr='%s slit disable' %
                                       controlPanel.actorName)
        self.coordBoxes = CoordBoxes()

        self.moveCmd = MoveCmd(controlPanel=controlPanel)
        self.setRepCmd = SetRepCmd(controlPanel=controlPanel)

        self.grid.addLayout(self.initCmd, 1, 0, 1, 2)
        self.grid.addWidget(self.enableButton, 2, 0)
        self.grid.addWidget(self.disableButton, 2, 1)
        self.grid.addLayout(self.coordBoxes, 3, 0, 2, 3)
        self.grid.addLayout(self.moveCmd, 5, 0, 1, 2)
        self.grid.addWidget(self.abortButton, 5, 2)
        self.grid.addLayout(self.setRepCmd, 6, 0, 1, 2)
        self.grid.addWidget(self.goHomeButton, 7, 0, 1, 1)
Ejemplo n.º 3
0
    def __init__(self, controlPanel, stage):
        CommandsGB.__init__(self, controlPanel)
        self.statusButton = CmdButton(controlPanel=controlPanel,
                                      label='STATUS',
                                      cmdStr='sac stages %s status' % stage)
        self.initButton = CmdButton(controlPanel=controlPanel,
                                    label='INIT',
                                    cmdStr='sac stages %s init' % stage)

        self.moveCmd = MoveCmd(controlPanel=controlPanel, stage=stage)

        self.grid.addWidget(self.statusButton, 0, 0)
        self.grid.addWidget(self.initButton, 0, 1)
        self.grid.addLayout(self.moveCmd, 1, 0, 1, 3)
Ejemplo n.º 4
0
 def __init__(self, controlDialog):
     QHBoxLayout.__init__(self)
     self.setAlignment(Qt.AlignLeft)
     self.reload = CmdButton(controlPanel=None,
                             label=' Reload Config ',
                             controlDialog=controlDialog,
                             cmdStr='%s reloadConfiguration' %
                             controlDialog.moduleRow.actorName)
     self.statusButton = CmdButton(controlPanel=None,
                                   label=' STATUS ',
                                   controlDialog=controlDialog,
                                   cmdStr='%s status' %
                                   controlDialog.moduleRow.actorName)
     self.addWidget(self.reload)
     self.addWidget(self.statusButton)
Ejemplo n.º 5
0
 def addButtons(self, controlPanel):
     actor, controller = controlPanel.actorName, controlPanel.controllerName
     self.statusButton = CmdButton(controlPanel=controlPanel,
                                   label='STATUS',
                                   cmdStr='%s %s status' %
                                   (actor, controller))
     self.connectButton = CmdButton(controlPanel=controlPanel,
                                    label='CONNECT',
                                    cmdStr='%s connect controller=%s' %
                                    (actor, controller))
     self.disconnectButton = CmdButton(
         controlPanel=controlPanel,
         label='DISCONNECT',
         cmdStr='%s disconnect controller=%s' % (actor, controller))
     self.grid.addWidget(self.statusButton, 0, 0)
     self.grid.addWidget(self.connectButton, 0, 1)
     self.grid.addWidget(self.disconnectButton, 0, 1)
Ejemplo n.º 6
0
    def __init__(self, controlPanel):
        CommandsGB.__init__(self, controlPanel)
        self.statusButton = CmdButton(controlPanel=controlPanel,
                                      label='STATUS',
                                      cmdStr='breva status')
        self.connectButton = CmdButton(controlPanel=controlPanel,
                                       label='CONNECT',
                                       cmdStr='breva connect controller=hexa')
        self.initButton = CmdButton(controlPanel=controlPanel,
                                    label='INIT',
                                    cmdStr='breva init')
        self.motorsOn = CmdButton(controlPanel=controlPanel,
                                  label='MOTOR ON',
                                  cmdStr='breva motor on')
        self.motorsOff = CmdButton(controlPanel=controlPanel,
                                   label='MOTOR OFF',
                                   cmdStr='breva motor off')
        self.coordBoxes = CoordBoxes()

        self.moveCmd = MoveCmd(controlPanel=controlPanel)
        self.setRepCmd = SetRepCmd(controlPanel=controlPanel)
        self.gotoCmd = GotoCmd(controlPanel=controlPanel)

        self.grid.addWidget(self.statusButton, 0, 0)
        self.grid.addWidget(self.connectButton, 0, 1)
        self.grid.addWidget(self.initButton, 1, 0)
        self.grid.addWidget(self.motorsOn, 1, 1)
        self.grid.addWidget(self.motorsOff, 1, 1)
        self.grid.addLayout(self.moveCmd, 2, 0, 1, 2)
        self.grid.addLayout(self.setRepCmd, 3, 0, 1, 2)
        self.grid.addLayout(self.coordBoxes, 2, 2, 2, 3)
        self.grid.addLayout(self.gotoCmd, 4, 0, 1, 2)

        self.setMotorState()
Ejemplo n.º 7
0
    def __init__(self, controlPanel):
        ControllerCmd.__init__(self, controlPanel)
        self.getError = CmdButton(controlPanel=controlPanel,
                                  label='ERROR',
                                  cmdStr='%s temps error' %
                                  controlPanel.actorName)
        self.getInfo = CmdButton(controlPanel=controlPanel,
                                 label='INFO',
                                 cmdStr='%s temps info' %
                                 controlPanel.actorName)
        self.getResistance = CmdButton(controlPanel=controlPanel,
                                       label='RESISTANCES',
                                       cmdStr='%s temps resistance' %
                                       controlPanel.actorName)

        self.grid.addWidget(self.getError, 1, 0)
        self.grid.addWidget(self.getInfo, 1, 1)
        self.grid.addWidget(self.getResistance, 2, 0)
Ejemplo n.º 8
0
    def __init__(self, controlPanel):
        EnuDeviceCmd.__init__(self, controlPanel)

        self.abortButton = AbortButton(controlPanel=controlPanel,
                                       cmdStr='%s exposure finish' %
                                       controlPanel.actorName)

        self.rebootButton = CmdButton(
            controlPanel=controlPanel,
            label='REBOOT',
            cmdStr=f'{controlPanel.actorName} biasha reboot')
        self.rebootButton.setColor(*styles.colorWidget('orangered'))

        self.shutterCmd = ShutterCmd(controlPanel=controlPanel)
        self.exposeCmd = ExposeCmd(controlPanel=controlPanel)

        self.grid.addWidget(self.rebootButton, 0, 2)
        self.grid.addWidget(self.abortButton, 1, 0)
        self.grid.addLayout(self.shutterCmd, 2, 0, 1, 3)
        self.grid.addLayout(self.exposeCmd, 3, 0, 1, 3)
Ejemplo n.º 9
0
    def __init__(self, controlPanel):
        CommandsGB.__init__(self, controlPanel)
        self.statusButton = CmdButton(controlPanel=controlPanel,
                                      label='STATUS',
                                      cmdStr='%s gauge status' %
                                      controlPanel.actorName)

        self.rawCmd = RawCmd(controlPanel)

        self.grid.addWidget(self.statusButton, 0, 0)
        self.grid.addLayout(self.rawCmd, 1, 0)
Ejemplo n.º 10
0
    def __init__(self, controlPanel):
        ControllerCmd.__init__(self, controlPanel)

        self.openCmd = OpenCmd(controlPanel=controlPanel)
        self.closeButton = CmdButton(controlPanel=controlPanel,
                                     label='CLOSE',
                                     cmdStr='%s gatevalve close' %
                                     controlPanel.actorName,
                                     safetyCheck=True)

        self.openCmd.addWidget(self.closeButton, 1, 0)
        self.grid.addLayout(self.openCmd, 2, 0, 1, 3)
Ejemplo n.º 11
0
    def __init__(self, enuRow):
        ControlDialog.__init__(self,
                               moduleRow=enuRow,
                               title='Entrance Unit SM%i' % enuRow.module.smId)

        self.startButton = CmdButton(controlPanel=None,
                                     label=' START ',
                                     controlDialog=self,
                                     cmdStr='%s start' %
                                     self.moduleRow.actorName)

        self.stopButton = CmdButton(controlPanel=None,
                                    label=' STOP ',
                                    controlDialog=self,
                                    cmdStr='%s stop' %
                                    self.moduleRow.actorName)
        self.connectCmd = ConnectCmd(
            self, ['rexm', 'biasha', 'slit', 'temps', 'pdu', 'iis'])

        self.topbar.addWidget(self.startButton)
        self.topbar.addWidget(self.stopButton)

        self.topbar.addLayout(self.connectCmd)

        self.slitPanel = SlitPanel(self)
        self.shuttersPanel = ShuttersPanel(self)
        self.biaPanel = BiaPanel(self)
        self.rexmPanel = RexmPanel(self)
        self.tempsPanel = TempsPanel(self)
        self.pduPanel = PduPanel(self)
        self.iisPanel = IisPanel(self)

        self.tabWidget.addTab(self.slitPanel, 'FCA')
        self.tabWidget.addTab(self.shuttersPanel, 'SHUTTERS')
        self.tabWidget.addTab(self.biaPanel, 'BIA')
        self.tabWidget.addTab(self.rexmPanel, 'RDA')
        self.tabWidget.addTab(self.tempsPanel, 'TEMPS')
        self.tabWidget.addTab(self.pduPanel, 'PDU')
        self.tabWidget.addTab(self.iisPanel, 'IIS')
Ejemplo n.º 12
0
    def __init__(self, controlPanel):
        CommandsGB.__init__(self, controlPanel)
        self.statusButton = CmdButton(controlPanel=controlPanel,
                                      label='STATUS',
                                      cmdStr='sac ccd status')
        self.connectButton = CmdButton(controlPanel=controlPanel,
                                       label='CONNECT',
                                       cmdStr='sac ccd connect')
        self.exposeCmd = ExposeCmd(controlPanel=controlPanel)
        self.startLoop = CmdButton(controlPanel=controlPanel,
                                   label='START LOOP',
                                   cmdStr='sac ccd loop start')
        self.stopLoop = CmdButton(controlPanel=controlPanel,
                                  label='STOP LOOP',
                                  cmdStr='sac ccd loop stop')
        self.looptime = Looptime(self)

        self.grid.addWidget(self.statusButton, 0, 0)
        self.grid.addWidget(self.connectButton, 0, 1)
        self.grid.addLayout(self.exposeCmd, 1, 0, 1, 3)
        self.grid.addWidget(self.startLoop, 2, 0)
        self.grid.addWidget(self.stopLoop, 2, 0)
Ejemplo n.º 13
0
    def __init__(self, controlPanel):
        CommandsGB.__init__(self, controlPanel)
        self.statusButton = CmdButton(controlPanel=controlPanel,
                                      label='STATUS',
                                      cmdStr='%s heaters status' %
                                      controlPanel.actorName)
        self.grid.addWidget(self.statusButton, 0, 0)

        for i, heater in enumerate(controlPanel.heaters):
            name = heater.name
            if name in ['spreader', 'shield']:
                self.grid.addWidget(HPCmd(controlPanel, name), 1 + i, 0)
            else:
                self.grid.addLayout(FracCmd(controlPanel, name), 1 + i, 0)
Ejemplo n.º 14
0
    def __init__(self, controlPanel):
        EnuDeviceCmd.__init__(self, controlPanel)
        self.setFilterwheel = SetFilterwheel(controlPanel=controlPanel)
        self.initFilterwheel = InitFilterwheel(controlPanel=controlPanel)
        self.adcCalib = CmdButton(controlPanel=controlPanel,
                                  label='ADC CALIB',
                                  cmdStr=f'{controlPanel.actorName} adc calib')

        self.grid.addLayout(self.initFilterwheel, 1, 0, 1, 2)
        self.grid.addLayout(self.setFilterwheel, 2, 0, 1, 3)
        self.grid.addWidget(
            self.adcCalib,
            3,
            0,
        )
Ejemplo n.º 15
0
class BrevaCommands(CommandsGB):
    def __init__(self, controlPanel):
        CommandsGB.__init__(self, controlPanel)
        self.statusButton = CmdButton(controlPanel=controlPanel,
                                      label='STATUS',
                                      cmdStr='breva status')
        self.connectButton = CmdButton(controlPanel=controlPanel,
                                       label='CONNECT',
                                       cmdStr='breva connect controller=hexa')
        self.initButton = CmdButton(controlPanel=controlPanel,
                                    label='INIT',
                                    cmdStr='breva init')
        self.motorsOn = CmdButton(controlPanel=controlPanel,
                                  label='MOTOR ON',
                                  cmdStr='breva motor on')
        self.motorsOff = CmdButton(controlPanel=controlPanel,
                                   label='MOTOR OFF',
                                   cmdStr='breva motor off')
        self.coordBoxes = CoordBoxes()

        self.moveCmd = MoveCmd(controlPanel=controlPanel)
        self.setRepCmd = SetRepCmd(controlPanel=controlPanel)
        self.gotoCmd = GotoCmd(controlPanel=controlPanel)

        self.grid.addWidget(self.statusButton, 0, 0)
        self.grid.addWidget(self.connectButton, 0, 1)
        self.grid.addWidget(self.initButton, 1, 0)
        self.grid.addWidget(self.motorsOn, 1, 1)
        self.grid.addWidget(self.motorsOff, 1, 1)
        self.grid.addLayout(self.moveCmd, 2, 0, 1, 2)
        self.grid.addLayout(self.setRepCmd, 3, 0, 1, 2)
        self.grid.addLayout(self.coordBoxes, 2, 2, 2, 3)
        self.grid.addLayout(self.gotoCmd, 4, 0, 1, 2)

        self.setMotorState()

    def setMotorState(self):
        state = self.controlPanel.controlDialog.moduleRow.motorState.value.text(
        )

        if state == 'ON':
            self.motorsOn.setVisible(False)
            self.motorsOff.setVisible(True)
        else:
            self.motorsOn.setVisible(True)
            self.motorsOff.setVisible(False)
Ejemplo n.º 16
0
    def __init__(self, controlPanel):
        ControllerCmd.__init__(self, controlPanel)
        self.connectButton.cmdStr = f'{self.controlPanel.actorName} connect controller=cooler name={self.controlPanel.controllerName}'
        self.tempLoop = TempLoopCmd(controlPanel=controlPanel)
        self.powerLoop = PowerLoopCmd(controlPanel=controlPanel)
        self.coolerOff = CmdButton(
            controlPanel=controlPanel,
            label='COOLER OFF',
            cmdStr=
            f'{self.controlPanel.actorName} {self.controlPanel.controllerName} off',
            safetyCheck=True)

        self.rawCmd = RawCmd(controlPanel=controlPanel)

        self.grid.addLayout(self.tempLoop, 2, 0, 1, 2)
        self.grid.addLayout(self.powerLoop, 3, 0, 1, 2)
        self.grid.addWidget(self.coolerOff, 4, 0)
        self.grid.addLayout(self.rawCmd, 5, 0, 1, 2)
Ejemplo n.º 17
0
    def __init__(self, controlPanel):
        ControllerCmd.__init__(self, controlPanel)
        self.statusButton = CmdButton(controlPanel=controlPanel,
                                      label='STATUS',
                                      cmdStr='%s power status' %
                                      controlPanel.actorName)

        self.rawCmd = RawCmd(controlPanel)
        self.maskCmd = MaskCmd(controlPanel)
        self.getThresh = ThreshCmd(controlPanel)

        self.grid.addWidget(self.statusButton, 0, 0)
        self.grid.addLayout(self.rawCmd, 1, 0, 1, 2)
        self.grid.addLayout(self.maskCmd, 2, 0, 1, 2)
        self.grid.addLayout(self.getThresh, 3, 0, 1, 2)

        for i, pcmPort in enumerate(controlPanel.pcmPorts):
            self.grid.addWidget(PcmButton(controlPanel, pcmPort), 4 + i, 0, 1,
                                2)
Ejemplo n.º 18
0
    def __init__(self, controlPanel):
        EnuDeviceCmd.__init__(self, controlPanel)
        self.initButton = InitCmd(controlPanel=controlPanel)
        self.abortButton = AbortButton(controlPanel=controlPanel,
                                       cmdStr='%s rexm abort' %
                                       controlPanel.actorName)

        self.goCmd = GoCmd(controlPanel=controlPanel)
        self.moveCmd = MoveCmd(controlPanel=controlPanel)

        self.resetFlag = CmdButton(controlPanel=controlPanel,
                                   label='RESET FLAG',
                                   cmdStr='%s rexm resetFlag' %
                                   controlPanel.actorName)

        self.grid.addLayout(self.initButton, 1, 0, 1, 2)
        self.grid.addWidget(self.abortButton, 2, 2)
        self.grid.addLayout(self.goCmd, 2, 0, 1, 2)
        self.grid.addLayout(self.moveCmd, 3, 0, 1, 2)
        self.grid.addWidget(self.resetFlag, 4, 0)
Ejemplo n.º 19
0
 def __init__(self, upperCmd):
     self.upperCmd = upperCmd
     CmdButton.__init__(self, controlPanel=None, controlDialog=upperCmd.controlDialog, label='SET cryoMode')
Ejemplo n.º 20
0
 def __init__(self, controlPanel):
     CmdButton.__init__(self,
                        controlPanel=controlPanel,
                        label='REBOOT',
                        cmdStr=f'')
     self.setColor(*styles.colorWidget('abort'))
Ejemplo n.º 21
0
 def __init__(self, upperCmd, label):
     self.upperCmd = upperCmd
     CmdButton.__init__(self,
                        controlPanel=None,
                        controlDialog=upperCmd.controlDialog,
                        label=label)