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

LoadILLPolarizedDiffraction v1

../_images/LoadILLPolarizedDiffraction-v1_dlg.png

LoadILLPolarizedDiffraction dialog.

Summary

Loads ILL D7 instrument polarized diffraction nexus files.

See Also

LoadNexus

Properties

Name

Direction

Type

Default

Description

Filename

Input

string

Mandatory

File path of the data file to load. Allowed extensions: [‘.nxs’]

OutputWorkspace

Output

WorkspaceGroup

Mandatory

The output workspace.

PositionCalibration

Input

string

None

Select the type of pixel position calibration. If None, the pixel positions are read from IDF file. If Nexus, the positions are read from Nexus file. If YIGFile, then the calibration twotheta data is loaded from a user-defined calibration file. Allowed values: [‘None’, ‘Nexus’, ‘YIGFile’]

YIGFilename

Input

string

File path of the YIG calibration data file to load. Allowed extensions: [‘.xml’]

ConvertToScatteringAngle

Input

boolean

False

Convert the bin edges to scattering angle.

TransposeMonochromatic

Input

boolean

False

Transpose the 2D workspace with monochromatic data

TOFUnits

Input

string

UncalibratedTime

The choice of X-axis units for Time-Of-Flight data. Allowed values: [‘UncalibratedTime’, ‘TimeChannels’]

Description

This is the loader for the raw .nxs files produced by the polarized diffractometers and spectrometers at ILL. Currently it supports only the D7 instrument. Workspaces in the loaded group are sorted according to their flipper state value for each present polarisation orientation, with the first workspace having always flipper ‘ON’, and the next ‘OFF’.

Loading D7

For D7 1-dimensional detector, it supports 3 types of pixel alignment relative to detector banks:

  • None is the default alignment, where the pixel positions in banks are set as defined in the instrument definition file

  • Nexus is the alignment option where the pixel positions relative to banks are read from data available in D7 raw .nxs files

  • YIGFile is the alignment option that uses an Intrument Parameter File filled with 2theta positions for each pixel relative to the bank 2theta

All alignment methods allow for independent movement of banks.

The 2theta value of each bank is read from the file, and it refers to the middle point of the bank. The sum of pixel’s and bank 2theta determine their final position in 3D space.

Logs

The loader creates logs separately for each entry present in the .nxs file.

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.

Example - LoadILLPolarizedDiffraction - D7 spectroscopy

wsGroup = LoadILLPolarizedDiffraction(Filename='ILL/D7/395850.nxs')
print('The output has {0} entries'.format(wsGroup.getNumberOfEntries()))
ws1 = wsGroup.getItem(0)
print('Each entry has {0} bins (Time of Flight mode) and {1} spectra'.format(ws1.blocksize(), ws1.getNumberHistograms()))

Output:

The output has 2 entries
Each entry has 512 bins (Time of Flight mode) and 134 spectra

Example - LoadILLPolarizedDiffraction - D7 NeXuS alignment monochromatic

wsGroup = LoadILLPolarizedDiffraction(Filename='ILL/D7/401800.nxs')
print('The output has {0} entries'.format(wsGroup.getNumberOfEntries()))
ws1 = wsGroup.getItem(0)
print('Each entry has {0} bins (monochromatic mode) and {1} spectra'.format(ws1.blocksize(), ws1.getNumberHistograms()))

Output:

The output has 6 entries
Each entry has 1 bins (monochromatic mode) and 134 spectra

Categories: AlgorithmIndex | DataHandling\Nexus | ILL\Diffraction

Source

C++ header: LoadILLPolarizedDiffraction.h

C++ source: LoadILLPolarizedDiffraction.cpp