\(\renewcommand\AA{\unicode{x212B}}\)

SaveToSNSHistogramNexus v1

../_images/SaveToSNSHistogramNexus-v1_dlg.png

SaveToSNSHistogramNexus dialog.

Summary

Saves a workspace into SNS histogrammed NeXus format, using an original file as the starting point. This only works for instruments with Rectangular Detectors.

See Also

SaveNexus

Properties

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?

Description

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.

Usage

# 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

Source

C++ header: SaveToSNSHistogramNexus.h

C++ source: SaveToSNSHistogramNexus.cpp