Workspaces contain data for inspection and visualisation. They contain information about the experiment and the instrument for easy access via the graphical user interface or the Python programming language. Various types of workspaces are available. Most commonly used will be TableWorkspaces, GroupWorkspaces and importantly MatrixWorkspaces.
A MatrixWorkspace contains the following values holding measured or derived data in form of a histogram or distribution:
Please note that 1D plots will draw the Y data normalised by bin width (default) and at bin centre position. A right click inside the plot and select ‘Normalization’ in order to change this behaviour, e.g. switching the normalization off.
Create a new MatrixWorkspace:
Main menu -> File -> New -> Matrix
A sub-group of the MatrixWorkspace is a Workspace2D consisting of two-dimensional data.
It may contain:
For exanmple, a spectra-detector mapping table can be opened by right click on workspace 592724 and select ‘Show Detectors’:
and informs about each detector position (R, theta, phi) and if it is a monitor or not.
Please note the different meaning of
TableWorkspaces descibe their content by column names and contain, for instance, fit results of peak positions
Create a new table workspace:
Main menu -> File -> New -> Table
Several workspaces can be combined to a GroupWorkspace which may be the preferred output for workflow algorithms.
The recommended way is to save as a Mantid NeXus file, as this will preserve extra information such as the instrument and workspaces history.
To do this right click on workspace and SaveNexus.
Via executing algorithms:
From the main MantidPlot menu, select File->Save->Nexus File->Export Ascii
In line 2, the spectrum number is given.