CreateCalFileByNames

From MantidProject

Jump to: navigation, search

Contents

Summary

Create a calibration file (extension *.cal) for diffraction focusing based on the names of the components in the instrument tree.

Properties

Order Name Direction Type Default Description
1 InstrumentName Input String Mandatory The name of the instrument. Needs to be present in the Instrument Data Service.
2 GroupingFileName Input Filename - string Mandatory The name and path of the output CalFile.
3 GroupingNames Input String Mandatory A string of the instrument component names to use as separate groups. / or , can be used to separate multiple groups.

Description

Instrument Tree

Create a calibration file for diffraction focusing based on list of names of the instrument tree.

If a new file name is specified then offsets in the file are all sets to zero and all detectors are selected. If a valid calibration file already exists at the location specified by the GroupingFileName then any existing offsets and selection values will be maintained and only the grouping values changed.

Detectors not assigned to any group will appear as group 0, i.e. not included when using AlignDetector or DiffractionFocussing algorithms.

The group number is assigned based on a descent in the instrument tree assembly. If two assemblies are parented, say Bank1 and module1, and both assembly names are given in the GroupNames, they will get assigned different grouping numbers. This allows to isolate a particular sub-assembly of a particular leaf of the tree.

Usage

Python

   CreateCalFileByNames("GEM","output.cal","Bank1,Bank2,Module1")

C++

   IAlgorithm* alg = FrameworkManager::Instance().createAlgorithm("CreateCalFileByNames");
   alg->setPropertyValue("InstrumentName", "GEM");
   alg->setPropertyValue("GroupingFileName", "output.cal");
   alg->setPropertyValue("GroupingNames", "Bank1,Bank2,Module1");
   alg->execute();

Source Code

Header CreateCalFileByNames.h

Source CreateCalFileByNames.cpp

Personal tools
Create a book