irrad_control/devices/stage/xystage.py
def prepare_scan(self, rel_start_point, rel_end_point, scan_speed, step_size, tcp_address, server):
        """
        Prepares a scan by storing all needed info in self.scan_params

        Parameters
        ----------
        rel_start_point : tuple, list
            iterable of starting point (x [mm], y [mm]) relative to current position, defining upper left corner of area
        rel_end_point : tuple, list
            iterable of end point (x [mm], y [mm]) relative to current position, defining lower right corner of area
        scan_speed : float
            horizontal scan speed in mm / s
        step_size : float
            stepp size of vertical steps in mm
        tcp_address : str
            tcp address to which data of stage is published during scan
        server : str
            IP address of server which controls the stage
        """

        # Store position which is used as origin of relative coordinate system for scan
        self.scan_params['origin'] = (self.x_axis.get_position(), self.y_axis.get_position())

        # Store starting scan position
        self.scan_params['start_pos'] = (self.scan_params['origin'][0] - self.distance_to_steps(rel_start_point[0]),
                                         # inverted y-axis
                                         self.scan_params['origin'][1] + self.distance_to_steps(rel_start_point[1]))

        # Store end position of scan
        self.scan_params['end_pos'] = (self.scan_params['origin'][0] - self.distance_to_steps(rel_end_point[0]),
                                       # inverted y-axis
                                       self.scan_params['origin'][1] + self.distance_to_steps(rel_end_point[1]))

        # Store input args
        self.scan_params['speed'] = scan_speed
        self.scan_params['step_size'] = step_size
        self.scan_params['tcp_address'] = tcp_address
        self.scan_params['server'] = server

        # Calculate number of rows for the scan
        dy = self.distance_to_steps(step_size, unit='mm')
        self.scan_params['n_rows'] = int(abs(self.scan_params['end_pos'][1] - self.scan_params['start_pos'][1]) / dy)

        # Make dictionary with absolute position (in steps) of each row
        rows = [(row, self.scan_params['start_pos'][1] - row * dy) for row in range(self.scan_params['n_rows'])]
        self.scan_params['rows'] = dict(rows)

        Prepares a scan by storing all needed info in self.scan_params

        Parameters
        ----------
        rel_start_point : tuple, list
            iterable of starting point (x [mm], y [mm]) relative to current position, defining upper left corner of area
        rel_end_point : tuple, list
            iterable of end point (x [mm], y [mm]) relative to current position, defining lower right corner of area
        scan_speed : float
            horizontal scan speed in mm / s
        step_size : float
            stepp size of vertical steps in mm
        tcp_address : str
            tcp address to which data of stage is published during scan
        server : str
            IP address of server which controls the stage
        
Prepares a scan by storing all needed info in self.scan_params
Parameters


Prepares a scan by storing all needed info in self . scan_params Parameters
def prepare_scan(self, rel_start_point, rel_end_point, scan_speed, step_size, tcp_address, server):
        self.scan_params['origin'] = (self.x_axis.get_position(), self.y_axis.get_position())
        self.scan_params['start_pos'] = (self.scan_params['origin'][0] - self.distance_to_steps(rel_start_point[0]),
                                         self.scan_params['origin'][1] + self.distance_to_steps(rel_start_point[1]))
        self.scan_params['end_pos'] = (self.scan_params['origin'][0] - self.distance_to_steps(rel_end_point[0]),
                                       self.scan_params['origin'][1] + self.distance_to_steps(rel_end_point[1]))
        self.scan_params['speed'] = scan_speed
        self.scan_params['step_size'] = step_size
        self.scan_params['tcp_address'] = tcp_address
        self.scan_params['server'] = server
        dy = self.distance_to_steps(step_size, unit='mm')
        self.scan_params['n_rows'] = int(abs(self.scan_params['end_pos'][1] - self.scan_params['start_pos'][1]) / dy)
        rows = [(row, self.scan_params['start_pos'][1] - row * dy) for row in range(self.scan_params['n_rows'])]
        self.scan_params['rows'] = dict(rows)
def prepare_scan ( self , rel_start_point , rel_end_point , scan_speed , step_size , tcp_address , server ) : self . scan_params [ 'origin' ] = ( self . x_axis . get_position ( ) , self . y_axis . get_position ( ) ) self . scan_params [ 'start_pos' ] = ( self . scan_params [ 'origin' ] [ 0 ] - self . distance_to_steps ( rel_start_point [ 0 ] ) , self . scan_params [ 'origin' ] [ 1 ] + self . distance_to_steps ( rel_start_point [ 1 ] ) ) self . scan_params [ 'end_pos' ] = ( self . scan_params [ 'origin' ] [ 0 ] - self . distance_to_steps ( rel_end_point [ 0 ] ) , self . scan_params [ 'origin' ] [ 1 ] + self . distance_to_steps ( rel_end_point [ 1 ] ) ) self . scan_params [ 'speed' ] = scan_speed self . scan_params [ 'step_size' ] = step_size self . scan_params [ 'tcp_address' ] = tcp_address self . scan_params [ 'server' ] = server dy = self . distance_to_steps ( step_size , unit = 'mm' ) self . scan_params [ 'n_rows' ] = int ( abs ( self . scan_params [ 'end_pos' ] [ 1 ] - self . scan_params [ 'start_pos' ] [ 1 ] ) / dy ) rows = [ ( row , self . scan_params [ 'start_pos' ] [ 1 ] - row * dy ) for row in range ( self . scan_params [ 'n_rows' ] ) ] self . scan_params [ 'rows' ] = dict ( rows )
Prepares a scan by storing all needed info in self.scan_params
Parameters
Prepares a scan by storing all needed info in self . scan_params Parameters
"""
        Prepares a scan by storing all needed info in self.scan_params

        Parameters
        ----------
        rel_start_point : tuple, list
            iterable of starting point (x [mm], y [mm]) relative to current position, defining upper left corner of area
        rel_end_point : tuple, list
            iterable of end point (x [mm], y [mm]) relative to current position, defining lower right corner of area
        scan_speed : float
            horizontal scan speed in mm / s
        step_size : float
            stepp size of vertical steps in mm
        tcp_address : str
            tcp address to which data of stage is published during scan
        server : str
            IP address of server which controls the stage
        """ # Store position which is used as origin of relative coordinate system for scan # Store starting scan position # inverted y-axis # Store end position of scan # inverted y-axis # Store input args # Calculate number of rows for the scan # Make dictionary with absolute position (in steps) of each row
self
rel_start_point
rel_end_point
scan_speed
step_size
tcp_address
server