\(\renewcommand\AA{\unicode{x212B}}\)
Table of Contents
Name | Direction | Type | Default | Description |
---|---|---|---|---|
Filename | Input | string | Mandatory | File path of the data file to load. Allowed extensions: [‘.nxs’] |
OutputWorkspace | Output | MatrixWorkspace | Mandatory | The output workspace. |
DataType | Input | string | Auto | Select the type of data, with or without calibration already applied. If Auto then the calibrated data is loaded if available, otherwise the raw data is loaded. Allowed values: [‘Auto’, ‘Raw’, ‘Calibrated’] |
TwoThetaOffset | Input | number | 0 | 2 theta offset for D1B data, in degrees. |
AlignTubes | Input | boolean | True | Apply vertical and horizontal alignment of tubes as defined in IPF |
ConvertAxisAndTranspose | Input | boolean | False | Whether to convert the spectrum axis to 2theta and transpose (for 1D detector and no-scan configuration) |
This is the loader for the raw .nxs files produced by the powder diffractometers at ILL. Currently it supports the instruments D20, D1B and D2B, as well as IN5, PANTHER, and SHARP in the data scan mode.
The TwoThetaOffset parameter corresponding to the rotation of the detector is optional and only used for D1B. It is to be provided in degrees.
For D20 1-dimensional detector, it supports 3 resolution modes:
Note, that all the IDFs contain only active pixels, and do not count the last 2 banks which are permanently inactive.
The 2theta value of the first pixel is read from the file, and the whole detector is rotated correspondingly.
The loader is able to load the following scan configurations:
For D2B, the loader applies tube alignment; first rotating them horizontally around the sample, then translating them vertically. This is done based on tube_centers and tube_angles parameters defined in the Instrument Parameter File.
For D2B it assumes that the counts written in the nexus file follow “U-shape” convention; that is, the first tube counts are written from bottom to top, the second one: from top to bottom, and so on. Note that in the IDF of D2B detector IDs grow ascending from bottom to top for all the tubes. The loader takes care that the correct counts are attributed to correct pixels.
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.
Example - LoadILLDiffraction - D20 no scan
ws = LoadILLDiffraction(Filename='ILL/D20/967100.nxs')
print('The output has {0} bins (no scan) and {1} spectra'.format(ws.blocksize(), ws.getNumberHistograms()))
Output:
The output has 1 bins (no scan) and 3073 spectra
Example - LoadILLDiffraction - D20 omega scan
ws = LoadILLDiffraction(Filename='ILL/D20/000017.nxs')
print('The output has {0} bins (scan) and {1} spectra'.format(ws.blocksize(), ws.getNumberHistograms()))
Output:
The output has 21 bins (scan) and 3073 spectra
Example - LoadILLDiffraction - D2B detector scan
ws = LoadILLDiffraction(Filename='ILL/D2B/508093.nxs')
print('The output has {0} bins (detector scan) and {1} spectra'.format(ws.blocksize(), ws.getNumberHistograms()))
Output:
The output has 1 bins (detector scan) and 409625 spectra
Example - LoadILLDiffraction - D1B
ws = LoadILLDiffraction(Filename='ILL/D1B/473432.nxs')
print('The output has {0} bin (detector scan) and {1} spectra'.format(ws.blocksize(), ws.getNumberHistograms()))
Output:
The output has 1 bin (detector scan) and 1281 spectra
Example - LoadILLDiffraction - IN5
ws = LoadILLDiffraction(Filename='ILL/IN5/199857.nxs')
print('The output has {0} bin (omega scan) and {1} spectra'.format(ws.blocksize(), ws.getNumberHistograms()))
Output:
The output has 17 bin (omega scan) and 98305 spectra
Categories: AlgorithmIndex | DataHandling\Nexus | ILL\Diffraction
C++ header: LoadILLDiffraction.h (last modified: 2021-04-12)
C++ source: LoadILLDiffraction.cpp (last modified: 2021-04-12)