LoadNexusMonitors v1

../_images/LoadNexusMonitors-v1_dlg.png

LoadNexusMonitors dialog.

Summary

Load all monitors from a NeXus file into a workspace.

Properties

Name Direction Type Default Description
Filename Input string Mandatory The name (including its full or relative path) of the NeXus file to attempt to load. The file extension must either be .nxs or .NXS. Allowed extensions: [‘.nxs’]
OutputWorkspace Output Workspace Mandatory The name of the output workspace in which to load the NeXus monitors.
MonitorsAsEvents Input boolean True If enabled (by default), load the monitors as events (into an EventWorkspace), as long as there is event data. If disabled, load monitors as spectra (into a Workspace2D, regardless of whether event data is found.

Description

This algorithm loads all monitors found in a NeXus file into a single Workspace2D (if there is no event data or if MonitorsAsEvents is false) or into an EventWorkspace (if event monitor data is found). The algorithm assumes that all of the monitors are histograms and have the same bin boundaries. NOTE: The entry is assumed to be in SNS or ISIS format, so the loader is currently not generically applicable.

This version (v1) of this algorithm has a bug where, in case of a multiperiod input workspace, invoking this Algorithm from Python returns a tuple that contains the resulting group workspace as the first element, followed by references to the individual workspaces as siblings (in addition to being contained within the group).

Usage

Note

To run these usage examples please first download the usage data, and add these to your path. In MantidPlot this is done using Manage User Directories.

ws = LoadNexusMonitors("CNCS_7860_event.nxs")
# CNCS has 3 monitors
print "Number of monitors =", ws.getNumberHistograms()

Output:

Number of monitors = 3

Categories: Algorithms | DataHandling\Nexus