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

ConvertWANDSCDtoQ v1

Summary

Convert the output of LoadWANDSCD to Q or HKL

See Also

LoadWANDSCD, ConvertHFIRSCDtoMDE

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

BackgroundWorkspace

Input

IMDHistoWorkspace

An optional Background Workspace

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

ObliquityParallaxCoefficient

Input

number

1

Geometrical correction for shift in vertical beam position due to wide beam.

SymmetryOperations

Input

string

Space Group name, Point Group name, or list individual Symmetries used to perform the symmetrization

TemporaryDataWorkspace

Input

IMDHistoWorkspace

An (optional) input MDHistoWorkspace used to accumulate data from multiple MDEventWorkspaces.If unspecified a blank MDHistoWorkspace will be created

TemporaryNormalizationWorkspace

Input

IMDHistoWorkspace

An (optional) input MDHistoWorkspace used to accumulate normalization data from multiple MDEventWorkspaces.If unspecified a blank MDHistoWorkspace will be created

TemporaryBackgroundDataWorkspace

Input

IMDHistoWorkspace

An (optional) input MDHistoWorkspace used to accumulate background data from multiple MDEventWorkspaces.If unspecified but BackgroundWorkspace is specified, a blank MDHistoWorkspace will be created

TemporaryBackgroundNormalizationWorkspace

Input

IMDHistoWorkspace

An (optional) input MDHistoWorkspace used to accumulate background normalization data from multiple MDEventWorkspaces.If unspecified but BackgroundWorkspace is specified, a blank MDHistoWorkspace will be created

OutputDataWorkspace

Input

string

Name for the Output Data Workspace

OutputNormalizationWorkspace

Input

string

Name for the Output Normalization Workspace

OutputBackgroundDataWorkspace

Input

string

Name for the Output Background Workspace

OutputBackgroundNormalizationWorkspace

Input

string

Name for the Output Background Normalization Workspace

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.

This algorithm will also work for data from DEMAND (HB3A).

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.

If a background workspace is provided, it will be used to calculate the Output Workspace in the same manner as MDNorm

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. If a background workspace is provided, “ws_background_data” and “ws_background_normalization” will also be outputted.

If a temporary workspace is provided for data, normalization, background data, or background normalization, KeepTemporaryWorkspaces will be assumed ‘True’ and the provided workspace will accumulate the results. If an output name is provided along with a temporary workspace for any of these workspaces, the name will only be applied to the outputted workspace and not the temporary accumulated workspace.

If SymmetryOperations are provided, the output workspace will be the sum of each Symmetry Operation applied to the input workspace. More information about Symmetry Operations can be found here

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