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

CollectHB3AExperimentInfo v1

../_images/CollectHB3AExperimentInfo-v1_dlg.png

CollectHB3AExperimentInfo dialog.

Summary

Collect HB3A experiment information for data reduction by ConvertCWSDToMomentum.

Properties

Name Direction Type Default Description
ExperimentNumber Input number -1 Integer for experiment number.
ScanList Input long list   List of scans of the experiment to be loaded. It cannot be left blank
PtLists Input long list   List of Pts to be loaded for scans specified by ‘ScanList’. Each scan’s Pt. must be started with -1 as a flag. If no Pt. given, then all Pt. are all loaded.
DataDirectory Input string    
GetFileFromServer Input boolean False Obtain data file directly from neutrons.ornl.gov.
Detector2ThetaTolerance Input number 0.01 Tolerance of 2 detector’s 2theta to consider as being at same position.
OutputWorkspace Output TableWorkspace Mandatory TableWorkspace for experiment number, scan, file name and starting detector IDs.
DetectorTableWorkspace Output TableWorkspace Mandatory TableWorkspace for detector Id and information.
GenerateVirtualInstrument Input boolean True If True, then the geometry of all the detectors will be written to DetectorTableWorkspace
DetectorNumberPixels Input number 65536 Number of pixels on the detector. It is only required if GenerateVirtualInstrument is set to False.

Description

This algorithm is to create input workspaces to ConvertCWSDExpToMomentum for HB3A (four-circle single crystal diffractometer in HFIR).

Inputs

The inputs required by algorithm ConvertHB3AExperimentInfo are the experiment number, scan numbers and selected Pt. numbers. By these parameters, the algorithm can determine the names of the data files and generate a list of detectors for downstream algorithm to create virtual instrument.

OutputWorkspaces

Two TableWorkspaces, which contain experiment information, are returned.

InputWorkspace is a TableWorkspace containing the data files names to be loaded for the experiment. It is required to have 4 columns. They are Scan, Pt, Filename and StartDetID respectively.

A typical HB3A experiment consists of multiple scans, each of which contains multiple measurement point (i.e., Pt). FileName is the XML data file for 2D detector information for a specific Scan/Pt pair. StartDetID is the starting detector ID of a specific Scan/Pt mapped to the virtual instrument.

DetectorTableWorkspace is a TableWorkspace that list the parameters of all detector pixels belonged to the virtual instrument. The parameters include detector ID in virtual instrument, detector’s position in cartesian coordinate, and detector’s original detector ID.

How to use algorithm with other algorithms

Algorithm CollectHB3AExperimentInfo is designed to provide input information for algorithm ConvertCWSDExpToMomentum, whose output will be used to calculated UB matrix and integrate single cystal peaks.

Usage

Example - Collect HB3A experiment information for Exp No.355:

CollectHB3AExperimentInfo(ExperimentNumber=355,ScanList=[11,38],PtLists=[-1,11,-1,12],
    DataDirectory='',
    Detector2ThetaTolerance=0.01,
    OutputWorkspace='ExpInfoTable', DetectorTableWorkspace='VirtualInstrumentTable')

# Examine
expinfows = mtd['ExpInfoTable']
virtualdetws = mtd['VirtualInstrumentTable']

print('Number of input files = {}'.format(expinfows.rowCount()))
print('Number of detectors in virtual instrument = {}'.format(virtualdetws.rowCount()))
print('Virtual detectors are from ID = {} to ID = {}'.format(virtualdetws.cell(0,0), virtualdetws.cell(131072-1,0)))

Output:

Number of input files = 2
Number of detectors in virtual instrument = 131072
Virtual detectors are from ID = 0 to ID = 131070

Categories: AlgorithmIndex | Diffraction\ConstantWavelength