$$\renewcommand\AA{\unicode{x212B}}$$

# ConvertTableToMatrixWorkspace v1¶

## Summary¶

Creates a single spectrum matrix workspace from some columns of a table workspace.

ConvertMDHistoToMatrixWorkspace

## Properties¶

Name

Direction

Type

Default

Description

InputWorkspace

Input

TableWorkspace

Mandatory

An input TableWorkspace.

OutputWorkspace

Output

MatrixWorkspace

Mandatory

An output Workspace2D.

ColumnX

Input

string

Mandatory

The column name for the X vector.

ColumnY

Input

string

Mandatory

The column name for the Y vector.

ColumnE

Input

string

The column name for the E vector (optional).

## Description¶

Creates a single spectrum Workspace2D with X,Y, and E copied from columns ColumnX, ColumnY, and ColumnE respectively. If ColumnE is not set the E vector will be filled with 1s. The type of the columns must be convertible to C++ double.

## Usage¶

Example

t=WorkspaceFactory.createTable()

#add it to the Mantid workspace list

ws=ConvertTableToMatrixWorkspace(t,"A","B","BError")

print("{} is a {} and the Y values are:".format(ws,ws.id()))


Output:

ws is a Workspace2D and the Y values are:
[ 2.  4.  6.]


Categories: AlgorithmIndex | Utility\Workspaces