parameters: (calibration_workspace, workspace, missing_parameters, parent_alg)
docstring: Transfers missing properties from the data workspace to the calibration workspace.
  
      :param calibration_workspace: the calibration workspace.
      :param workspace: the data workspace.
      :param missing_parameters: a list of missing parameters which exist on the data workspace but not on the calibration
                                 workspace.
      :param parent_alg: a handle to the parent algorithm
docstring_summary: Transfers missing properties from the data workspace to the calibration workspace.
docstring_tokens: Transfers missing properties from the data workspace to the calibration workspace .
function: def apply_missing_parameters(calibration_workspace, workspace, missing_parameters, parent_alg):
      """
      Transfers missing properties from the data workspace to the calibration workspace.
  
      :param calibration_workspace: the calibration workspace.
      :param workspace: the data workspace.
      :param missing_parameters: a list of missing parameters which exist on the data workspace but not on the calibration
                                 workspace.
      :param parent_alg: a handle to the parent algorithm
      """
      instrument = workspace.getInstrument()
      component_name = instrument.getName()
      component_name = sanitise_instrument_name(component_name)
      set_instrument_name = "SetInstrumentParameter"
      set_instrument_parameter_options = {"Workspace": calibration_workspace,
                                          "ComponentName": component_name}
      alg = create_child_algorithm(parent_alg, set_instrument_name, **set_instrument_parameter_options)
  
      # For now only string, int and double are handled
      type_options = {"string": "String", "int": "Number", "double": "Number"}
      value_options = {"string": instrument.getStringParameter,
                       "int": instrument.getIntParameter,
                       "double": instrument.getNumberParameter}
      try:
          for missing_parameter in missing_parameters:
              parameter_type = instrument.getParameterType(missing_parameter)
              type_to_save = type_options[parameter_type]
              value = value_options[parameter_type](missing_parameter)
  
              alg.setProperty("ParameterName", missing_parameter)
              alg.setProperty("ParameterType", type_to_save)
              alg.setProperty("Value", str(value[0]))
      except KeyError:
          raise RuntimeError("SANSCalibration: An Instrument Parameter File value of unknown type"
                             "was going to be copied. Cannot handle this currently.")
function_tokens: def apply_missing_parameters ( calibration_workspace , workspace , missing_parameters , parent_alg ) : instrument = workspace . getInstrument ( ) component_name = instrument . getName ( ) component_name = sanitise_instrument_name ( component_name ) set_instrument_name = "SetInstrumentParameter" set_instrument_parameter_options = { "Workspace" : calibration_workspace , "ComponentName" : component_name } alg = create_child_algorithm ( parent_alg , set_instrument_name , * * set_instrument_parameter_options ) # For now only string, int and double are handled type_options = { "string" : "String" , "int" : "Number" , "double" : "Number" } value_options = { "string" : instrument . getStringParameter , "int" : instrument . getIntParameter , "double" : instrument . getNumberParameter } try : for missing_parameter in missing_parameters : parameter_type = instrument . getParameterType ( missing_parameter ) type_to_save = type_options [ parameter_type ] value = value_options [ parameter_type ] ( missing_parameter ) alg . setProperty ( "ParameterName" , missing_parameter ) alg . setProperty ( "ParameterType" , type_to_save ) alg . setProperty ( "Value" , str ( value [ 0 ] ) ) except KeyError : raise RuntimeError ( "SANSCalibration: An Instrument Parameter File value of unknown type" "was going to be copied. Cannot handle this currently." )