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

ChangeQConvention v1

../_images/ChangeQConvention-v1_dlg.png

ChangeQConvention dialog.

Summary

Change the convention of MD workspace.

Properties

Name Direction Type Default Description
InputWorkspace InOut IMDWorkspace Mandatory An input MDEventWorkspace or MDHistoWorkspace.

Description

This algorithm changes the sign of Q and the label of the workspace convention. This should only be used on MD workspaces that contain only Q or HKL dimensions. If there are other dimensions, user should still run this algorithm (so that the convention flag is changed), but then run TransformMD with -1 for the non-Q dimensions.

Usage

Example - an example of running ChangeQConvention with PointGroup option.

mdws = LoadMD('MAPS_MDEW.nxs')
dim = mdws.getXDimension()
print("X range of Q  {} {}".format(dim.getX(0), dim.getX(1)))
ChangeQConvention(mdws)
mdws = mtd['mdws']
dim = mdws.getXDimension()
print("X range of Q after ChangeQConvention  {} {}".format(dim.getX(0), dim.getX(1)))

Output:

X range of Q  0.0 10.0
X range of Q after ChangeQConvention  -10.0 0.0

Categories: AlgorithmIndex | MDAlgorithms\DataHandling