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

GroupBySampleChangerPosition v1

../_images/ImageNotFound.png

Enable screenshots using DOCS_SCREENSHOTS in CMake

Summary

Separates a Group workspace into groups based on sample changer position.

Properties

Name

Direction

Type

Default

Description

InputWorkspace

Input

WorkspaceGroup

Mandatory

Workspace group for the workspaces to be sorted.

OutputGroupPrefix

Input

string

String to prefix the output groups.

OutputGroupSuffix

Input

string

String to suffix the output groups.

OutputWorkspaceList

Output

str list

List of Workspace groups for the resulting workspaces.

Description

Sorts workspaces into groups based on their sample changer position

Usage

Example - IRIS energy conversion

indirect_reductions = ISISIndirectEnergyTransfer(InputFiles='IRS94297.nxs, IRS94298.nxs, IRS94299.nxs',
                                                 OutputWorkspace='IndirectReductions',
                                                 Instrument='IRIS',
                                                 Analyser='graphite',
                                                 Reflection='002',
                                                 SpectraRange=[3, 53])

grouped_workspaces = GroupBySampleChangerPosition(InputWorkspace=indirect_reductions, OutputGroupPrefix='Indirect', OutputGroupSuffix='Reductions')

for workspace_name in grouped_workspaces:
   print(mtd[workspace_name].getNames()[0])

Output:

iris94297_graphite002_red
iris94298_graphite002_red
iris94299_graphite002_red

Categories: AlgorithmIndex | Workflow\Inelastic | Inelastic\Indirect

Source

Python: GroupBySampleChangerPosition.py