Example #1
0
 def __init__(self, name):
     ExporterMotor.__init__(self, name)
     self.predefined_positions = []
     self._exporter = None
     self.position_channel = None
     self.motor_state = None
     self.aperture_factor = None
Example #2
0
    def init(self):
        self.actuator_name = "Zoom"
        self.motor_pos_attr_suffix = "Position"
        self._last_position_name = None

        self.chan_predefined_position = self.add_channel(
            {
                "type": "exporter",
                "name": "predefined_position"
            },
            "CoaxialCameraZoomValue",
        )

        self.predefined_positions = {
            "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.sort_predefined_positions_list()
        self.set_limits((0, 10))
        self.update_state(self.motor_states.READY)

        ExporterMotor.init(self)
 def init(self):
     ExporterMotor.init(self)
     try:
         _low, _high = self.get_property("limits").split(",")
         self._limits = (float(_low), float(_high))
     except (AttributeError, TypeError, ValueError):
         self._limits = (0, 10)
     self.chan_light_is_on = self.get_channel_object("chanLightIsOn")
 def init(self):
     ExporterMotor.init(self)
     if not self.actuator_name in ("Kappa", "Phi"):
         raise RuntimeError("MicrodiffKappaMotor class is only for kappa motors")
     MicrodiffKappaMotor.motors[self.actuator_name] = self
     if self.actuator_name == "Kappa":
         MicrodiffKappaMotor.conf["KappaTrans"] = self.stringToList(self.kappaTrans)
         MicrodiffKappaMotor.conf["KappaTransD"] = self.stringToList(
             self.kappaTransD
         )
     elif self.actuator_name == "Phi":
         MicrodiffKappaMotor.conf["PhiTrans"] = self.stringToList(self.phiTrans)
         MicrodiffKappaMotor.conf["PhiTransD"] = self.stringToList(self.phiTransD)
     self.sampx = self.get_object_by_role("sampx")
     self.sampy = self.get_object_by_role("sampy")
     self.phiy = self.get_object_by_role("phiy")
Example #5
0
    def init(self):
        """Initialize the aperture"""
        ExporterMotor.init(self)
        _exporter_address = self.getProperty("exporter_address")
        """
        self.position_channel = self.add_channel(
            {
                "type": "exporter",
                "exporter_address": _exporter_address,
                "name": "aperture_position",
            },
            "CurrentApertureDiameterIndex"
        )
        if self.position_channel:
            self.get_value()
            self.position_channel.connectSignal("update", self.update_value)
        """

        self.motor_state = self.add_channel(
            {
                "type": "exporter",
                "exporter_address": _exporter_address,
                "name": "aperture_state",
            },
            "State",
        )

        if self.motor_state:
            self.motor_state.connectSignal("update", self._update_state)

        self.predefined_positions = self._exporter.read_property(
            "ApertureDiameters")
        if 300 not in self.predefined_positions:
            self.predefined_positions.append(300)

        self.update_state()
Example #6
0
 def __init__(self, name):
     ExporterMotor.__init__(self, name)
 def __init__(self, name):
     ExporterMotor.__init__(self, name)
     self._motor_pos_suffix = "Level"