Newer
Older
.. algorithm::
.. summary::
.. alias::
.. properties::
Description
-----------
This algorithm performs the ElasticWindow algorithm over a set of workspaces
provided as a workspace group, the binning of each workspace must match.
The Q and Q Suared output workspaces show the output of ElasticWindow for each
input workspace, the ELF workspace shows the data transposed with the X axis in
either sample temperature or run number of temperature is not available.
The ELT workspace shows the normalisation of the ELF workspace to run with the
lowest sample temperature.
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
Usage
-----
.. testcode:: exElasticWindowMultiple
# Create some sample data
widths = [15.0, 17.5, 20.0, 22.5, 25.0, 27.5, 30.0]
for idx, fwhm in enumerate(widths):
ws_name = 'ws_%.1f' % fwhm
function = 'name=Lorentzian,Amplitude=100,PeakCentre=27500,FWHM=%f' % fwhm
CreateSampleWorkspace(Function='User Defined',
UserDefinedFunction=function,
XMin=27000,
XMax=28000,
BinWidth=10,
NumBanks=1,
OutputWorkspace=ws_name)
ConvertUnits(InputWorkspace=ws_name,
OutputWorkspace=ws_name,
Target='DeltaE',
EMode='Indirect',
EFixed=1.555)
Rebin(InputWorkspace=ws_name,
OutputWorkspace=ws_name,
Params=[-0.2,0.004,0.2])
LoadInstrument(Workspace=ws_name,
InstrumentName='IRIS')
SetInstrumentParameter(Workspace=ws_name,
ParameterName='Efixed',
DetectorList=range(1,114),
ParameterType='Number',
Value='1.555')
mtd[ws_name].mutableRun()['run_number'] = idx + 1
input = GroupWorkspaces(InputWorkspaces=['ws_%.1f' % fwhm for fwhm in widths])
# Run the algorithm
q, q2, elf = ElasticWindowMultiple(input, -0.1, 0.1)
print 'ELF X axis: %s' % elf.getAxis(0).getUnit().caption()
print 'ELF spectra count: %d' % elf.getNumberHistograms()
print 'ELF bin count: %d' % elf.blocksize()
.. testoutput:: exElasticWindowMultiple
ELF X axis: Run No
ELF spectra count: 100
ELF bin count: 7