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

CreateChunkingFromInstrument v1

../_images/CreateChunkingFromInstrument-v1_dlg.png

CreateChunkingFromInstrument dialog.

Summary

Creates chunking at a level of the instrument or instrument components.

Properties

Name Direction Type Default Description
Filename Input string   The name of the event nexus file to read, including its full or relative path. Allowed extensions: [‘_event.nxs’, ‘.nxs.h5’, ‘.nxs’]
InputWorkspace Input MatrixWorkspace   Optional: An input workspace with the instrument we want to use.
InstrumentName Input string   Optional: Name of the instrument to base the ChunkingWorkpace on which to base the GroupingWorkspace.
InstrumentFilename Input string   Optional: Path to the instrument definition file on which to base the ChunkingWorkpace. Allowed extensions: [‘.xml’]
ChunkNames Input string   Optional: A string of the instrument component names to use as separate groups. Use / or , to separate multiple groups. If empty, then an empty GroupingWorkspace will be created.
ChunkBy Input string   Only used if GroupNames is empty: All detectors as one group, Groups (East,West for SNAP), Columns for SNAP, detector banks. Allowed values: [‘’, ‘All’, ‘Group’, ‘Column’, ‘bank’]
MaxRecursionDepth Input number 5 Number of levels to search into the instrument (default=5)
MaxBankNumber Input number 300 Maximum bank number to search for in the instrument
OutputWorkspace Output TableWorkspace Mandatory An output workspace describing the cunking.

Description

Workflow algorithm to determine chunking strategy for event nexus file. This will break up the instrument into logical components according to the instrument hierarchy.

This algorithm does assume that there are components in the geometry named “bank#” and returns a table workspace of those names. Trying this on an instrument without components named that will generate an exception. Also, requesting “ChunkBy=All” will return an empty table workspace.

Usage

Example: Powgen

pg3 = LoadEmptyInstrument(Filename="POWGEN_Definition_2015-08-01.xml")
ws = CreateChunkingFromInstrument(InputWorkspace=pg3, ChunkBy="Group")
print("Created {} Chunks".format(ws.rowCount()))

Output:

Created 4 Chunks

Example: Snap

ws = CreateChunkingFromInstrument(InstrumentName="snap", ChunkNames="East,West", MaxBankNumber=64)
print("Created {} Chunks".format(ws.rowCount()))

Output:

Created 2 Chunks

Categories: AlgorithmIndex | Workflow\DataHandling