LoadWAND v1

../_images/LoadWAND-v1_dlg.png

LoadWAND dialog.

Summary

Loads Event Nexus file, integrates events, sets wavelength, mask, and goniometer, and sets proton charge to monitor counts

Properties

Name Direction Type Default Description
Filename Input list of str lists   Files to Load. Allowed extensions: [‘.nxs.h5’]
IPTS Input number Optional IPTS number to load from
RunNumbers Input int list   Run numbers to load
Wavelength Input number 1.488 Wavelength to set the workspace
ApplyMask Input boolean True If True standard masking will be applied to the workspace
Grouping Input string None Group pixels. Allowed values: [‘None’, ‘2x2’, ‘4x4’]
OutputWorkspace Output Workspace Mandatory  

Description

This algorithm uses LoadEventNexus v1 to load a WAND² data file after which it will integrate out the events, apply a standard mask, change units to wavelength and set the wavelength, set the goniometer, and set the proton charge to be the number of monitor counts.

The standard mask includes the top and bottom 2 rows of pixels and the last 6 columns for run numbers up to 26600 or the first and last 2 columns for larger run numbers.

After this algorithm loads the workspace it can be correctly converted to Q sample or HKL using ConvertToMD v1. If it’s a powder sample it can be reduced with WANDPowderReduction v1.

If you need to do event filtering don’t use this algorithm, simply use LoadEventNexus v1 and convert to data manually.

You can specify multiple files in the filename property or set the IPTS and RunNumbers, where RunNumbers can be a range or list of numbers, see Usage example below. If multiple files are loaded they will be named ‘OutputWorkspace’+’_runnumber’ and be grouped in ‘OutputWorkspace’.

There is a grouping option to group pixels by either 2x2 or 4x4 which will help in reducing memory usage and speed up the later reduction steps. In most cases you will not see a difference in reduced data with 4x4 pixel grouping.

Usage

Example - LoadWAND

silicon = LoadWAND('/HFIR/HB2C/IPTS-7776/nexus/HB2C_26506.nxs.h5')
print("Workspace has {0} spectrum and {1} point in units {2}".format(silicon.getNumberHistograms(),
                                                                     silicon.blocksize(),
                                                                     silicon.getXDimension().name))

Output:

Workspace has 1966080 spectrum and 1 point in units Wavelength

Load using Multiple file

silicon = LoadWAND('/HFIR/HB2C/IPTS-7776/nexus/HB2C_26506.nxs.h5,/HFIR/HB2C/IPTS-7776/nexus/HB2C_26507.nxs.h5')
print("Workspace group {0} has {1} workspaces {2} and {3}".format(silicon.name(),
                                                                  silicon.getNumberOfEntries(),
                                                                  silicon.getNames()[0],
                                                                  silicon.getNames()[1]))

Output:

Workspace group silicon has 2 workspaces silicon_26506 and silicon_26507

Load using IPTS and run numbers

# Comma-separated list
silicon = LoadWAND(IPTS=7776,RunNumbers='26506,26507')
# or range
silicon = LoadWAND(IPTS=7776,RunNumbers='26506-26507')
print("Workspace group {0} has {1} workspaces {2} and {3}".format(silicon.name(),
                                                                  silicon.getNumberOfEntries(),
                                                                  silicon.getNames()[0],
                                                                  silicon.getNames()[1]))

Output:

Workspace group silicon has 2 workspaces silicon_26506 and silicon_26507

Categories: AlgorithmIndex | DataHandling\Nexus

Source

Python: LoadWAND.py (last modified: 2018-10-05)