Table of Contents
Save the instrument from a workspace to a Nexus-format HDF file. WARNING: shapes are NOT saved in the present version (1.0).
Name | Direction | Type | Default | Description |
---|---|---|---|---|
InputWorkspace | Input | MatrixWorkspace | Mandatory | Workspace containing the Instrument. |
Filename | Input | string | Full path to save destination file | |
EntryName | Input | string | entry | (optional) Name of the H5 root group in which the Instrument is to be saved. Default name: ‘entry’. |
Saves the Instrument geometry from the workspace to a Nexus file. Saves detector positions and rotations. Current version (1.0) does NOT save instrument shapes of instrument components. file is compliant to Nexus standards. For more information on the Nexus format, see https://www.nexusformat.org/
the Instrument will be extracted from the specified workspace, and written to the specified location.
The (optional) H5 root group name is the parent group in which the Instrument and sample data are stored. If no name is given, the root group will have a default nme of ‘entry’
Example - basic example using SaveNexusGeometry, with default H5 root group
import os
ws = CreateSampleWorkspace()
file_name = "example_save_nexus_geometry.nxs"
path = os.path.join(os.path.expanduser("~"), file_name)
SaveNexusGeometry(ws, path)
print(os.path.isfile(path))
Output:
True
Categories: AlgorithmIndex | DataHandling\Instrument
C++ source: SaveNexusGeometry.cpp (last modified: 2019-10-10)
C++ header: SaveNexusGeometry.h (last modified: 2019-08-16)