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

Transpose v1

../_images/Transpose-v1_dlg.png

Transpose dialog.

Summary

Transposes a workspace, so that an N1 x N2 workspace becomes N2 x N1.

See Also

Transpose3D, TransposeMD, ConvertUnits, ConvertSpectrumAxis, ConvertAxesToRealSpace

Properties

Name

Direction

Type

Default

Description

InputWorkspace

Input

MatrixWorkspace

Mandatory

The input workspace.

OutputWorkspace

Output

MatrixWorkspace

Mandatory

The output workspace.

Description

This algorithm transposes a workspace, so that an N1 x N2 workspace becomes N2 x N1.

The X-vector values for the new workspace are taken from the axis values of the old workspace, which is generally the spectra number but can be other values, if say the workspace has gone through ConvertSpectrumAxis.

Warning

The new axis values are taken from the previous X-vector values for the first specrum in the workspace. For this reason, use with ragged workspaces is undefined.

For transposing multidimensional workspaces use TransposeMD.

Usage

# Create a workspace with 2 banks and 4 pixels per bank (8 spectra)
# and X axis with 100 bins
ws = CreateSampleWorkspace(BankPixelWidth=2)
print("Rank before = ( {0}, {1} )".format(ws.getNumberHistograms(),ws.blocksize()))
ws = Transpose(ws)
print("Rank after = ( {0}, {1} )".format(ws.getNumberHistograms(),ws.blocksize()))

Output:

Rank before = ( 8, 100 )
Rank after = ( 100, 8 )

Categories: AlgorithmIndex | Transforms\Axes

Source

C++ header: Transpose.h

C++ source: Transpose.cpp