parameters: (self, reduction_mode_vs_output_workspaces, reduction_mode_vs_workspace_names)
docstring: Sets the output workspaces which can be HAB, LAB or Merged.
  
          At this step we also provide a workspace name to the sample logs which can be used later on for saving
          :param reduction_mode_vs_output_workspaces:  map from reduction mode to output workspace
          :param reduction_mode_vs_workspace_names: map from reduction mode to output workspace name
docstring_summary: Sets the output workspaces which can be HAB, LAB or Merged.
docstring_tokens: Sets the output workspaces which can be HAB LAB or Merged .
function: def set_output_workspaces(self, reduction_mode_vs_output_workspaces, reduction_mode_vs_workspace_names):
          """
          Sets the output workspaces which can be HAB, LAB or Merged.
  
          At this step we also provide a workspace name to the sample logs which can be used later on for saving
          :param reduction_mode_vs_output_workspaces:  map from reduction mode to output workspace
          :param reduction_mode_vs_workspace_names: map from reduction mode to output workspace name
          """
          workspace_group_merged = WorkspaceGroup()
          workspace_group_lab = WorkspaceGroup()
          workspace_group_hab = WorkspaceGroup()
          # Note that this breaks the flexibility that we have established with the reduction mode. We have not hardcoded
          # HAB or LAB anywhere which means that in the future there could be other detectors of relevance. Here we
          # reference HAB and LAB directly since we currently don't want to rely on dynamic properties. See also in PyInit
          for reduction_mode, output_workspaces in list(reduction_mode_vs_output_workspaces.items()):
              workspace_names = reduction_mode_vs_workspace_names[reduction_mode]
              for output_workspace, output_name in zip(output_workspaces, workspace_names):
                  # In an MPI reduction output_workspace is produced on the master rank, skip others.
                  if output_workspace is None:
                      continue
                  else:
                      AnalysisDataService.addOrReplace(output_name, output_workspace)
                  if reduction_mode is ReductionMode.MERGED:
                      workspace_group_merged.addWorkspace(output_workspace)
                  elif reduction_mode is ReductionMode.LAB:
                      workspace_group_lab.addWorkspace(output_workspace)
                  elif reduction_mode is ReductionMode.HAB:
                      workspace_group_hab.addWorkspace(output_workspace)
                  else:
                      raise RuntimeError("SANSSingleReduction: Cannot set the output workspace. "
                                         "The selected reduction mode {0} is unknown.".format(reduction_mode))
          if workspace_group_merged.size() > 0:
              self.setProperty("OutputWorkspaceMerged", workspace_group_merged)
          if workspace_group_lab.size() > 0:
              self.setProperty("OutputWorkspaceLAB", workspace_group_lab)
          if workspace_group_hab.size() > 0:
              self.setProperty("OutputWorkspaceHAB", workspace_group_hab)
function_tokens: def set_output_workspaces ( self , reduction_mode_vs_output_workspaces , reduction_mode_vs_workspace_names ) : workspace_group_merged = WorkspaceGroup ( ) workspace_group_lab = WorkspaceGroup ( ) workspace_group_hab = WorkspaceGroup ( ) # Note that this breaks the flexibility that we have established with the reduction mode. We have not hardcoded # HAB or LAB anywhere which means that in the future there could be other detectors of relevance. Here we # reference HAB and LAB directly since we currently don't want to rely on dynamic properties. See also in PyInit for reduction_mode , output_workspaces in list ( reduction_mode_vs_output_workspaces . items ( ) ) : workspace_names = reduction_mode_vs_workspace_names [ reduction_mode ] for output_workspace , output_name in zip ( output_workspaces , workspace_names ) : # In an MPI reduction output_workspace is produced on the master rank, skip others. if output_workspace is None : continue else : AnalysisDataService . addOrReplace ( output_name , output_workspace ) if reduction_mode is ReductionMode . MERGED : workspace_group_merged . addWorkspace ( output_workspace ) elif reduction_mode is ReductionMode . LAB : workspace_group_lab . addWorkspace ( output_workspace ) elif reduction_mode is ReductionMode . HAB : workspace_group_hab . addWorkspace ( output_workspace ) else : raise RuntimeError ( "SANSSingleReduction: Cannot set the output workspace. " "The selected reduction mode {0} is unknown." . format ( reduction_mode ) ) if workspace_group_merged . size ( ) > 0 : self . setProperty ( "OutputWorkspaceMerged" , workspace_group_merged ) if workspace_group_lab . size ( ) > 0 : self . setProperty ( "OutputWorkspaceLAB" , workspace_group_lab ) if workspace_group_hab . size ( ) > 0 : self . setProperty ( "OutputWorkspaceHAB" , workspace_group_hab )