LoadEmptyInstrument v1

../_images/LoadEmptyInstrument-v1_dlg.png

LoadEmptyInstrument dialog.

Summary

Loads an Instrument Definition File (IDF) into a workspace rather than a data file.

Properties

Name Direction Type Default Description
Filename Input string Mandatory The filename (including its full or relative path) of an instrument definition file. Allowed extensions: [‘.xml’]
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.

Description

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.

Usage

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