\(\renewcommand\AA{\unicode{x212B}}\)
CarpenterSampleCorrection v1¶
Summary¶
Applies both absorption and multiple scattering corrections, originally used to correct vanadium spectrum at IPNS.
See Also¶
CalculateCarpenterSampleCorrection, CylinderAbsorption, MonteCarloAbsorption, MayersSampleCorrection, PearlMCAbsorption, VesuvioCalculateMS
This algorithm is also known as: MultipleScatteringCylinderAbsorption
Properties¶
Name |
Direction |
Type |
Default |
Description |
---|---|---|---|---|
InputWorkspace |
Input |
Mandatory |
The name of the input workspace. |
|
OutputWorkspace |
Output |
Mandatory |
The name of the output workspace. |
|
AttenuationXSection |
Input |
number |
2.8 |
Coefficient 1, absorption cross section / 1.81 if not set with SetSampleMaterial |
ScatteringXSection |
Input |
number |
5.1 |
Coefficient 3, total scattering cross section if not set with SetSampleMaterial |
SampleNumberDensity |
Input |
number |
0.0721 |
Coefficient 2, density if not set with SetSampleMaterial |
CylinderSampleRadius |
Input |
number |
0.3175 |
Sample radius, in cm |
Description¶
This algorithm is a port to C++ of a multiple scattering absorption correction, used to correct the vanadium spectrum for the GPPD instrument at the IPNS. The correction calculation was originally worked out by Jack Carpenter and Asfia Huq and implemented in Java by Alok Chatterjee. The java code was translated to C++ in Mantid by Dennis Mikkelson.
Elastic scattering is assumed
In [1] we see that the calculation of the attenuation factor F involves an integral over the sample cylinder. By expanding the integrands as a power series, we can factor out any dependence on scattering cross section and radius. These integral terms are denoted by \(Z_{mn}\) and so we may write:
where \(\mu\) is the inverse scattering length.
The functions \(Z_{mn}(\theta)\) are written in terms of Chebyshev expansion coefficients:
where the Chebyshev coefficients \(c_{s}(m,n)\) up to m + n \(\leqslant\) 5 have been tabulated and are stored as an array by the algorithm.
This version of the correction follows the implementation in [1] in that it only calculates for the correction in-plane, unlike [2], [3] that generalizes the correction to out-of-plane.
This algorithm calls CalculateCarpenterSampleCorrection v1 to calculate both absorption and multiple scattering corrections and then applies both to the sample workspace.
Usage¶
Example: A simple cylindrical sample
ws = CreateSampleWorkspace("Histogram",NumBanks=1,BankPixelWidth=1)
ws = ConvertUnits(ws,"Wavelength")
ws = Rebin(ws,Params=[1])
SetSampleMaterial(ws,ChemicalFormula="V")
#restrict the number of wavelength points to speed up the example
wsOut = CarpenterSampleCorrection(ws,CylinderSampleRadius=0.2)
print("Output: {}".format(wsOut.readY(0)))
Output:
Output: [ 6.1210107 6.57502041 19.47638255 7.58160094 8.13860778
2.33885171]
References¶
Categories: AlgorithmIndex | CorrectionFunctions\AbsorptionCorrections
Source¶
C++ header: CarpenterSampleCorrection.h
C++ source: CarpenterSampleCorrection.cpp