\(\renewcommand\AA{\unicode{x212B}}\)
Table of Contents
Calculates bin-by-bin correction factors for attenuation due to absorption in a cylindrical sample in the wall of a hollow can
Name | Direction | Type | Default | Description |
---|---|---|---|---|
InputWorkspace | Input | MatrixWorkspace | Mandatory | The input workspace in units of wavelength. |
OutputWorkspace | Output | MatrixWorkspace | Mandatory | The name to use for the output workspace. |
CanOuterRadius | Input | number | Mandatory | The outer radius of the can in centimetres |
CanInnerRadius | Input | number | Mandatory | The inner radius of the can in centimetres |
SampleHeight | Input | number | Mandatory | The height of the sample in centimetres |
SampleThickness | Input | number | Mandatory | The thickness of the sample in centimetres |
SampleChemicalFormula | Input | string | Mandatory | Chemical composition of the sample material |
SampleNumberDensity | Input | number | Mandatory | The number density of the sample in number of formulas per cubic angstrom |
NumberOfWavelengthPoints | Input | number | Optional | The number of wavelength points for which a simulation is atttempted (default: all points) |
EventsPerPoint | Input | number | 300 | The number of “neutron” events to generate per simulated point |
SeedValue | Input | number | 123456789 | Seed the random number generator with this value |
Sets up a hollow sample shape, along with the required material properties, and runs the MonteCarloAbsorption algorithm. This algorithm merely serves as a simpler interface to define the shape & material of the sample without having to resort to the more complex CreateSampleShape & SetSampleMaterial algorithms. The computational part is all taken care of by MonteCarloAbsorption. Please see that documentation for more details.
The algorithm currently assumes that the can wall is sufficiently thin & a weak absorber so that it can be ignored.
Example
sample_ws = CreateSampleWorkspace("Histogram",NumBanks=1) # fake some data in TOF
sample_ws = ConvertUnits(sample_ws, Target="Wavelength")
factors = \
AnnularRingAbsorption(sample_ws,
SampleHeight=3.8, SampleThickness=0.05, CanOuterRadius=1.1,CanInnerRadius=0.92,
SampleChemicalFormula="Li2-Ir-O3",SampleNumberDensity=0.004813,
EventsPerPoint=300)
print("The created workspace has one entry for each spectra: {}".format(factors.getNumberHistograms()))
print("Just divide your data by the correction to correct for absorption.")
Output:
The created workspace has one entry for each spectra: 100
Just divide your data by the correction to correct for absorption.
Categories: AlgorithmIndex | CorrectionFunctions\AbsorptionCorrections
C++ header: AnnularRingAbsorption.h (last modified: 2020-03-20)
C++ source: AnnularRingAbsorption.cpp (last modified: 2020-04-07)