CorrectKiKf v1

../_images/CorrectKiKf-v1_dlg.png

CorrectKiKf dialog.

Summary

Performs k_i/k_f multiplication, in order to transform differential scattering cross section into dynamic structure factor.

Properties

Name Direction Type Default Description
InputWorkspace Input MatrixWorkspace Mandatory Name of the input workspace
OutputWorkspace Output MatrixWorkspace Mandatory Name of the output workspace, can be the same as the input
EMode Input string Direct The energy mode (default: Direct). Allowed values: [‘Direct’, ‘Indirect’]
EFixed Input number Optional Value of fixed energy in meV : EI (EMode=Direct) or EF (EMode=Indirect) .

Description

Performs ki / kf multiplication, in order to transform differential scattering cross section into dynamic structure factor. Both Ei and Ef must be positive. However, if this requirement is not met, it will give an error only if the data is not 0. This allows applying the algorithms to rebinned data, where one can rebin in Direct EMode to energies higher than EFixed. If no value is defined for EFixed, the algorithm will try to find Ei in the workspace properties for direct geometry spectrometry, or in the instrument definition, for indirect geometry spectrometry. Algorithm is event aware. TOF events will be changed to weighted events.

Usage

Example

ws = CreateSampleWorkspace()
ws = ConvertUnits(ws,"DeltaE",EMode="Direct", EFixed=7.5)

wsOut = CorrectKiKf(ws, EMode="Direct", EFixed=7.5)

print ("First five bins:")
print ("index  orig  corrected")
for i in range(5):
    print("  %i    %.2f  %.2f" %
        (i,ws.readY(0)[i],wsOut.readY(0)[i]))

Output:

First five bins:
index  orig  corrected
  0    0.30  0.01
  1    0.30  0.02
  2    0.30  0.04
  3    0.30  0.05
  4    0.30  0.07

Categories: Algorithms | Inelastic\Corrections | CorrectionFunctions\SpecialCorrections

Source

C++ source: CorrectKiKf.cpp

C++ header: CorrectKiKf.h