SofQWNormalisedPolygon v1

../_images/SofQWNormalisedPolygon-v1_dlg.png

SofQWNormalisedPolygon dialog.

Summary

Calculate the intensity as a function of momentum transfer and energy.

Alias

This algorithm is also known as: SofQW3

Properties

Name Direction Type Default Description
InputWorkspace Input MatrixWorkspace Mandatory Reduced data in units of energy transfer DeltaE. The workspace must contain histogram data and have common bins across all spectra.
OutputWorkspace Output MatrixWorkspace Mandatory The name to use for the q-omega workspace.
QAxisBinning Input dbl list Mandatory The bin parameters to use for the q axis (in the format used by the Rebin v1 algorithm).
EMode Input string Mandatory The energy transfer analysis mode (Direct/Indirect). Allowed values: [‘Direct’, ‘Indirect’]
EFixed Input number 0 The value of fixed energy: E_i (EMode=Direct) or E_f (EMode=Indirect) (meV). Must be set here if not available in the instrument definition.

Description

Converts a 2D workspace from units of spectrum number/energy transfer to the intensity as a function of momentum transfer Q and energy transfer \Delta E. The rebinning is done as a weighted sum of overlapping polygons with fractional area tracking. The result is stored in a new workspace type: RebinnedOutput. The new workspace presents the data as the fractional counts divided by the fractional area. The biggest consequence of this method is that in places where there are no counts and no acceptance (no fractional areas), nan-s will result.

The algorithm operates in non-PSD mode by default. This means that all azimuthal angles and widths are forced to zero. PSD mode will determine the azimuthal angles and widths from the instrument geometry. This mode is activated by placing the following named parameter in a Parameter file: detector-neighbour-offset. The integer value of this parameter should be the number of pixels that separates two pixels at the same vertical position in adjacent tubes.

See SofQWCentre v1 for centre-point binning or SofQWPolygon v1 for simpler and less precise but faster binning strategies.

Usage

Example - simple transformation of inelastic workspace:

# create sample inelastic workspace for MARI instrument containing 1 at all spectra
ws=CreateSimulationWorkspace(Instrument='MAR',BinParams='-10,1,10')
# convert workspace into Matrix workspace with Q-dE coordinates
ws=SofQWNormalisedPolygon(InputWorkspace=ws,QAxisBinning='-3,0.1,3',Emode='Direct',EFixed=12)

print "The converted X-Y values are:"
Xrow=ws.readX(59);
Yrow=ws.readY(59);
for i in xrange(0,20):
 print '! {0:>6.2f} {1:>6.2f} '.format(Xrow[i],Yrow[i]),
 if (i+1)%10 == 0:
     print '!\n',
print '! {0:>6.2f} ------- !'.format(Xrow[20]),

Output:

The converted X-Y values are:
! -10.00   1.00  !  -9.00   1.00  !  -8.00   1.00  !  -7.00   1.00  !  -6.00   1.00  !  -5.00   1.00  !  -4.00   1.00  !  -3.00   1.00  !  -2.00   1.00  !  -1.00   1.00  !
!   0.00   1.00  !   1.00   1.00  !   2.00   1.00  !   3.00   1.00  !   4.00   1.00  !   5.00   1.00  !   6.00   1.00  !   7.00   1.00  !   8.00   1.00  !   9.00   1.00  !
!  10.00 ------- !

Categories: Algorithms | Inelastic