(self, filename)
Reads in the parameters file and fill the self structure.

        :param string filename: parameters file to be read in.
Reads in the parameters file and fill the self structure.
Reads in the parameters file and fill the self structure .
def read_parameters(self, filename):
        """
        Reads in the parameters file and fill the self structure.

        :param string filename: parameters file to be read in.
        """
        if not isinstance(filename, str):
            raise TypeError('filename must be a string')

        if not os.path.isfile(filename):
            raise IOError('filename does not exist')

        config = configparser.RawConfigParser()
        config.read(filename)

        self.power = config.getint('Inverse Distance Weighting', 'power')

        ctrl_points = config.get('Control points', 'original control points')
        self.original_control_points = np.array(
            [line.split() for line in ctrl_points.split('\n')], dtype=float)

        defo_points = config.get('Control points', 'deformed control points')
        self.deformed_control_points = np.array(
            [line.split() for line in defo_points.split('\n')], dtype=float)
def read_parameters ( self , filename ) : if not isinstance ( filename , str ) : raise TypeError ( 'filename must be a string' ) if not os . path . isfile ( filename ) : raise IOError ( 'filename does not exist' ) config = configparser . RawConfigParser ( ) config . read ( filename ) self . power = config . getint ( 'Inverse Distance Weighting' , 'power' ) ctrl_points = config . get ( 'Control points' , 'original control points' ) self . original_control_points = np . array ( [ line . split ( ) for line in ctrl_points . split ( '\n' ) ] , dtype = float ) defo_points = config . get ( 'Control points' , 'deformed control points' ) self . deformed_control_points = np . array ( [ line . split ( ) for line in defo_points . split ( '\n' ) ] , dtype = float )