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

HyspecScharpfCorrection v1

../_images/HyspecScharpfCorrection-v1_dlg.png

HyspecScharpfCorrection dialog.

Summary

Apply polarization factor as part of getting the spin incoherent scattering

Properties

Name

Direction

Type

Default

Description

InputWorkspace

Input

MatrixWorkspace

Mandatory

An input workspace in units of energy transfer.

PolarizationAngle

Input

number

Mandatory

In plane angle between polatrization and incident beamMust be between -180 and +180 degrees

Precision

Input

number

0.1

If cosine of twice the Scharpf angle is closer to 0 than the precision, the intensities and errors will be set to 0

OutputWorkspace

Output

MatrixWorkspace

Mandatory

An output workspace.

Description

This algorithm is applying a polarization correction for single crystal inelastic experiments. If one measures scattering intensity with polarization along the momentum transfer \(Q\), perpendicular to it in the horizontal plane, and in the vertical direction, one can write the spin incoherent contribution as:

\[I_{SI}=\frac{3}{2}\left(\Sigma_x^{nsf}-\Sigma_y^{nsf}+\Sigma_z^{sf}\right)\]

where the sf and nsf subscripts stand for spin flip and non-spin flip. The x direction is parallel to \(Q\), y is perpendicular in the horizontal plane, while z is vertically up. NOTE: this is not the Mantid convention.

However, for instruments with multiple detectors and using time of flight neutrons, one has a constantly varying angle between \(Q\) and polarization. If we call this angle \(\alpha\) (Scharpf angle), the above equation can be written as:

\[I_{SI}=\frac{3}{2}\left(\frac{\Sigma_{x'}^{nsf}-\Sigma_{y'}^{nsf}}{\cos^2\alpha-\sin^2\alpha}\right)+\frac{3}{2}\Sigma_z^{sf}\]

This algorithm calculates the Scharpf angle for every event or energy transfer bin, then divides the intensity by \(F=\cos^2\alpha-\sin^2\alpha=\cos(2\alpha)\). In places where F is less than the Precision, the intensity of the output workspace is set to 0.

For a detector at angle \(\theta\) in the horizontal plane, the angle between \(Q\) and \(k_i\) is given by

\[\gamma=\arctan2\left(-\frac{k_f}{k_i}\sin\theta, 1-\frac{k_f}{k_i}\cos\theta\right)\]

The Scharpf angle is then:

\[\alpha = \gamma- PolarizationAngle\]

Note

This algorithm assumes that all scattering is in the horizontal plane (good enough approximation for Hyspec instrument, in polarized mode).

For more information, see

  1. Werner Schweika - XYZ-polarisation analysis of diffuse magnetic neutron scattering from single crystals, Journal of Physics: Conference Series, 211,012026, (2010) doi: 10.1088/1742-6596/211/1/012026

Usage

Example - HyspecScharpfCorrection

# Create a workspace (NXSPE equivalent)
w = CreateSampleWorkspace(Function='Flat background', NumBanks=1,
                          BankPixelWidth=1, XUnit='DeltaE',
                          XMin=-10.25, XMax=20, BinWidth=0.5)
MoveInstrumentComponent(Workspace=w, ComponentName='bank1', X=3, Z=3, RelativePosition=False)
AddSampleLog(Workspace=w,LogName='Ei', LogText='17.1', LogType='Number')

wsOut = HyspecScharpfCorrection(InputWorkspace=w,
                                PolarizationAngle=-10,
                                Precision=0.2)

# Get the data
intensity = wsOut.readY(0)
bin_boundaries = wsOut.readX(0)
energy_transfer = 0.5*(bin_boundaries[1:]+bin_boundaries[:-1])
# at DeltaE=5meV, Q makes an angle of 55.7 degrees with incident beam
# If polarization angle is -10 degrees, the intensity should be 0
# Below this energy, the Scharpf angle correction is negative, above
# is positive. If energy transfer is greater than Ei, intensity is
# set to 0
print('Intensity at DeltaE= 0meV: {0:.2f}'.format((intensity[energy_transfer==0])[0]))
print('Intensity at DeltaE= 5meV: {0:.2f}'.format((intensity[energy_transfer==5])[0]))
print('Intensity at DeltaE=10meV: {0:.2f}'.format((intensity[energy_transfer==10])[0]))
print('Intensity at DeltaE=19meV: {0:.2f}'.format((intensity[energy_transfer==19])[0]))

Output:

Intensity at DeltaE= 0meV: -2.37
Intensity at DeltaE= 5meV: 0.00
Intensity at DeltaE=10meV: 1.99
Intensity at DeltaE=19meV: 0.00

Categories: AlgorithmIndex | CorrectionFunctions\SpecialCorrections | Inelastic\Corrections

Source

C++ header: HyspecScharpfCorrection.h

C++ source: HyspecScharpfCorrection.cpp