GroupWorkspaces v1

../_images/GroupWorkspaces-v1_dlg.png

GroupWorkspaces dialog.

Summary

Takes workspaces as input and groups similar workspaces together.

Properties

Name Direction Type Default Description
InputWorkspaces Input str list Mandatory Names of the Input Workspaces to Group
OutputWorkspace Output WorkspaceGroup Mandatory Name of the workspace to be created as the output of grouping

Description

This algorithm takes two or more workspaces as input and creates an output workspace group.

Usage

# Create two workspaces
ws1 = CreateSampleWorkspace()
ws2 = CreateSampleWorkspace()

# Group them
group = GroupWorkspaces( [ws1,ws2] )

# Check the result
print("Workspace's type is {}".format(type(group)))
print('It has {} entries'.format(group.getNumberOfEntries()))
print('Its first  item is {}'.format(group.getItem(0)))
print('Its second item is {}'.format(group.getItem(1)))

Output

Workspace's type is <class 'mantid.api._api.WorkspaceGroup'>
It has 2 entries
Its first  item is ws1
Its second item is ws2

Categories: Algorithms | Transforms\Grouping | Utility\Workspaces

Source

C++ source: GroupWorkspaces.cpp (last modified: 2018-01-18)

C++ header: GroupWorkspaces.h (last modified: 2017-12-21)