Table of Contents
Name | Direction | Type | Default | Description |
---|---|---|---|---|
InputWorkspace | Input | MatrixWorkspace | Mandatory | The input workspace. |
OutputWorkspace | Output | MatrixWorkspace | Mandatory | The output workspace. |
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 generaly 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.
# 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: Algorithms | Transforms\Axes
C++ source: Transpose.cpp (last modified: 2017-11-02)
C++ header: Transpose.h (last modified: 2016-06-07)