irrad_control/devices/stage/xystage.py
def _check_scan(self, scan_params):
        """
        Method to do sanity checks on the *scan_params* dict.

        Parameters
        ----------
        scan_params : dict
            dict containing all the info for doing a scan of a rectangular area.
            If *scan_params* is None, use instance attribute self.scan_params instead.
        """

        # Check if dict is empty or not dict
        if not scan_params or not isinstance(scan_params, dict):
            msg = "Scan parameter dict is empty or not of type dictionary! " \
                  "Try using prepare_scan method or fill missing info in dict. Abort."
            logging.error(msg)
            return False

        # Check if scan_params dict contains all necessary info
        scan_reqs = ('origin', 'start_pos', 'end_pos', 'n_rows', 'rows',
                     'speed', 'step_size', 'tcp_address', 'server')
        missed_reqs = [req for req in scan_reqs if req not in scan_params]

        # Return if info is missing
        if missed_reqs:
            msg = "Scan parameter dict is missing required info: {}. " \
                  "Try using prepare_scan method or fill missing info in dict. Abort.".format(', '.join(missed_reqs))
            logging.error(msg)
            return False

        return True

        Method to do sanity checks on the *scan_params* dict.

        Parameters
        ----------
        scan_params : dict
            dict containing all the info for doing a scan of a rectangular area.
            If *scan_params* is None, use instance attribute self.scan_params instead.
        
Method to do sanity checks on the *scan_params* dict.
Parameters

scan_params : dict
dict containing all the info for doing a scan of a rectangular area.
If *scan_params* is None, use instance attribute self.scan_params instead.
Method to do sanity checks on the * scan_params * dict . Parameters scan_params : dict dict containing all the info for doing a scan of a rectangular area . If * scan_params * is None use instance attribute self . scan_params instead .
def _check_scan(self, scan_params):
        if not scan_params or not isinstance(scan_params, dict):
            msg = "Scan parameter dict is empty or not of type dictionary! " \
                  "Try using prepare_scan method or fill missing info in dict. Abort."
            logging.error(msg)
            return False
        scan_reqs = ('origin', 'start_pos', 'end_pos', 'n_rows', 'rows',
                     'speed', 'step_size', 'tcp_address', 'server')
        missed_reqs = [req for req in scan_reqs if req not in scan_params]
        if missed_reqs:
            msg = "Scan parameter dict is missing required info: {}. " \
                  "Try using prepare_scan method or fill missing info in dict. Abort.".format(', '.join(missed_reqs))
            logging.error(msg)
            return False
        return True
def _check_scan ( self , scan_params ) : if not scan_params or not isinstance ( scan_params , dict ) : msg = "Scan parameter dict is empty or not of type dictionary! " "Try using prepare_scan method or fill missing info in dict. Abort." logging . error ( msg ) return False scan_reqs = ( 'origin' , 'start_pos' , 'end_pos' , 'n_rows' , 'rows' , 'speed' , 'step_size' , 'tcp_address' , 'server' ) missed_reqs = [ req for req in scan_reqs if req not in scan_params ] if missed_reqs : msg = "Scan parameter dict is missing required info: {}. " "Try using prepare_scan method or fill missing info in dict. Abort." . format ( ', ' . join ( missed_reqs ) ) logging . error ( msg ) return False return True
Method to do sanity checks on the *scan_params* dict.
Method to do sanity checks on the * scan_params * dict .
"""
        Method to do sanity checks on the *scan_params* dict.

        Parameters
        ----------
        scan_params : dict
            dict containing all the info for doing a scan of a rectangular area.
            If *scan_params* is None, use instance attribute self.scan_params instead.
        """ # Check if dict is empty or not dict # Check if scan_params dict contains all necessary info # Return if info is missing
self
scan_params