LoadISISNexus v2

../_images/LoadISISNexus-v2_dlg.png

LoadISISNexus dialog.

Summary

Loads a file in ISIS NeXus format.

Properties

Name Direction Type Default Description
Filename Input string Mandatory The name of the Nexus file to load. Allowed extensions: [‘.nxs’, ‘.n*’]
OutputWorkspace Output Workspace Mandatory  
SpectrumMin Input number 0  
SpectrumMax Input number Optional  
SpectrumList Input int list    
EntryNumber Input number 0 0 indicates that every entry is loaded, into a separate workspace within a group. A positive number identifies one entry to be loaded, into one worskspace
LoadMonitors Input string Include Option to control the loading of monitors. Allowed options are Include,Exclude, Separate. Include:The default is Include option would load monitors with the workspace if monitors spectra are within the range of loaded detectors. If the time binning for the monitors is different from the binning of the detectors this option is equivalent to the Separate option Exclude:Exclude option excludes monitors from the output workspace. Separate:Separate option loads monitors into a separate workspace called: OutputWorkspace_monitors. Defined aliases: 1: Equivalent to Separate. 0: Equivalent to Exclude. Allowed values: [‘Include’, ‘Exclude’, ‘Separate’]

Description

Loads a Nexus file created from an ISIS instrument.

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.

Example - Load without any optional arguments:

# Load LOQ histogram dataset
ws = LoadISISNexus('LOQ49886.nxs')

print "The 1st x-value of the first spectrum is: " + str(ws.readX(0)[0])

Output:

The 1st x-value of the first spectrum is: 5.0

Example - Using SpectrumMin and SpectrumMax:

# Load from LOQ data file spectrum 2 to 3.
ws = LoadISISNexus('LOQ49886.nxs',SpectrumMin=2,SpectrumMax=3)

print "The number of histograms (spectra) is: " + str(ws.getNumberHistograms())

Output:

The number of histograms (spectra) is: 2

Example - Using EntryNumber:

# Load first period of multiperiod POLREF data file
ws = LoadISISNexus('POLREF00004699.nxs', EntryNumber=1)

print "The number of histograms (spectra) is: " + str(ws.getNumberHistograms())

Output:

The number of histograms (spectra) is: 246

Categories: Algorithms | DataHandling | Nexus

Source

C++ source: LoadISISNexus2.cpp

C++ header: LoadISISNexus2.h