LoadRaw

From MantidProject

Jump to: navigation, search

Contents

Summary

Loads a data file in ISIS RAW format and stores it in a 2D workspace (Workspace2D class).

Properties

Order Name Direction Type Default Description
1 Filename Input string Mandatory The name of the RAW file to read, including its full or relative path. The file extension must be .raw or .RAW (N.B. case sensitive if running on Linux).
2 OutputWorkspace Output Workspace2D Mandatory The name of the workspace that will be created, filled with the read-in data and stored in the Analysis Data Service. If the input RAW file contains multiple periods higher periods will be stored in separate workspaces called OutputWorkspace_PeriodNo.
3 SpectrumMin Input integer Optional The number of the first spectrum to read.
4 SpectrumMax Input integer Optional The number of the last spectrum to read.
5 SpectrumList Input integer list Optional A comma-separated list of individual spectra to read. Only used if explicitly set.
6 LoadLogFiles Input bool Optional Boolean option to load or skip log files. If this option is set all the log files associated with the selected raw file are loaded into workspace and can be displayed using right click menu item Sample Logs...on the selected workspace.

Note: If the log files contain motor positions, etc. that would affect the instrument geometry this option must be set to true for these adjustments to be applied to the instrument geometry.

7 LoadMonitors

(Label Monitors in LoadRawDialog)

Input string list Optional Option to control the loading of monitors.

Allowed options are Include,Exclude and Separate.

Include:The defalut is Include option which loads the monitors into the output workspace.

Exclude:The Exclude option exludes monitors from the output workspace.

Separate:The Separate option loads monitors into a separate workspace called OutputWorkspace_Monitor.

Note that it is possible to use both of the optional 'spectrum' properties (i.e. a range and a list) together if so desired.

Description

The LoadRaw algorithm stores data from the RAW file in a Workspace2D, which will naturally contain histogram data with each spectrum going into a separate histogram. The time bin boundaries (X values) will be common to all histograms and will have their units set to time-of-flight. The Y values will contain the counts and will be unit-less (i.e. no division by bin width or normalisation of any kind). The errors, currently assumed Gaussian, will be set to be the square root of the number of counts in the bin.

Optional properties

If only a portion of the data in the RAW file is required, then the optional 'spectrum' properties can be set before execution of the algorithm. Prior to loading of the data the values provided are checked and the algorithm will fail if they are found to be outside the limits of the dataset.

Multiperiod data

If the RAW file contains multiple periods of data this will be detected and the different periods will be output as separate workspaces, which after the first one will have the period number appended (e.g. OutputWorkspace_period). Each workspace will share the same Instrument, SpectraToDetectorMap and Sample objects. If the optional 'spectrum' properties are set for a multiperiod dataset, then they will ignored.

Subalgorithms used

LoadRaw runs the following algorithms as child algorithms to populate aspects of the output Workspace:

  • LoadInstrument - Looks for an instrument definition file named XXX_Definition.xml, where XXX is the 3 letter instrument prefix on the RAW filename, in the directory specified by the "instrumentDefinition.directory" property given in the config file (or, if not provided, in the relative path ../Instrument/). If the instrument definition file is not found then the LoadInstrumentFromRaw algorithm will be run instead.
  • LoadMappingTable - To build up the mapping between the spectrum numbers and the Detectors of the attached Instrument.
  • LoadLog - Will look for any log files in the same directory as the RAW file and load their data into the workspace's Sample object.

Source Code

Header LoadRaw3.h

Source LoadRaw3.cpp

Personal tools
Create a book