\(\renewcommand\AA{\unicode{x212B}}\)
Table of Contents
Saves a workspace into SNS histogrammed NeXus format, using an original file as the starting point. This only works for instruments with Rectangular Detectors.
Name | Direction | Type | Default | Description |
---|---|---|---|---|
InputFilename | Input | string | Mandatory | The name of the original Nexus file for this data, as a full or relative path. Allowed extensions: [‘.nxs’] |
InputWorkspace | Input | MatrixWorkspace | Mandatory | Name of the workspace to be saved |
OutputFilename | Input | string | Mandatory | The name of the Nexus file to write, as a full or relative path. Allowed extensions: [‘.nxs’] |
Compress | Input | boolean | False | Will the output NXS file data be compressed? |
The algorithm essentially copies the InputFilename into OutputFilename, except that it replaces the data field with whatever the specified workspace contains. The histograms do not need to be the same size (in number of bins), but the number of pixels needs to be the same.
In addition, this only works for instruments that use RectangularDetectors (SNAP, TOPAZ, POWGEN, for example); in addition, the name in the instrument definition file must match the name in the NXS file.
# Needs an SNS nexus file with rectangular detectors available from system tests
ws = Load(Filename='TOPAZ_3132_event.nxs', LoaderName='LoadEventNexus', LoaderVersion=1)
SaveToSNSHistogramNexus(InputFilename="TOPAZ_3132_event.nxs",InputWorkspace=ws,OutputFilename=TOPAZ_3132_copy.nxs")
Categories: AlgorithmIndex | DataHandling\Nexus