Table of Contents
Name | Direction | Type | Default | Description |
---|---|---|---|---|
Workspace | Input | Workspace | Mandatory | Sample workspace |
WorkspaceIndex | Input | number | 0 | Workspace index to use for resolution |
Mass | Input | number | 100 | The mass defining the recoil peak in AMU |
OutputWorkspaceTOF | Output | Workspace | Output resolution workspace in TOF | |
OutputWorkspaceYSpace | Output | Workspace | Output resolution workspace in ySpace |
Provides a simpler interface to the VesuvioResolution fit function for calculating the resolution function for a given mass for VESUVIO data.
Example: Calculating resolution function
###### Simulates LoadVesuvio with spectrum number 136 ####################
tof_ws = CreateSimulationWorkspace(Instrument='Vesuvio', BinParams=[50,0.5,562], UnitX='TOF')
tof_ws = CropWorkspace(tof_ws, StartWorkspaceIndex=135, EndWorkspaceIndex=135) # index one less than spectrum number
tof_ws = ConvertToPointData(tof_ws)
SetInstrumentParameter(tof_ws, ParameterName='t0', ParameterType='Number', Value='0.5')
SetInstrumentParameter(tof_ws, ParameterName='sigma_l1', ParameterType='Number', Value='0.021')
SetInstrumentParameter(tof_ws, ParameterName='sigma_l2', ParameterType='Number', Value='0.023')
SetInstrumentParameter(tof_ws, ParameterName='sigma_tof', ParameterType='Number', Value='0.3')
SetInstrumentParameter(tof_ws, ParameterName='sigma_theta', ParameterType='Number', Value='0.028')
SetInstrumentParameter(tof_ws, ParameterName='hwhm_lorentz', ParameterType='Number', Value='24.0')
SetInstrumentParameter(tof_ws, ParameterName='sigma_gauss', ParameterType='Number', Value='73.0')
###########################################################################
tof, ysp = VesuvioResolution(Workspace=tof_ws, Mass=1.0079)
print('Resolution in %s and %s.' % (tof.getAxis(0).getUnit().symbol(), ysp.getAxis(0).getUnit().symbol()))
Output:
Resolution in microsecond and A^-1.
Categories: AlgorithmIndex | Inelastic\Indirect\Vesuvio
C++ source: VesuvioResolution.cpp (last modified: 2019-08-27)
C++ header: VesuvioResolution.h (last modified: 2018-10-05)
Python: VesuvioResolution.py (last modified: 2018-10-05)