irrad_control/devices/stage/xystage.py
def move_relative(self, distance, axis, unit=None):
        """
        Method to move either in vertical or horizontal direction relative to the current position.
        Does sanity check on travel destination and axis

        Parameters
        ----------
        distance : float
            distance of travel
        axis : zaber.serial.AsciiAxis
            either self.x_axis or self.y_axis
        unit : None, str
            unit in which distance is given. Must be in self.dist_units. If None, interpret as steps
        """

        # Get distance in steps
        dist_steps = distance if unit is None else self.distance_to_steps(distance, unit)

        # Get current position
        curr_pos = axis.get_position()

        # Get minimum and maximum steps of travel
        min_step, max_step = int(axis.send("get limit.min").data), int(axis.send("get limit.max").data)

        # Vertical axis is inverted; multiply with distance with -1
        if axis is self.y_axis:
            dist_steps *= -1

        # Check whether there's still room to move
        if not min_step <= curr_pos + dist_steps <= max_step:
            logging.error("Movement out of travel range. Abort!")
            return

        # Send command to axis and return reply
        _reply = axis.move_rel(dist_steps)
        self._check_reply(_reply)

        # Update position
        self.position = self.get_position()

        return _reply

        Method to move either in vertical or horizontal direction relative to the current position.
        Does sanity check on travel destination and axis

        Parameters
        ----------
        distance : float
            distance of travel
        axis : zaber.serial.AsciiAxis
            either self.x_axis or self.y_axis
        unit : None, str
            unit in which distance is given. Must be in self.dist_units. If None, interpret as steps
        
Method to move either in vertical or horizontal direction relative to the current position.
Does sanity check on travel destination and axis

Parameters

distance : float
distance of travel
axis : zaber.serial.AsciiAxis
either self.x_axis or self.y_axis
unit : None, str
unit in which distance is given.
Method to move either in vertical or horizontal direction relative to the current position . Does sanity check on travel destination and axis Parameters distance : float distance of travel axis : zaber . serial . AsciiAxis either self . x_axis or self . y_axis unit : None str unit in which distance is given .
def move_relative(self, distance, axis, unit=None):
        dist_steps = distance if unit is None else self.distance_to_steps(distance, unit)
        curr_pos = axis.get_position()
        min_step, max_step = int(axis.send("get limit.min").data), int(axis.send("get limit.max").data)
        if axis is self.y_axis:
            dist_steps *= -1
        if not min_step <= curr_pos + dist_steps <= max_step:
            logging.error("Movement out of travel range. Abort!")
            return
        _reply = axis.move_rel(dist_steps)
        self._check_reply(_reply)
        self.position = self.get_position()
        return _reply
def move_relative ( self , distance , axis , unit = None ) : dist_steps = distance if unit is None else self . distance_to_steps ( distance , unit ) curr_pos = axis . get_position ( ) min_step , max_step = int ( axis . send ( "get limit.min" ) . data ) , int ( axis . send ( "get limit.max" ) . data ) if axis is self . y_axis : dist_steps *= - 1 if not min_step <= curr_pos + dist_steps <= max_step : logging . error ( "Movement out of travel range. Abort!" ) return _reply = axis . move_rel ( dist_steps ) self . _check_reply ( _reply ) self . position = self . get_position ( ) return _reply
Method to move either in vertical or horizontal direction relative to the current position.
Method to move either in vertical or horizontal direction relative to the current position .
"""
        Method to move either in vertical or horizontal direction relative to the current position.
        Does sanity check on travel destination and axis

        Parameters
        ----------
        distance : float
            distance of travel
        axis : zaber.serial.AsciiAxis
            either self.x_axis or self.y_axis
        unit : None, str
            unit in which distance is given. Must be in self.dist_units. If None, interpret as steps
        """ # Get distance in steps # Get current position # Get minimum and maximum steps of travel # Vertical axis is inverted; multiply with distance with -1 # Check whether there's still room to move # Send command to axis and return reply # Update position
self
distance
axis
unit