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

SortByQVectors v1

Summary

This algorithm sorts a group workspace by the qvectors found in the qvectors file.

See Also

SortDetectors

Properties

Name

Direction

Type

Default

Description

InputWorkspace

Input

string

Group workspace that automatically includes all members.

Description

This algorithm sorts a group workspace by the qvectors found in the qvectors file. Workspaces will be transformed if the qvectors dimension is in the bins. Used for output from LoadSassena.

Usage

Note

To run these usage examples please first download the usage data, and add these to your path. In Mantid this is done using Manage User Directories.

ws = LoadSassena("outputSassena_1.4.1.h5", TimeUnit=1.0)
print('workspaces instantiated: ' + ', '.join(ws.getNames()))
SortByQVectors(InputWorkspace='ws')
ws0 = ws[0]
for i in range(0, ws0.getNumberHistograms()):
    print('{:.8f}'.format(ws0.dataY(i)[0]))

Output:

workspaces instantiated: ws_qvectors, ws_fq, ws_fq0, ws_fq2, ws_fqt.Re, ws_fqt.Im
0.00000000
0.00600601
0.01201201
0.01801802
0.02402402

Categories: AlgorithmIndex | Transforms\Merging | Utility\Sorting

Source

Python: SortByQVectors.py