\(\renewcommand\AA{\unicode{x212B}}\)

DebyeWallerFactorCorrectionMD v1

Summary

Apply Debye-Waller factor correction to MD events by dividing signal with exp(-q^2 * u^2 / 3)

Properties

Name

Direction

Type

Default

Description

InputWorkspace

Input

MDEventWorkspace

Mandatory

An input MDEventWorkspace. Must be in Q.

OutputWorkspace

Output

MDEventWorkspace

Mandatory

The output MDEventWorkspace with correction applied.

MeanSquaredDisplacement

Input

number

Optional

Mandatory: Mean squared displacement <u^2>. Often obtained from Rietveld refinement.

Description

Scales the the signal and error of MD events by the inverse of Debye-Waller Factor \(\exp(q^2 <u^2>/3)\) where \(<u^2>\) is the MeanSquaredDisplacement.

MeanSquaredDisplacement must be a positive float number.

Input workspace must contain momentum transfer information, with either one dimension of |Q| or three Q_sample/Q_lab dimensions. It is assumed that the Q dimensions come first follow by any number of other dimensions.

Usage

Example - DebyeWallerFactorCorrectionMD

# Create a test MD workspace
ws = CreateMDWorkspace(Dimensions='1', Extents='1,4',
                       Names='|Q|', Units='A')
FakeMDEventData(ws, UniformParams=-6000)

# Run the algorithm
wsOut = DebyeWallerFactorCorrectionMD(ws, MeanSquaredDisplacement=0.15)

# Bin the result so that it can be printed
wsOut = BinMD(wsOut, AlignedDim0='|Q|,1,4,6')
ws = BinMD(ws, AlignedDim0='|Q|,1,4,6')

# Print the result
print("Input signal:    ", [int(x) for x in ws.getSignalArray()])
print("Corrected signal:", [int(x) for x in wsOut.getSignalArray()])

Output:

Input signal:     [1000, 1000, 1000, 1000, 1000, 1000]
Corrected signal: [1082, 1167, 1289, 1462, 1699, 2024]

Categories: AlgorithmIndex | MDAlgorithms

Source

C++ header: DebyeWallerFactorCorrectionMD.h

C++ source: DebyeWallerFactorCorrectionMD.cpp