Table of Contents
Convert constant wavelength single crystal diffractomer’s datain MDEventWorkspace and in unit of Q-sample to the HKL space by UB matrix.
Name | Direction | Type | Default | Description |
---|---|---|---|---|
InputWorkspace | Input | MDEventWorkspace | Mandatory | Name of the input MDEventWorkspace that stores detectors counts from a constant-wave powder diffraction experiment. |
PeaksWorkspace | Input | PeaksWorkspace | Input Peaks Workspace | |
UBMatrix | Input | dbl list | A comma seperated list of doubles for UB matrix from (0,0), (0,1)... (2,1),(2,2) | |
OutputWorkspace | Output | MDEventWorkspace | Mandatory | Name of the output MDEventWorkspace in HKL-space. |
QSampleFileName | Input | string | Name of file for sample sample. | |
HKLFileName | Input | string | Name of file for HKL. |
This algorithms is to convert an MDEventWorkspace in Q-sample coordinate to HKL coordindate for a reactor-based four-circle single crystal diffractometer. Meanwhile, the algorithm is able to export the MDEvents to file.
Example - Convert detector counts of an HB3A’s measurement to HKL.
# Create input table workspaces for experiment information and virtual instrument parameters
CollectHB3AExperimentInfo(ExperimentNumber='406', ScanList='298', PtLists='-1,22',
DataDirectory='',
GenerateVirtualInstrument=False,
OutputWorkspace='ExpInfoTable', DetectorTableWorkspace='VirtualInstrumentTable')
# Convert to MDWorkspace
ConvertCWSDExpToMomentum(InputWorkspace='ExpInfoTable', CreateVirtualInstrument=False,
OutputWorkspace='QSampleMD',
Directory='')
ConvertCWSDMDtoHKL(InputWorkspace='QSampleMD',
UBMatrix='0.13329061, 0.07152342, -0.04215966, 0.01084569, -0.1620849, 0.0007607, -0.14018499, -0.07841385, -0.04002737',
OutputWorkspace='HKLMD')
# Examine
mdws = mtd['QSampleMD']
print 'Output MDEventWorkspace has %d events.'%(mdws.getNEvents())
hklws = mtd['HKLMD']
print 'H: range from %.5f to %.5f.' % (hklws.getXDimension().getMinimum(), hklws.getXDimension().getMaximum())
print 'K: range from %.5f to %.5f.' % (hklws.getYDimension().getMinimum(), hklws.getYDimension().getMaximum())
print 'L: range from %.5f to %.5f.' % (hklws.getZDimension().getMinimum(), hklws.getZDimension().getMaximum())
Output:
Output MDEventWorkspace has 1631 events.
H: range from -0.24012 to 0.29856.
K: range from -0.41417 to 0.42250.
L: range from 4.83863 to 7.23861.
Categories: Algorithms | Diffraction\ConstantWavelength