Table of Contents
The SolidAngle algorithm calculates the solid angle in steradians for each of the detectors in an instrument and outputs the data in a workspace. This can then be used to normalize a data workspace using the divide algorithm should you wish.
Name | Direction | Type | Default | Description |
---|---|---|---|---|
InputWorkspace | Input | MatrixWorkspace | Mandatory | This workspace is used to identify the instrument to use and also which spectra to create a solid angle for. If the Max and Min spectra values are not provided one solid angle will be created for each spectra in the input workspace |
OutputWorkspace | Output | MatrixWorkspace | Mandatory | The name of the workspace to be created as the output of the algorithm. A workspace of this name will be created and stored in the Analysis Data Service. |
StartWorkspaceIndex | Input | number | 0 | The index number of the first spectrum for which to find the solid angle (default: 0) |
EndWorkspaceIndex | Input | number | Optional | The index of the last spectrum whose solid angle is to be found (default: the last spectrum in the workspace) |
The algorithm calculates solid angles from the sample position of the input workspace for all of the spectra selected. If several detectors have been mapped to the same spectrum then the solid angles of this detectors will be summed to provide the solid angle for the spectrum. The solid angle of a detector that has been masked or marked as dead is considered to be 0 steradians.
This algorithms can happily accept ragged workspace as an input workspace. The result would be a ragged output workspace whose X axis values match the lowest and highest of each the input spectra.
Note: The Solid angle calculation assumes that the path between the sample and detector is unobstructed by another other instrument components.
Example:
ws = CreateSampleWorkspace()
wsOut = SolidAngle(ws)
print("Solid angle of Spectra 1 in Bank 1: %.2e" % wsOut.readY(0)[0])
print("Solid angle of Spectra 101 in Bank 2: %.2e" % wsOut.readY(100)[0])
Output:
Solid angle of Spectra 1 in Bank 1: 6.40e-08
Solid angle of Spectra 101 in Bank 2: 1.60e-08
Categories: Algorithm Index | CorrectionFunctions\InstrumentCorrections
C++ source: SolidAngle.cpp (last modified: 2018-10-05)
C++ header: SolidAngle.h (last modified: 2018-10-05)