Table of Contents
Name | Direction | Type | Default | Description |
---|---|---|---|---|
Filename | Input | string | The filename (including its full or relative path) of an instrument definition file. The file extension must either be .xml or .XML when specifying an instrument definition file. Note Filename or InstrumentName must be specified but not both. Allowed extensions: [‘.xml’] | |
InstrumentName | Input | string | Name of instrument. Can be used instead of Filename to specify an IDF | |
OutputWorkspace | Output | MatrixWorkspace | Mandatory | The name of the workspace in which to store the imported instrument |
DetectorValue | Input | number | 1 | This value affects the colour of the detectors in the instrument display window (default 1) |
MonitorValue | Input | number | 2 | This value affects the colour of the monitors in the instrument display window (default 2) |
MakeEventWorkspace | Input | boolean | False | Set to True to create an EventWorkspace (with no events) instead of a Workspace2D. |
This algorithm is to enable you to look at an instrument without having to load a full data file. Instead of loading a data file, it loads the InstrumentDefinitionFile for the instrument, which has information about the instrument. The instrument is referred to as being empty because there is no data associated with it.
Example - Summing all the counts in a workspace
import os
inesPath = os.path.join(ConfigService.getInstrumentDirectory(),"INES_Definition.xml")
wsOut = LoadEmptyInstrument(inesPath)
print "The workspace contains %i spectra" % wsOut.getNumberHistograms()
Output:
The workspace contains 146 spectra
Categories: Algorithms | DataHandling\Instrument