LoadDetectorInfo

From MantidProject

Jump to: navigation, search

Contents

Summary

Subtracts detector delay times from the time of flight X values in the workspace and modifies its information about detector pressures and wall thinknesses. This information can read from a DAT file or RAW file that corrosponds to the same run or series of experimental runs as the workspace.

Properties

Order Name Direction Type Default Description
1 Workspace InOut Workspace Mandatory The name of the workspace to that the detector information will be loaded into
2 DataFilename Input string Mandatory A .raw .DAT or sca file that contains informtion about the detectors in the workspace

Description

The detection time delay for each detector is subtracted from the time of flight bin boundaries in the spectrum associated with that detector. It is required that all the monitors have the same time delay and if this is non-zero the delay time is added to all TOF values. It is important that the units of the input workspace are TOF in microseconds, that GroupDetectors has not been run and this algorithm is only applied once to a workspace.

Values for the partial pressure of 3He and wall thickness are added into the parameter map for each detector in a form that can be read by DetectorEfficiencyCor. That is, the values are assumed to be in atmosheres and meters, respectively, and the properties are stored internally in the workspace parameter map as "3He(atm)" and "wallT(m)". The values are likely to be read from the same RAW file that the workspace was loaded from or a DAT file that corrosponds to the same run or series of experimental runs.

Spectra whose associated detector data are not found in the input DAT or RAW file will not have their time of flight bin boundaries adjusted. Similarly nothing will be written to the parameter map for those detectors, the algorithm will continue to process data as normal but a warning will be written to the log. Detectors that are listed in the input file but do not exist in the instrument definition file will be ignored and details will be written to the log.

If all the time offsets are the same and the file appears to contain enough data for all detectors all detector spectra will use same bin boundaries, where possible. This will make the algorithm run much more quickly and use less memory.

When using a RAW file the time offset for each detector is read from the "hold off" table in the file's header while pressure and wall thickness data must be present in the user table array. The format for .DAT files is specfied in the document "DETECTOR.DAT format" written by Prof G Toby Perring ("detector format.doc")

Source Code

Header LoadDetectorInfo.h

Source LoadDetectorInfo.cpp

Personal tools
Create a book