\(\renewcommand\AA{\unicode{x212B}}\)

WorkspaceGroup with Python

A Workspace Group is a workspace type that acts as a container for other workspaces. A WorkspaceGroup may be formed from any type of workspace and constructed on an arbitrary basis. WorkspaceGroups are also used to store multi-period data at ISIS.

A workspace group is essentially an array of workspaces.”

Determine if this is a groups workspace

Load(Filename="MUSR00015189", OutputWorkspace="groupWS")
groupWS = mtd["groupWS"]
print("Workspace Type: " + groupWS.id())

Looping over a WorkspaceGroup

for i in range(groupWS.size()):
    print(groupWS[i].name())

or, like this …

for ws in groupWS:
    print(ws.name())

Determine if this is multi-period data

print("Is multi-period data: {}".format(str(groupWS.isMultiPeriod())))