.. _Workspace: ========= Workspace ========= .. contents:: :local: What are Workspaces? -------------------- Workspaces store data that :ref:`algorithms ` operate on. Workspaces are usually stored in-memory. An algorithm can manipulate a workspace in-place or create a new one as an output. Workspace is as loose term that encompases a range of possible data structures. All forms of Workspace provide some common information: - The type identifier (id) of the workspace (see below), unique to every type of workspace - The name of the workspace, unique to every instance of a workspace even those of the same type - The history of :ref:`algorithms ` that were run to form and manipulate the workspace to its current state .. tip:: In :ref:`MantidWorkbench ` the data from the workspaces can be graphically viewed, inspected, and plotted in many ways. .. note:: In addition to data, workspaces hold a :ref:`workspace history `, which details the algorithms which have been run on this workspace. This means workspaces carry all the meta-information to fully recreate themeselves. Workspaces Types ------------------ - :ref:`Matrix Workspace ` - Is really a catagorisation for a family which contains measured (or derived) data with associated errors and an axis giving information about where the measurement was made. Matrix Workspaces are typically create initially by executing one of Mantid's :ref:`Load` algorithms, for example :ref:`LoadRaw ` or :ref:`LoadNexus `. Of data structures representing 2D measurement data. The following are common sorts of Matrix Workspace: - :ref:`Workspace 2D ` - A workspace for holding two dimensional histogram data in memory, this is the most commonly used workspace. - :ref:`Event Workspace ` - A workspace that retains the individual neutron event data often including the pulse time corresponding to the reading. - :ref:`Table Workspace ` - A workspace holding data in rows of columns having a particular type (e.g. text, integer, ...). - :ref:`Workspace Group ` - A container for a collection of workspaces. Algorithms given a group as input usually run sequentially on each member of the group. The workspace type id identifies the type of a Workspace instance. .. tip:: For C++ or Python development, these values are needed in such functions as the :ref:`Analysis Data Service's ` createWorkspace. +-------------------------------+-------------------------------------------+ | ID | Workspace Type | +===============================+===========================================+ | "IEventWorkspace" | IEventWorkspace | +-------------------------------+-------------------------------------------+ | "ITableWorkspace" | ITableWorkspace | +-------------------------------+-------------------------------------------+ | "WorkspaceGroup" | WorkspaceGroup | +-------------------------------+-------------------------------------------+ | "AbsManagedWorkspace2D" | AbsManagedWorkspace2D | +-------------------------------+-------------------------------------------+ | "CompressedWorkspace2D" | CompressedWorkspace2D | +-------------------------------+-------------------------------------------+ | "EventWorkspace" | :ref:`EventWorkspace ` | +-------------------------------+-------------------------------------------+ | "ManagedWorkspace2D" | ManagedWorkspace2D | +-------------------------------+-------------------------------------------+ | "TableWorkspace" | TableWorkspace | +-------------------------------+-------------------------------------------+ | "Workspace2D" | :ref:`Workspace2D ` | +-------------------------------+-------------------------------------------+ | "WorkspaceSingleValue" | WorkspaceSingleValue | +-------------------------------+-------------------------------------------+ | "ManagedRawFileWorkspace2D" | ManagedRawFileWorkspace2D | +-------------------------------+-------------------------------------------+ | "MDWorkspace" | :ref:`MDWorkspace ` | +-------------------------------+-------------------------------------------+ | "MDHistoWorkspace" | :ref:`MDHistoWorkspace `| +-------------------------------+-------------------------------------------+ Working with Workspaces ----------------------- This :ref:`page ` describes how you can work with workspaces in python, including accessing their properties and history Writing you own Workspace ------------------------- :ref:`Table Workspace
` is the best solution at present for customising the data structures you need. Changes beyond that are at present not trivial. For specialisation of existing data structures, or new data requirements, please contact the Mantid Team for help. .. categories:: Concepts