def init(self): self.motor_name = "Zoom" self.motor_pos_attr_suffix = "Position" self._last_position_name = None MD2Motor.init(self) self.predefined_position_attr = self.addChannel( { "type": "exporter", "name": "predefined_position" }, "CoaxialCameraZoomValue") self.predefinedPositions = { "Zoom 1": 1, "Zoom 2": 2, "Zoom 3": 3, "Zoom 4": 4, "Zoom 5": 5, "Zoom 6": 6, "Zoom 7": 7, "Zoom 8": 8, "Zoom 9": 9, "Zoom 10": 10 } self.sortPredefinedPositionsList()
def init(self): MD2Motor.init(self) offset_chan = self.addChannel( {"type": "exporter", "name": "offset"}, "SampleHolderLength" ) # self.offset_chan.connectSignal("update", self.offsetChanged) self.offset = offset_chan.getValue()
def init(self): diffractometer_hwobj = self.getObjectByRole("controller") if diffractometer_hwobj.in_plate_mode(): self.motor_name = self.getProperty("centring_focus") else: self.motor_name = self.getProperty("alignment_focus") MD2Motor.init(self)
def __init__(self, name): MD2Motor.__init__(self, name) self.motor_name = name self.sampx = None self.sampy = None self.phi = None self.direction = None self.motorState = MD2Motor.NOTINITIALIZED
def init(self): self.motor_name = "Zoom" self.motor_pos_attr_suffix = "Position" self._last_position_name = None MD2Motor.init(self) self.predefined_position_attr = self.addChannel({"type":"exporter", "name":"predefined_position" }, "CoaxialCameraZoomValue") self.predefinedPositions = { "Zoom 1": 1, "Zoom 2": 2, "Zoom 3": 3, "Zoom 4": 4, "Zoom 5": 5, "Zoom 6": 6, "Zoom 7": 7, "Zoom 8": 8, "Zoom 9": 9, "Zoom 10":10 } self.sortPredefinedPositionsList()
def init(self): self.motor_name = self.getProperty("motor_name") if not self.getMotorMnemonic() in ('Kappa', 'Phi'): raise RuntimeError("MicrodiffKappaMotor class is only for kappa motors") MicrodiffKappaMotor.motors[self.getMotorMnemonic()]=self if self.getMotorMnemonic() == 'Kappa': MicrodiffKappaMotor.conf['KappaTrans'] = self.stringToList(self.kappaTrans) MicrodiffKappaMotor.conf['KappaTransD'] = self.stringToList(self.kappaTransD) elif self.getMotorMnemonic() == 'Phi': MicrodiffKappaMotor.conf['PhiTrans'] = self.stringToList(self.phiTrans) MicrodiffKappaMotor.conf['PhiTransD'] = self.stringToList(self.phiTransD) MD2Motor.init(self) self.sampx = self.getObjectByRole("sampx") self.sampy = self.getObjectByRole("sampy") self.phiy = self.getObjectByRole("phiy")
def init(self): self.motor_name = self.getProperty("motor_name") if not self.getMotorMnemonic() in ('Kappa', 'Phi'): raise RuntimeError( "MicrodiffKappaMotor class is only for kappa motors") MicrodiffKappaMotor.motors[self.getMotorMnemonic()] = self if self.getMotorMnemonic() == 'Kappa': MicrodiffKappaMotor.conf['KappaTrans'] = self.stringToList( self.kappaTrans) MicrodiffKappaMotor.conf['KappaTransD'] = self.stringToList( self.kappaTransD) elif self.getMotorMnemonic() == 'Phi': MicrodiffKappaMotor.conf['PhiTrans'] = self.stringToList( self.phiTrans) MicrodiffKappaMotor.conf['PhiTransD'] = self.stringToList( self.phiTransD) MD2Motor.init(self) self.sampx = self.getObjectByRole("sampx") self.sampy = self.getObjectByRole("sampy") self.phiy = self.getObjectByRole("phiy")
def init(self): self.motor_name = "CurrentApertureDiameter" self.motor_pos_attr_suffix = "Index" MD2Motor.init(self) self.aperture_inout = self.getObjectByRole('inout') self.predefinedPositions = {} self.labels = self.addChannel({"type":"exporter", "name":"ap_labels" }, "ApertureDiameters") self.filters = self.labels.getValue() self.nb = len(self.filters) j = 0 while j < self.nb : for i in self.filters: if int(i) >= 300: i = "Outbeam" self.predefinedPositions[i] = j j = j+1 if not "Outbeam" in self.predefinedPositions: self.predefinedPositions["Outbeam"] = self.predefinedPositions.__len__() self.predefinedPositions.pop("Outbeam") self.sortPredefinedPositionsList()
def __init__(self,name): MD2Motor.__init__(self,name)
def getLimits(self): low_lim, hi_lim = MD2Motor.getLimits(self) return ((low_lim + self.offset), (hi_lim+self.offset))
def __init__(self, *args): MD2Motor.__init__(self, *args)
def motorPositionChanged(self, absolutePosition, private={}): MD2Motor.motorPositionChanged(self, absolutePosition, private)
def init(self): MD2Motor.init(self) offset_chan = self.addChannel({"type":"exporter", "name":"offset" }, "SampleHolderLength") #self.offset_chan.connectSignal("update", self.offsetChanged) self.offset = offset_chan.getValue()
def move(self, absolutePosition): MD2Motor.move(self, self.offset - absolutePosition)
def getLimits(self): low_lim, hi_lim = MD2Motor.getLimits(self) return ((low_lim + self.offset), (hi_lim + self.offset))
def motorPositionChanged(self, absolutePosition, private={}): MD2Motor.motorPositionChanged(self, self.offset - absolutePosition)
def move(self, absolutePosition): MD2Motor.move(self, self.offset-absolutePosition)
def __init__(self, name): MD2Motor.__init__(self, name)