SaveNXTomo v1

../_images/ImageNotFound.png

Enable screenshots using DOCS_SCREENSHOTS in CMake

Summary

Saves one or more workspaces (of type MatrixWorkspace) to a file in the NXTomo format.

See Also

SaveNexusProcessed

Properties

Name

Direction

Type

Default

Description

InputWorkspaces

Input

MatrixWorkspace

Mandatory

The name of the workspace(s) to save - this can be the name of a single Workspace2D or the name of a WorkspaceGroup in which case all the Workspace2Ds included in the group will be saved.

Filename

Input

string

Mandatory

The name of the NXTomo file to write, as a full or relative path. Allowed extensions: [‘.nxs’]

OverwriteFile

Input

boolean

False

Replace any existing file of the same name instead of appending data?

IncludeError

Input

boolean

False

Write the error values to NXTomo file?

Description

Save one or more workspaces (of type Workspace2D) into a NeXus NXtomo file (NeXus application definition format). When the input workspace given is a Workspace2D, that single workspace is written to the output NXTomo file. When the input workspace is a WorkspaceGroup (as LoadFITS produces), all the Workspace2D workspaces included in the group will be written to the output file.

This algorithm has been designed to save workspaces such as those containing data from FITS images that the algorithm LoadFITS v1 produces. Workspaces with a different structure and/or without the logs included in FITS image workspaces may not be saved properly (it may not make sense to save them into NXTomo files) or may produce errors in this algorithm.

Depending on the value given to the property OverwriteFile it will create a new NXTomo file and add into it the data from the input workspace, or it will append the data such that a sequence of calls to this algorithm can cumulatively add new image files into a same output NXTomo file. Possible uses of this algorithm include writing NXTomo files with stacks of images to be used as inputs to tomographic reconstruction tools.

# Usually you'll save image data loaded from FITS files
LoadFITS('example1.fits', OutputWorkspace='reconstruction')
LoadFITS('example2.fits', OutputWorkspace='reconstruction')
# Write NXTomo file with data from 2 images
SaveNXTomo(InputWorkspaces='reconstruction', Filename='input_rec')

NOTE: this algorithm is currently subject to changes and extensions, as new functionality for imaging and tomographic reconstruction is integrated in Mantid. At the moment it uses the NXTomo file format specified in the NeXus NXTomo application definition, but extensions and/or different variants might be added in the future.

Categories: AlgorithmIndex | DataHandling\Nexus | DataHandling\Imaging | Diffraction\DataHandling

Source

C++ header: SaveNXTomo.h

C++ source: SaveNXTomo.cpp