LorentzCorrection v1

../_images/LorentzCorrection-v1_dlg.png

LorentzCorrection dialog.

Summary

Performs a white beam Lorentz Correction

Properties

Name Direction Type Default Description
InputWorkspace Input MatrixWorkspace Mandatory Input workspace to correct in Wavelength.
OutputWorkspace Output MatrixWorkspace Mandatory An output workspace.

Description

Calculates the Lorentz correction for time-of-flight diffraction and and multiplies the input workspace by it. The Lorentz correction, L, is calculated according to:

L = \frac{\sin^{2}\theta}{\lambda^{4}}

Where \theta is the scattering angle.

The calculations performed in this Algorithm are a subset of those performed by the AnvredCorrection v1

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++ source: LorentzCorrection.cpp (last modified: 2019-06-04)

C++ header: LorentzCorrection.h (last modified: 2018-10-05)