def __init__(self, moduleRow): widgets = [ ValueGB(moduleRow, 'pcmPower1', '24V-UPS', 2, '{:.3f}'), ValueGB(moduleRow, 'pcmPower2', '24V-AUX', 2, '{:.3f}') ] ValuesRow.__init__(self, widgets, title='Inputs')
def createWidgets(self): self.position = ValueGB(self.moduleRow, 'gatevalve', 'Position', 1, '{:s}') self.requested = ValueGB(self.moduleRow, 'gatevalve', 'Requested', 2, '{:s}') self.samPOW = ValueGB(self.moduleRow, 'sampower', 'SAM POWER', 0, '{:g}')
def createWidgets(self): self.mode = ValueGB(self.moduleRow, 'iisMode', 'Mode', 0, '{:s}') self.state = ValueGB(self.moduleRow, 'iisFSM', '', 0, '{:s}') self.substate = ValueGB(self.moduleRow, 'iisFSM', '', 1, '{:s}') self.hgar = SwitchGB(self.moduleRow, 'hgar', 'HgAr', 0, '{:g}') self.neon = SwitchGB(self.moduleRow, 'neon', 'Neon', 0, '{:g}')
def __init__(self, moduleRow, motorId): QGroupBox.__init__(self) title = 'Motor %s' % self.motorNames[motorId] self.grid = GBoxGrid(title=title) self.setLayout(self.grid) self.setTitle(title) self.status = ValueGB(moduleRow, 'ccdMotor%i' % motorId, 'status', 0, '{:s}') self.homeSwitch = ValueGB(moduleRow, 'ccdMotor%i' % motorId, 'homeSwitch', 1, '{:d}') self.farSwitch = ValueGB(moduleRow, 'ccdMotor%i' % motorId, 'farSwitch', 2, '{:d}') self.steps = ValueGB(moduleRow, 'ccdMotor%i' % motorId, 'steps', 3, '{:g}') self.position = ValueGB(moduleRow, 'ccdMotor%i' % motorId, 'position', 4, '{:.2f}') for j, widget in enumerate(self.widgets): self.grid.addWidget(widget, 0, j) self.setStyleSheet( "QGroupBox {font-size: %ipt; border: 1px solid #d7d4d1;border-radius: 3px;margin-top: 1ex;} " % (styles.smallFont) + "QGroupBox::title {subcontrol-origin: margin;subcontrol-position: top center; padding: 0 3px;}" )
def createWidgets(self): self.state = ExposureState(self.moduleRow) self.rootDir = ValueGB(self.moduleRow, 'filepath', 'rootDir', 0, '{:s}') self.nightDir = ValueGB(self.moduleRow, 'filepath', 'nightDir', 1, '{:s}') self.filename = ValueGB(self.moduleRow, 'filepath', 'filename', 2, '{:s}')
def __init__(self, moduleRow, name): widgets = [ ValueGB(moduleRow, f'{name}wheel', 'Position', 0, '{:d}'), ValueGB(moduleRow, f'{name}wheel', 'Hole', 1, '{:s}') ] ValuesRow.__init__(self, widgets, title=f'{name.capitalize()} Wheel') self.grid.setContentsMargins(1, 6, 1, 1)
def createWidgets(self): self.speed = Speed(self.moduleRow) self.status = Status(self.moduleRow) self.volt = ValueGB(self.moduleRow, 'turboVAW', 'Voltage(V)', 0, '{:g}') self.current = ValueGB(self.moduleRow, 'turboVAW', 'Current(A)', 1, '{:g}') self.power = ValueGB(self.moduleRow, 'turboVAW', 'Power(W)', 2, '{:g}') self.bodyTemp = ValueGB(self.moduleRow, 'turboTemps', 'bodyTemp(°C)', 0, '{:g}') self.controllerTemp = ValueGB(self.moduleRow, 'turboTemps', 'controllerTemp(°C)', 1, '{:g}')
def __init__(self, moduleRow, shId): widgets = [ ValueGB(moduleRow, shId, 'open', 0, '{:d}'), ValueGB(moduleRow, shId, 'close', 1, '{:d}'), ValueGB(moduleRow, shId, 'error', 2, '{:d}') ] ValuesRow.__init__(self, widgets, title=self.shutterName[shId]) self.grid.setContentsMargins(1, 6, 1, 1)
def createWidgets(self): self.mode = ValueGB(self.moduleRow, 'sourcesMode', 'Mode', 0, '{:s}') self.state = ValueGB(self.moduleRow, 'sourcesFSM', '', 0, '{:s}') self.substate = ValueGB(self.moduleRow, 'sourcesFSM', '', 1, '{:s}') self.pduPorts = [ PduPort(self.moduleRow, name, f'pduPort{portNb}') for name, portNb in self.ports.items() ]
def __init__(self, controlDialog, key='fiberConfig', title='fiberConfig', fmt='{:s}', fontSize=styles.smallFont): self.controlDialog = controlDialog ValueGB.__init__(self, controlDialog.moduleRow, key=key, title=title, ind=0, fmt=fmt, fontSize=fontSize) self.fibers = LineEdit() #self.fibers.editingFinished.connect(self.newConfig) self.grid.removeWidget(self.value) self.grid.addWidget(self.fibers, 0, 0)
def __init__(self, moduleRow, powerName, pduPort): self.powerName = powerName self.pduPort = pduPort widgets = [ SwitchGB(moduleRow, pduPort, 'state', 1, '{:s}'), ValueGB(moduleRow, pduPort, 'volts', 2, '{:.3f}'), ValueGB(moduleRow, pduPort, 'amps', 3, '{:.3f}'), ValueGB(moduleRow, pduPort, 'watts', 4, '{:.3f}') ] ValuesRow.__init__(self, widgets, title=f'{powerName.capitalize()}')
def createWidgets(self): self.speed = Speed(self.moduleRow) self.status = StatusString(self.moduleRow, 'pumpStatus', 'Status') self.warnings = StatusString(self.moduleRow, 'pumpWarnings', 'Warnings') self.errors = StatusString(self.moduleRow, 'pumpErrors', 'Errors') self.bodyTemp = ValueGB(self.moduleRow, 'pumpTemps', 'bodyTemp(°C)', 0, '{:g}') self.controllerTemp = ValueGB(self.moduleRow, 'pumpTemps', 'controllerTemp(°C)', 1, '{:g}') self.cycleCount = ValueGB(self.moduleRow, 'pumpTimes', 'Cycle Count', 0, '{:g}') self.powerOnTime = ValueGB(self.moduleRow, 'pumpTimes', 'Power On time', 1, '{:g}') self.pumpingTime = ValueGB(self.moduleRow, 'pumpTimes', 'Pumping Time', 2, '{:g}') self.controllerLife = ValueGB(self.moduleRow, 'pumpLife', 'Controller Life', 0, '{:g}') self.tipSealLife = ValueGB(self.moduleRow, 'pumpLife', 'Tip Seal Life', 1, '{:g}') self.bearingLife = ValueGB(self.moduleRow, 'pumpLife', 'Bearing Life', 2, '{:g}')
def createWidgets(self): self.mode = ValueGB(self.moduleRow, 'filterwheelMode', 'Mode', 0, '{:s}') self.state = ValueGB(self.moduleRow, 'filterwheelFSM', '', 0, '{:s}') self.substate = ValueGB(self.moduleRow, 'filterwheelFSM', '', 1, '{:s}') self.linewheel = Wheel(self.moduleRow, 'line') self.qthwheel = Wheel(self.moduleRow, 'qth') self.adc1 = ValueGB(self.moduleRow, 'adc', 'ADC channel 1', 0, '{:.4f}') self.adc2 = ValueGB(self.moduleRow, 'adc', 'ADC channel 2', 1, '{:.4f}')
def createWidgets(self): self.mode = ValueGB(self.moduleRow, 'slitMode', 'Mode', 0, '{:s}') self.state = ValueGB(self.moduleRow, 'slitFSM', '', 0, '{:s}') self.substate = ValueGB(self.moduleRow, 'slitFSM', '', 1, '{:s}') self.info = ValueGB(self.moduleRow, 'hxpStatus', 'Info', 1, '{:s}') self.position = ValueGB(self.moduleRow, 'slitPosition', 'Position', 0, '{:s}') self.softwareLimitsActivated = CriticalSwitchGB( self.moduleRow, 'hxpSoftwareLimits', 'SW Limits', 0, '{:g}') self.coordinates = Coordinates(self.moduleRow, 'slit', title='Position') self.work = Coordinates(self.moduleRow, 'slitWork', title='Work') self.tool = Coordinates(self.moduleRow, 'slitTool', title='Tool')
def __init__(self, aitModule): ModuleRow.__init__(self, module=aitModule, actorName='seqno', actorLabel='SEQNO') self.visit = ValueGB(self, 'visit', 'VisitId', 0, '{:g}')
def __init__(self, moduleRow, pumpId): widgets = [ SwitchGB(moduleRow, f'ionpump{pumpId}', 'state', 0, '{:g}'), ValueGB(moduleRow, f'ionpump{pumpId}', 'volts', 1, '{:g}'), ValueGB(moduleRow, f'ionpump{pumpId}', 'amps', 2, '{:g}'), ValueGB(moduleRow, f'ionpump{pumpId}', 'temp', 3, '{:g}'), ValueGB(moduleRow, f'ionpump{pumpId}', 'pressure', 4, '{:g}') ] ValuesRow.__init__(self, widgets, title=f'ionpump{pumpId}'.capitalize()) self.grid.addWidget( ValueGB(moduleRow, f'ionpump{pumpId}Errors', 'errorMask', 0, '{:02X}'), 1, 0) self.grid.addWidget(Status(moduleRow, pumpId), 1, 1, 1, 4)
def createWidgets(self): self.mode = ValueGB(self.moduleRow, 'labsphereMode', '', 0, '{:s}') self.state = ValueGB(self.moduleRow, 'labsphereFSM', '', 0, '{:s}') self.substate = ValueGB(self.moduleRow, 'labsphereFSM', '', 1, '{:s}') self.qth = SwitchGB(self.moduleRow, 'halogen', 'QTH', 0, '{:g}') self.photodiode = ValueGB(self.moduleRow, 'photodiode', 'photodiode', 0, '{:g}') self.attenuator = AttenuatorValue(self.moduleRow) self.neon = SwitchGB(self.moduleRow, 'neon', 'Neon', 0, '{:g}') self.xenon = SwitchGB(self.moduleRow, 'xenon', 'Xenon', 0, '{:g}') self.hgar = SwitchGB(self.moduleRow, 'hgar', 'HgAr', 0, '{:g}') self.krypton = SwitchGB(self.moduleRow, 'krypton', 'Krypton', 0, '{:g}') self.argon = SwitchGB(self.moduleRow, 'argon', 'Argon', 0, '{:g}') self.deuterium = SwitchGB(self.moduleRow, 'deuterium', 'Deuterium', 0, '{:g}')
def __init__(self, controlPanel, name): heaterNb = controlPanel.heaterChannels[name] self.name = name widgets = [ SwitchGB(controlPanel.moduleRow, 'heaters', 'enabled', heaterNb, '{:g}'), ValueGB(controlPanel.moduleRow, 'heaters', 'fraction', heaterNb + 2, '{:.2f}') ] ValuesRow.__init__(self, widgets, title=name.capitalize())
def createWidgets(self): cooler = self.controllerName self.status = Status(self.moduleRow, cooler) self.controlLoop = ValueGB(self.moduleRow, f'{cooler}Loop', 'controlLoop', 0, '{:s}') self.kP = ValueGB(self.moduleRow, f'{cooler}Loop', 'P', 1, '{:g}') self.kI = ValueGB(self.moduleRow, f'{cooler}Loop', 'I', 2, '{:g}') self.kD = ValueGB(self.moduleRow, f'{cooler}Loop', 'D', 3, '{:g}') self.setpoint = ValueGB(self.moduleRow, f'{cooler}Temps', 'setPoint(K)', 0, '{:g}') self.tip = ValueGB(self.moduleRow, f'{cooler}Temps', 'Tip(K)', 2, '{:g}') self.reject = ValueGB(self.moduleRow, f'{cooler}Temps', 'Reject(°C)', 1, '{:g}') self.minPower = ValueGB(self.moduleRow, f'{cooler}Status', 'minPower(W)', 3, '{:g}') self.power = ValueGB(self.moduleRow, f'{cooler}Temps', 'Power(W)', 3, '{:g}') self.maxPower = ValueGB(self.moduleRow, f'{cooler}Status', 'maxPower(W)', 4, '{:g}')
def __init__(self, moduleRow, nb, fontSize=styles.smallFont): QGroupBox.__init__(self) self.grid = QGridLayout() title = 'Slot%d' % nb key = 'temps%s' % title self.widgets = [ ValueGB(moduleRow, key, 'Company', 0, '{:s}', fontSize), ValueGB(moduleRow, key, 'modelNumber', 1, '{:s}', fontSize), ValueGB(moduleRow, key, 'serialNumber', 2, '{:d}', fontSize), ValueGB(moduleRow, key, 'firmware', 3, '{:.1f}', fontSize) ] for i, widget in enumerate(self.widgets): self.grid.addWidget(widget, 0, i) self.grid.setContentsMargins(1, 8, 1, 1) self.setTitle(title) self.setLayout(self.grid) self.setStyleSheet( "QGroupBox {font-size: %ipt; border: 1px solid #d7d4d1;border-radius: 3px;margin-top: 1ex;} " % (fontSize) + "QGroupBox::title {subcontrol-origin: margin;subcontrol-position: top center; padding: 0 3px;}" )
def createWidgets(self): self.mode = ValueGB(self.moduleRow, 'biashaMode', 'Mode', 0, '{:s}') self.state = ValueGB(self.moduleRow, 'biashaFSM', '', 0, '{:s}') self.substate = ValueGB(self.moduleRow, 'biashaFSM', '', 1, '{:s}') self.bia = SwitchGB(self.moduleRow, 'bia', 'BIA', 0, '{:s}') self.biaStrobe = SwitchGB(self.moduleRow, 'biaConfig', 'Strobe', 0, '{:d}') self.biaPeriod = ValueGB(self.moduleRow, 'biaConfig', 'Bia-Period', 1, '{:d}') self.biaDuty = ValueGB(self.moduleRow, 'biaConfig', 'Bia-Duty', 2, '{:d}') self.photores1 = ValueGB(self.moduleRow, 'photores', 'PhotoRes1', 0, '{:d}') self.photores2 = ValueGB(self.moduleRow, 'photores', 'PhotoRes2', 1, '{:d}')
def createWidgets(self): self.mode = ValueGB(self.moduleRow, 'biashaMode', 'Mode', 0, '{:s}') self.state = ValueGB(self.moduleRow, 'biashaFSM', '', 0, '{:s}') self.substate = ValueGB(self.moduleRow, 'biashaFSM', '', 1, '{:s}') self.shutters = ValueGB(self.moduleRow, 'shutters', 'Shutters', 0, '{:s}') self.exptime = ValueGB(self.moduleRow, 'integratingTime', 'Exptime', 0, '{:.1f}') self.elapsedTime = ValueGB(self.moduleRow, 'elapsedTime', 'elapsedTime', 0, '{:.1f}') self.blueShutter = Shutter(self.moduleRow, 'shb') self.redShutter = Shutter(self.moduleRow, 'shr')
def createWidgets(self): self.mode = ValueGB(self.moduleRow, 'pduMode', '', 0, '{:s}') self.state = ValueGB(self.moduleRow, 'pduFSM', '', 0, '{:s}') self.substate = ValueGB(self.moduleRow, 'pduFSM', '', 1, '{:s}') self.outlets = dict([(outlet, SwitchGB(self.moduleRow, outlet, outlet.capitalize(), 0, '{:g}')) for outlet in PduPanel.outletsConfig.values()]) self.voltage = ValueGB(self.moduleRow, 'atenVAW', 'Voltage', 0, '{:.2f}') self.current = ValueGB(self.moduleRow, 'atenVAW', 'Current', 1, '{:.2f}') self.power = ValueGB(self.moduleRow, 'atenVAW', 'Power', 2, '{:.2f}')
def createWidgets(self): self.mode = ValueGB(self.moduleRow, 'tempsMode', 'Mode', 0, '{:s}') self.state = ValueGB(self.moduleRow, 'tempsFSM', '', 0, '{:s}') self.substate = ValueGB(self.moduleRow, 'tempsFSM', '', 1, '{:s}') self.statusMsg = ValueGB(self.moduleRow, 'tempsStatus', 'Status', 1, '{:s}') self.slot1 = Slot(self.moduleRow, 1) self.slot2 = Slot(self.moduleRow, 2) self.temps1 = [ ValueGB(self.moduleRow, 'temps1', name, i, '{:.3f}') for i, name in enumerate(self.probeNames1) ] self.temps2 = [ ValueGB(self.moduleRow, 'temps2', name, i, '{:.3f}') for i, name in enumerate(self.probeNames2) ]
def __init__(self, ccdCmd): self.ccdCmd = ccdCmd ValueGB.__init__(self, ccdCmd.controlPanel.moduleRow, 'looptime', '', 0, '{:.2f}')
def createWidgets(self): label = self.stage.capitalize() self.state = ValueGB(self.moduleRow, 'ls%s' % label, '', 0, '{:s}') self.substate = ValueGB(self.moduleRow, 'ls%s' % label, '', 1, '{:s}') self.position = ValueGB(self.moduleRow, 'ls%s' % label, 'Position', 2, '{:.3f}')
def __init__(self, moduleRow): self.spinbox = SpinBoxGB('Period', 0, 65536) ValueGB.__init__(self, moduleRow, 'biaConfig', '', 1, '{:d}')
def __init__(self, moduleRow): self.spinbox = SpinBoxGB('Duty', 0, 255) ValueGB.__init__(self, moduleRow, 'biaConfig', '', 2, '{:d}')
def __init__(self, controlPanel, smId): self.label = SpecLabel(controlPanel.moduleRow, smId) self.lightSource = ValueGB(controlPanel.moduleRow, f'sm{smId}LightSource', '', 0, '{:s}')
def createWidgets(self): self.state = ValueGB(self.moduleRow, 'ccd', '', 0, '{:s}') self.substate = ValueGB(self.moduleRow, 'ccd', '', 1, '{:s}')