SANSWideAngleCorrection v1¶
Summary¶
Calculate the Wide Angle correction for SANS transmissions.
Properties¶
Name |
Direction |
Type |
Default |
Description |
|---|---|---|---|---|
SampleData |
Input |
Mandatory |
A workspace cropped to the detector to be reduced (the SAME as the input to Q1D v2); used to verify the solid angle. The workspace is not modified, just inspected. |
|
TransmissionData |
Input |
Mandatory |
The transmission data calculated, entering as \(T_0\) in correction equation |
|
OutputWorkspace |
Output |
Mandatory |
The transmission corrected SANS data, normalised (divided) by \(T_0\) |
Description¶
Algorithm Reference Discussion¶
Transmission for scattering at large angles should be modified to account for the longer path length after the scattering event [1] [2].
The longer path length after scattering will also slightly increase the probability of a second scattering event, but this is not dealt with here.
If our on-axis transmission is \(T_0\) through a sample of thickness \(d\), then the transmission at some other thickness \(x\) is \(\exp(-\mu x)\) where attenuation coefficient \(\mu = -\ln( \frac{T_0}{d})\).
If a neutron scatters at angle \(2\theta\) at distance \(x\) into the sample, its total transmission is then:
\(T^{''}\) should be integrated and averaged between \(x = 0\) and \(x = d\).
The resulting integral can be approximated, see page 208 of [3], as:
With \(A = \frac{1}{\cos(2\theta)} - 1\).
For example, if \(T_0 = 0.2\) and \(2\theta = 40\) then \(T^{'} = 0.158\), a shift of \(~20\)% of the SANS curve. Note that the result is independent of sample thickness.
\(T_0\) is a function of neutron wavelength, whilst \(A\) is a function of detector pixel location.
The output of this algorithm is:
\(\text{Output Workspace}=\frac{T^\prime}{T_0}\)
Error Propagation¶
The error propagation follows this formula:
\(\text{OutputWorkspace}_{error} = \frac{T_{0E} ^A - 1}{A\ln(T_0E)}\)
Which means, that we do not consider the error in the definition of \(2\theta\) (the parameter A)
Enabling Wide Angle Correction for Reduction of SANS ISIS¶
The Wide Angle Correction was set on the legacy user file with the command:
SAMPLE/PATH/ON
For TOML user files, the wide_angle_correction boolean flag can be set on the transmission field, if the
flag is not present on the TOML file, the default value is false:
[transmission]
wide_angle_correction=true
More information on SANS TOML Files.
SANS ISIS Reduction¶
The output of SANSWideAngleCorrection is used as WavePixelAdj parameter at Q1D v2.
Wide Angle Correction and the SANS Reduction¶
The equation for the reduction is (see Q1D v2)
But \(T(n)\) is now a function of the detector position to account for wide angles, \(T(n,theta)\) or \(T(n,i,j)\).
Thus, the correction changes to:
Where Corr (Correction factor) in this case will be:
\(\text{Corr}(i,j,n) = \frac{T_0^A - 1}{A \ln(T_0)}\)
Which is the OutputWorkspace of SANSWideAngleCorrection.
This workspace enters inside Q1D v2 as the workspace property WavePixelAdj, but this step is handled automatically inside
the reduction workflow.
Comparison with Wide Angle Correction at SNS¶
The transmission correction applied at SNS is described here, and it is applied through the ApplyTransmissionCorrection v1 algorithm. The correction applied there is an approximation for the same equations described here. The picture above compare their results
Note a difference among them is when they are applied. At SNS, the correction is applied before averaging the counters per bin inside Q1D v2 algorithm, while at ISIS, it is used after, inside the Q1D v2 algorithm, for the division of the counters per bin normalized by the transmission counters.
References¶
Usage¶
Example - Correcting Some Dummy Data
# Create some dummy data, but crop it for quick demonstration purposes.
sample = CreateSimulationWorkspace(Instrument='SANS2D', BinParams=[5,500,100005], UnitX='TOF')
sample = CropWorkspace(sample,StartWorkspaceIndex=0,EndWorkspaceIndex=20)
# Create a dummy transmission workspace.
transmission = CropWorkspace(sample,StartWorkspaceIndex=10,EndWorkspaceIndex=10)
transmission *= 2
corrected_data = SANSWideAngleCorrection(sample, transmission)
print("{:.6f} was corrected to {:.6f}.".format(sample.readY(19)[0], corrected_data.readY(19)[0]))
Output:
1.000000 was corrected to 1.004997.
Categories: AlgorithmIndex | CorrectionFunctions\TransmissionCorrections
Source¶
Python: SANSWideAngleCorrection.py