Skip to content
Snippets Groups Projects
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
EnggCalibrateFull-v1.rst 5.82 KiB

Description

Warning

This algorithm is being developed for a specific instrument. It might get changed or even removed without a notification, should instrument scientists decide to do so.

Allows to calibrate or correct for variations in detector position parameters. It does this by fitting the peaks for each of the selected bank's detector indices, (using :ref:`algm-EnggFitPeaks` as a child algorithm) and using the resulting difc values to calibrate the detector positions.

This algorithm produces a table with calibration information, including calibrated or corrected positions and parameters. This calibration information that can be inspected and can also be used in other algorithms. The algorithm also applies the calibration on the input workspace. After running this algorithm the resulting calibration can be checked by visualizing the input workspace instrument in the instrument viewer and/or inspecting the output table values.

The output table has one row per detector where each row gives the original position before calibration (as a V3D point, x-y-z values), the new calibrated position (as V3D) and the calibrated spherical co-ordinates (L2, 2 \theta, \phi). It also gives the variation in the L2 position, and the 'difc' and 'zero' calibration parameters.

The result of the calibration (the output table given in OutDetPosTable) is accepted by both :ref:`algm-EnggCalibrate` and :ref:`algm-EnggFocus` which use the columns 'Detector ID' and 'Detector Position' of the table to correct the detector positions before focussing. The OutDetPosTable output table can also be used to apply the calibration calculated by this algorithm on any other workspace by using the algorithm :ref:`algm-ApplyCalibration`.

In the output table the calibrated positions for every detector are found by calculating the L2 values from the difc values as follows:

L2 = \left(\frac{Difc} { 252.816 * 2 * sin \left(\frac{2\theta} {2.0}\right)}\right) - 50

where the difc values are obtained from the fitting of expected peaks. See the algorithm :ref:`algm-EnggFitPeaks` for details on how difc and other calibration parameters are calculated.

This algorithm expects as input/output workspace the long calibration run, which provides a decent pattern for every detector or pixel. The spectra of the workspace are corrected using data from a Vanadium run (passed in the VanadiumWorkspace property). These corrections include two steps: detector sensitivity correction and pixel-by-pixel correction on a per-bank basis. See also :ref:`algm-EnggFocus` where the same correction is applied. Similarly as in :ref:`algm-EnggFocus`, it is possible to retrieve the curves fitted to the Vanadium run data for every bank by using the OutVanadiumCurveFits property.

Usage

Example - Calculate corrected positions, and difc and zero, for Engg:

Output:

Example - Calculate corrected positions for EngingX, saving in a file:

Output: