DiffractionFocussing
From MantidProject
Contents |
Summary
Algorithm to focus powder diffraction data into a number of histograms according to a grouping scheme defined in a CalFile.
Properties
| Order | Name | Direction | Type | Default | Description |
|---|---|---|---|---|---|
| 1 | InputWorkspace | Input | Workspace | Mandatory | The input workspace. |
| 2 | OutputWorkspace | Output | Workspace | Mandatory | The result of diffraction focussing of InputWorkspace. |
| 3 | GroupingFileName | Input | File name | Mandatory | The name of the CalFile with grouping data. |
Description
Given an InputWorkspace and a Grouping filename, the algorithm performs the following:
- The calibration file is read and a map of corresponding udet-group is created.
- The algorithm determine the X boundaries for each group as the upper and lower limits of all contributing detectors to this group and determine a logarithmic step that will ensure preserving the number of bins in the initial workspace.
- All histograms are read and rebinned to the new grid for their group.
- A new workspace with N histograms is created.
Within the CalFile any detectors with the 'select' flag can be set to zero or with a group number of 0 or -ve groups are not included in the analysis.
Since the new X boundaries depend on the group and not the entire workspace, this focusing algorithm does not create overestimated X ranges for multi-group instruments. However it is important to remember that this means that this algorithm outputs a ragged workspace. Some 2D and 3D plots will not display the data correctly.
The DiffractionFocussing algorithm uses GroupDetectors algorithm to combine data from several spectra according to GroupingFileName file which is a CalFile.
Usage
Python
DiffractionFocussing("InWS","OutWS","filename")
C++
IAlgorithm* alg = FrameworkManager::Instance().createAlgorithm("DiffractionFocussing");
alg->setPropertyValue("InputWorkspace", "InWS");
alg->setPropertyValue("OutputWorkspace", "OutWS");
alg->setPropertyValue("GroupingFileName", "filename");
alg->execute();
Workspace* ws = FrameworkManager::Instance().getWorkspace("OutWS");
Source Code
Header DiffractionFocussing2.h
Source DiffractionFocussing2.cpp
