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

LoadNexusMonitors v1

../_images/LoadNexusMonitors-v1_dlg.png

LoadNexusMonitors dialog.

Warning

LoadNexusMonitors is deprecated. Use LoadNexusMonitors version 2 instead.

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.

Description

This algorithm loads all monitors found in a NeXus file into a single Workspace2D (if there is no event data or if LoadOnly='Histogram') or into an EventWorkspace (if there is event monitor data or LoadOnly='Events'). 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 Mantid this is done using Manage User Directories.

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

Output:

Number of monitors = 3

Categories: AlgorithmIndex | DataHandling\Nexus | Deprecated

Source

C++ header: LoadNexusMonitors.h (last modified: 2020-03-20)

C++ source: LoadNexusMonitors.cpp (last modified: 2020-04-07)