CylinderAbsorptionCW v1#
Summary#
Absorption and multiple scattering calculation for cylindrical samples with constant wavelength and assuming in-plane scattering only.
See Also#
CylinderAbsorption, AbsorptionCorrection, MultipleScatteringCorrection
Properties#
Name |
Direction |
Type |
Default |
Description |
|---|---|---|---|---|
InputWorkspace |
Input |
Mandatory |
Input workspace |
|
Wavelength |
Input |
number |
Mandatory |
Wavelength in Angstroms. |
Radius |
Input |
number |
Optional |
Radius of the cylinder in cm. If not provided, it will be inferred from the workspace sample shape if it is a cylinder. |
Height |
Input |
number |
Optional |
Height of the cylinder in cm. Only used for multiple scattering calculation. If not provided, it will be inferred from the workspace sample shape if it is a cylinder. |
AttenuationXSection |
Input |
number |
Optional |
Attenuation cross-section in barn at 1.7982 Å. If not provided, it will be inferred from the workspace sample material. |
ScatteringXSection |
Input |
number |
Optional |
Scattering cross-section in barn. If not provided, it will be inferred from the workspace sample material. |
SampleNumberDensity |
Input |
number |
Optional |
Number density of the material in atoms/Å^3. If not provided, it will be inferred from the workspace sample material. |
AbsorptionCorrectionMethod |
Input |
string |
Sears |
Method to calculate absorption correction. Allowed values: [‘Sears’, ‘Sabine’] |
MultipleScattering |
Input |
boolean |
True |
Calculate multiple scattering in addition to absorption correction. |
AbsorptionWorkspace |
Output |
Mandatory |
Absorption correction output workspace name |
|
MultipleScatteringWorkspace |
Output |
Mandatory |
Multiple scattering output workspace name |
Description#
This algorithm implements two simple analytical absorption corrections and a lookup table for multiple-scattering corrections for constant wavelength diffractometers. The absorption and multiple scattering are calculated assuming a cylindrical sample geometry, constant wavelength and in-plane scattering only.
Two methods are available for calculating the absorption correction: Using Equation 26 and Table 3 from Sears [1] and using Equations 1-6 from Sabine [2].
Multiple scattering is calculated using Equation 16 and Table 1 from Blech and Averbach [3], using a bilinear interpolation of the tabulated values. Equation 16 gives \(\sigma_m\) but the output from this algorithm is the multiple scattering factor, \(\delta\) = \(\sigma_m/(\sigma_s + \sigma_m)\).
Usage#
Example:
ws = CreateSampleWorkspace()
# Using values for vanadium
result = CylinderAbsorptionCW(
InputWorkspace=ws,
Radius=0.5, # cm
Height=4.0, # cm
Wavelength=1.7982,
AttenuationXSection=5.08, # barn at 1.798 Å
ScatteringXSection=5.1, # barn
SampleNumberDensity=0.0723, # atoms/Å^3
AbsorptionWorkspace="Absorption",
MultipleScatteringWorkspace="MultipleScattering"
)
print(f"Absorption correction calculated value is {result.AbsorptionWorkspace.readY(0)[0]:.2f} and multiple scattering value is {result.MultipleScatteringWorkspace.readY(0)[0]:.2f}")
Output:
Absorption correction calculated value is 0.54 and multiple scattering value is 0.15
Example using SetSample:
ws = CreateSampleWorkspace()
# Using values for Vanadium
SetSample(
ws,
Geometry={"Shape": "Cylinder", "Height": 4.0, "Radius": 0.5},
Material = {"ChemicalFormula": "V", "SampleNumberDensity": 0.0723}
)
result = CylinderAbsorptionCW(
InputWorkspace=ws,
Wavelength=1.7982,
AbsorptionWorkspace="Absorption",
MultipleScatteringWorkspace="MultipleScattering"
)
print(f"Absorption correction calculated value is {result.AbsorptionWorkspace.readY(0)[0]:.2f} and multiple scattering value is {result.MultipleScatteringWorkspace.readY(0)[0]:.2f}")
Output:
Absorption correction calculated value is 0.54 and multiple scattering value is 0.15
Categories: AlgorithmIndex | CorrectionFunctions\AbsorptionCorrection
Source#
Python: CylinderAbsorptionCW.py