(self, filename='parameters_rbf.prm')
This method writes a parameters file (.prm) called `filename` and fills
        it with all the parameters class members. Default value is
        parameters_rbf.prm.

        :param string filename: parameters file to be written out.
This method writes a parameters file (.prm) called `filename` and fills
        it with all the parameters class members. Default value is
        parameters_rbf.prm.
This method writes a parameters file ( . prm ) called filename and fills it with all the parameters class members . Default value is parameters_rbf . prm .
def write_parameters(self, filename='parameters_rbf.prm'):
        """
        This method writes a parameters file (.prm) called `filename` and fills
        it with all the parameters class members. Default value is
        parameters_rbf.prm.

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

        output_string = ""
        output_string += '\n[Radial Basis Functions]\n'
        output_string += '# This section describes the radial basis functions'
        output_string += ' shape.\n'

        output_string += '\n# basis funtion is the name of the basis functions'
        output_string += ' to use in the transformation. The functions\n'
        output_string += '# implemented so far are: gaussian_spline,'
        output_string += ' multi_quadratic_biharmonic_spline,\n'
        output_string += '# inv_multi_quadratic_biharmonic_spline,'
        output_string += ' thin_plate_spline, beckert_wendland_c2_basis,'
        output_string += ' polyharmonic_spline.\n'
        output_string += '# For a comprehensive list with details see the'
        output_string += ' class RBF.\n'
        output_string += 'basis function: {}\n'.format('gaussian_spline')

        output_string += '\n# radius is the scaling parameter r that affects'
        output_string += ' the shape of the basis functions. See the'
        output_string += ' documentation\n'
        output_string += '# of the class RBF for details.\n'
        output_string += 'radius: {}\n'.format(str(self.radius))

        output_string += '\n\n[Control points]\n'
        output_string += '# This section describes the RBF control points.\n'

        output_string += '\n# original control points collects the coordinates'
        output_string += ' of the interpolation control points before the'
        output_string += ' deformation.\n'

        output_string += 'original control points:'
        offset = 1
        for i in range(0, self.n_control_points):
            output_string += offset * ' ' + str(
                self.original_control_points[i][0]) + '   ' + str(
                    self.original_control_points[i][1]) + '   ' + str(
                        self.original_control_points[i][2]) + '\n'
            offset = 25

        output_string += '\n# deformed control points collects the coordinates'
        output_string += ' of the interpolation control points after the'
        output_string += ' deformation.\n'

        output_string += 'deformed control points:'
        offset = 1
        for i in range(0, self.n_control_points):
            output_string += offset * ' ' + str(
                self.deformed_control_points[i][0]) + '   ' + str(
                    self.deformed_control_points[i][1]) + '   ' + str(
                        self.deformed_control_points[i][2]) + '\n'
            offset = 25

        with open(filename, 'w') as f:
            f.write(output_string)
def write_parameters ( self , filename = 'parameters_rbf.prm' ) : if not isinstance ( filename , str ) : raise TypeError ( "filename must be a string" ) output_string = "" output_string += '\n[Radial Basis Functions]\n' output_string += '# This section describes the radial basis functions' output_string += ' shape.\n' output_string += '\n# basis funtion is the name of the basis functions' output_string += ' to use in the transformation. The functions\n' output_string += '# implemented so far are: gaussian_spline,' output_string += ' multi_quadratic_biharmonic_spline,\n' output_string += '# inv_multi_quadratic_biharmonic_spline,' output_string += ' thin_plate_spline, beckert_wendland_c2_basis,' output_string += ' polyharmonic_spline.\n' output_string += '# For a comprehensive list with details see the' output_string += ' class RBF.\n' output_string += 'basis function: {}\n' . format ( 'gaussian_spline' ) output_string += '\n# radius is the scaling parameter r that affects' output_string += ' the shape of the basis functions. See the' output_string += ' documentation\n' output_string += '# of the class RBF for details.\n' output_string += 'radius: {}\n' . format ( str ( self . radius ) ) output_string += '\n\n[Control points]\n' output_string += '# This section describes the RBF control points.\n' output_string += '\n# original control points collects the coordinates' output_string += ' of the interpolation control points before the' output_string += ' deformation.\n' output_string += 'original control points:' offset = 1 for i in range ( 0 , self . n_control_points ) : output_string += offset * ' ' + str ( self . original_control_points [ i ] [ 0 ] ) + '   ' + str ( self . original_control_points [ i ] [ 1 ] ) + '   ' + str ( self . original_control_points [ i ] [ 2 ] ) + '\n' offset = 25 output_string += '\n# deformed control points collects the coordinates' output_string += ' of the interpolation control points after the' output_string += ' deformation.\n' output_string += 'deformed control points:' offset = 1 for i in range ( 0 , self . n_control_points ) : output_string += offset * ' ' + str ( self . deformed_control_points [ i ] [ 0 ] ) + '   ' + str ( self . deformed_control_points [ i ] [ 1 ] ) + '   ' + str ( self . deformed_control_points [ i ] [ 2 ] ) + '\n' offset = 25 with open ( filename , 'w' ) as f : f . write ( output_string )