\(\renewcommand\AA{\unicode{x212B}}\)
LorentzCorrection v1¶
Summary¶
Performs a white beam Lorentz Correction
See Also¶
Properties¶
Name |
Direction |
Type |
Default |
Description |
---|---|---|---|---|
InputWorkspace |
Input |
Mandatory |
Input workspace to correct in Wavelength. |
|
OutputWorkspace |
Output |
Mandatory |
An output workspace. |
|
Type |
Input |
string |
SingleCrystalTOF |
Type of Lorentz correction to do. Allowed values: [‘SingleCrystalTOF’, ‘PowderTOF’] |
Description¶
Multiply the input workspace by the calculated Lorentz factor.
The Lorentz correction for time-of-flight single crystal diffraction, L
, is calculated according to:
Where \(\theta\) is the scattering angle. For time-of-flight powder diffraction it is calculated according to
The calculations performed in this Algorithm are a subset of those performed by the AnvredCorrection v1 for single crystal measurements
Usage¶
Example - LorentzCorrection
tof = Load(Filename='HRP39180.RAW')
lam = ConvertUnits(InputWorkspace=tof, Target='Wavelength')
corrected = LorentzCorrection(InputWorkspace=lam)
y = corrected.readY(2)
e = corrected.readE(2)
# print first corrected yvalues
print(y[1:5])
# print first corrected evalues
print(e[1:5])
Output:
[0.84604876 0.4213364 1.67862035 0. ]
[0.59824681 0.4213364 0.83931018 0. ]
Categories: AlgorithmIndex | Crystal\Corrections
Source¶
C++ header: LorentzCorrection.h
C++ source: LorentzCorrection.cpp