parameters: (self)
return_statement: return True
docstring: Populates the ReST table with algorithm properties.
docstring_summary: Populates the ReST table with algorithm properties.
docstring_tokens: Populates the ReST table with algorithm properties .
function: def _create_properties_table(self):
          """
          Populates the ReST table with algorithm properties.
          """
          if self.algorithm_version() is None: # This is an IFunction
              ifunc = self.create_mantid_ifunction(self.algorithm_name())
              if ifunc.numParams() <= 0:
                  return False
  
              # Stores each property of the algorithm in a tuple.
              properties = []
  
              # names for the table headers.
              header = ('Name', 'Default', 'Description')
  
              for i in range(ifunc.numParams()):
                  properties.append((ifunc.parameterName(i),
                                     str(ifunc.getParameterValue(i)),
                                     ifunc.paramDescription(i)))
              self.add_rst(self.make_header("Properties (fitting parameters)"))
          else: # this is an Algorithm
              alg = self.create_mantid_algorithm(self.algorithm_name(),
                                                 self.algorithm_version())
              alg_properties = alg.getProperties()
              if len(alg_properties) == 0:
                  return False
  
              # Stores each property of the algorithm in a tuple.
              properties = []
  
              # names for the table headers.
              header = ('Name', 'Direction', 'Type', 'Default', 'Description')
  
              # Used to obtain the name for the direction property rather than an
              # int.
              direction_string = ["Input", "Output", "InOut", "None"]
  
              #dictionary to convert from property type to link to category page (where possible)
              property_type_dict = {
                  "Workspace":":ref:`Workspace <Workspace>`",
                  "Workspace2D":":ref:`Workspace2D <Workspace2D>`",
                  "EventWorkspace":":ref:`EventWorkspace <EventWorkspace>`",
                  "MatrixWorkspace":":ref:`MatrixWorkspace <MatrixWorkspace>`",
                  "GroupWorkspace":":ref:`GroupWorkspace <WorkspaceGroup>`",
                  "MDEventWorkspace":":ref:`MDEventWorkspace <MDWorkspace>`",
                  "MDHistoWorkspace":":ref:`MDHistoWorkspace <MDHistoWorkspace>`",
                  "TableWorkspace":":ref:`TableWorkspace <Table Workspaces>`"
              }
  
              for prop in alg_properties:
                  # Append a tuple of properties to the list.
                  properties.append((
                      str(prop.name),
                      str(direction_string[prop.direction]),
                      property_type_dict.get(str(prop.type),str(prop.type)),
                      str(self._get_default_prop(prop)),
                      self._create_property_description_string(prop)
                      ))
  
              self.add_rst(self.make_header("Properties"))
          self.add_rst(self._build_table(header, properties))
          return True
function_tokens: def _create_properties_table ( self ) : if self . algorithm_version ( ) is None : # This is an IFunction ifunc = self . create_mantid_ifunction ( self . algorithm_name ( ) ) if ifunc . numParams ( ) <= 0 : return False # Stores each property of the algorithm in a tuple. properties = [ ] # names for the table headers. header = ( 'Name' , 'Default' , 'Description' ) for i in range ( ifunc . numParams ( ) ) : properties . append ( ( ifunc . parameterName ( i ) , str ( ifunc . getParameterValue ( i ) ) , ifunc . paramDescription ( i ) ) ) self . add_rst ( self . make_header ( "Properties (fitting parameters)" ) ) else : # this is an Algorithm alg = self . create_mantid_algorithm ( self . algorithm_name ( ) , self . algorithm_version ( ) ) alg_properties = alg . getProperties ( ) if len ( alg_properties ) == 0 : return False # Stores each property of the algorithm in a tuple. properties = [ ] # names for the table headers. header = ( 'Name' , 'Direction' , 'Type' , 'Default' , 'Description' ) # Used to obtain the name for the direction property rather than an # int. direction_string = [ "Input" , "Output" , "InOut" , "None" ] #dictionary to convert from property type to link to category page (where possible) property_type_dict = { "Workspace" : ":ref:`Workspace <Workspace>`" , "Workspace2D" : ":ref:`Workspace2D <Workspace2D>`" , "EventWorkspace" : ":ref:`EventWorkspace <EventWorkspace>`" , "MatrixWorkspace" : ":ref:`MatrixWorkspace <MatrixWorkspace>`" , "GroupWorkspace" : ":ref:`GroupWorkspace <WorkspaceGroup>`" , "MDEventWorkspace" : ":ref:`MDEventWorkspace <MDWorkspace>`" , "MDHistoWorkspace" : ":ref:`MDHistoWorkspace <MDHistoWorkspace>`" , "TableWorkspace" : ":ref:`TableWorkspace <Table Workspaces>`" } for prop in alg_properties : # Append a tuple of properties to the list. properties . append ( ( str ( prop . name ) , str ( direction_string [ prop . direction ] ) , property_type_dict . get ( str ( prop . type ) , str ( prop . type ) ) , str ( self . _get_default_prop ( prop ) ) , self . _create_property_description_string ( prop ) ) ) self . add_rst ( self . make_header ( "Properties" ) ) self . add_rst ( self . _build_table ( header , properties ) ) return True