コード例 #1
0
    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()
コード例 #2
0
 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()
コード例 #3
0
    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)
コード例 #4
0
    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
コード例 #5
0
    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
コード例 #6
0
    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()
コード例 #7
0
 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")
コード例 #8
0
 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")
コード例 #9
0
    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()
コード例 #10
0
 def __init__(self,name):
     MD2Motor.__init__(self,name)
コード例 #11
0
 def getLimits(self):
     low_lim, hi_lim = MD2Motor.getLimits(self)
     return ((low_lim + self.offset), (hi_lim+self.offset))
コード例 #12
0
 def __init__(self, *args):
     MD2Motor.__init__(self, *args)
コード例 #13
0
 def motorPositionChanged(self, absolutePosition, private={}):
     MD2Motor.motorPositionChanged(self, absolutePosition, private)
コード例 #14
0
 def __init__(self, *args):
     MD2Motor.__init__(self, *args)
コード例 #15
0
 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()
コード例 #16
0
 def move(self, absolutePosition):
     MD2Motor.move(self, self.offset - absolutePosition)
コード例 #17
0
 def getLimits(self):
     low_lim, hi_lim = MD2Motor.getLimits(self)
     return ((low_lim + self.offset), (hi_lim + self.offset))
コード例 #18
0
 def motorPositionChanged(self, absolutePosition, private={}):
     MD2Motor.motorPositionChanged(self, self.offset - absolutePosition)
コード例 #19
0
 def move(self, absolutePosition):
     MD2Motor.move(self, self.offset-absolutePosition)
コード例 #20
0
 def __init__(self, name):
     MD2Motor.__init__(self, name)