ConvertWANDSCDtoQ v1

../_images/ConvertWANDSCDtoQ-v1_dlg.png

ConvertWANDSCDtoQ dialog.

Summary

Convert the output of LoadWANDSCD to Q or HKL

Properties

Name Direction Type Default Description
InputWorkspace Input IMDHistoWorkspace Mandatory Input Workspace
NormalisationWorkspace Input IMDHistoWorkspace   Workspace to use for normalisation
UBWorkspace Input Workspace   Workspace containing the UB matrix to use
Wavelength Input number 1.488 Wavelength to set the workspace
S1Offset Input number 0 Offset to apply (in degrees) to the s1 of the input workspace
NormaliseBy Input string Monitor Normalise to monitor, time or None. Allowed values: [‘None’, ‘Time’, ‘Monitor’]
Frame Input string Q_sample Selects Q-dimensions of the output workspace. Allowed values: [‘Q_sample’, ‘HKL’]
Uproj Input dbl list 1,0,0 Defines the first projection vector of the target Q coordinate system in HKL mode
Vproj Input dbl list 0,1,0 Defines the second projection vector of the target Q coordinate system in HKL mode
Wproj Input dbl list 0,0,1 Defines the third projection vector of the target Q coordinate system in HKL mode
BinningDim0 Input dbl list -8.02,8.02,401 Binning parameters for the 0th dimension. Enter it as acomma-separated list of values with theformat: ‘minimum,maximum,number_of_bins’.
BinningDim1 Input dbl list -0.82,0.82,41 Binning parameters for the 1st dimension. Enter it as acomma-separated list of values with theformat: ‘minimum,maximum,number_of_bins’.
BinningDim2 Input dbl list -8.02,8.02,401 Binning parameters for the 2nd dimension. Enter it as acomma-separated list of values with theformat: ‘minimum,maximum,number_of_bins’.
KeepTemporaryWorkspaces Input boolean False If True the normalization and data workspaces in addition to the normalized data will be outputted
OutputWorkspace Output Workspace Mandatory Output Workspace

Description

This algorithm will convert the output of LoadWANDSCD v1 in either Q or HKL space. FindPeaksMD v1 can be run on the output Q sample space, then the UB can be found and used to then convert to HKL. The default binning ranges are good for converting to Q sample with the default wavelength.

The normalization is calculated in the same way as MDNormSCD v1 but with the solid angle and flux coming from the NormalisationWorkspace, normally vanadium. A brief introduction to the multi-dimensional data normalization can be found here.

When converting to HKL it will use the UB matrix from the UBWorkspace if provided otherwise it will use the UB matrix from the InputWorkspace. Uproj, Vproj and Wproj are only used when converting to HKL Frame.

If the KeepTemporaryWorkspaces option is True the data and the normalization in addition to the nomalized data will be outputted. This allows you to run separate instances of ConvertWANDSCDtoQ and combine the results. They will have names “ws_data” and “ws_normalization” respectively.

Usage

Convert to Q

# Load Data and normalisation
LoadWANDSCD(IPTS=7776, RunNumbers=26509, OutputWorkspace='norm',Grouping='4x4') # Vanadium
LoadWANDSCD(IPTS=7776, RunNumbers='26640-27944', OutputWorkspace='data',Grouping='4x4')
ConvertWANDSCDtoQ(InputWorkspace='data',
                  NormalisationWorkspace='norm',
                  OutputWorkspace='Q',
                  BinningDim1='-1,1,1')

# Plot workspace
import matplotlib.pyplot as plt
from mantid import plots
fig, ax = plt.subplots(subplot_kw={'projection':'mantid'})
c = ax.pcolormesh(mtd['Q'], vmax=1)
cbar=fig.colorbar(c)
cbar.set_label('Intensity (arb. units)')
#fig.savefig('ConvertWANDSCDtoQ_Q.png')

Output:

../_images/ConvertWANDSCDtoQ_Q.png

Convert to HKL

# Load Data and normalisation
LoadWANDSCD(IPTS=7776, RunNumbers=26509, OutputWorkspace='norm',Grouping='4x4') # Vanadium
LoadWANDSCD(IPTS=7776, RunNumbers='26640-27944', OutputWorkspace='data',Grouping='4x4')
SetUB('data', UB='0,0.1770619741,-0.00927942487,0.177304965,0,0,0,-0.00927942487,-0.177061974')
ConvertWANDSCDtoQ(InputWorkspace='data',
                  NormalisationWorkspace='norm',
                  OutputWorkspace='HKL',
                  Frame='HKL',
                  BinningDim0='-1,1,1',
                  BinningDim1='-2.02,7.02,226',
                  BinningDim2='-6.52,2.52,226')

# Plot workspace
import matplotlib.pyplot as plt
from mantid import plots
fig, ax = plt.subplots(subplot_kw={'projection':'mantid'})
c = ax.pcolormesh(mtd['HKL'], vmax=1)
cbar=fig.colorbar(c)
cbar.set_label('Intensity (arb. units)')
#fig.savefig('ConvertWANDSCDtoQ_HKL.png')

Output:

../_images/ConvertWANDSCDtoQ_HKL.png

Categories: AlgorithmIndex | DataHandling\Nexus

Source

Python: ConvertWANDSCDtoQ.py (last modified: 2018-10-05)