\(\renewcommand\AA{\unicode{x212B}}\)
Table of Contents
Name | Direction | Type | Default | Description |
---|---|---|---|---|
FirstTransmissionRun | Input | MatrixWorkspace | Mandatory | Input workspace. |
SecondTransmissionRun | Input | MatrixWorkspace | Second transmission run workspace in TOF. | |
AnalysisMode | Input | string | PointDetectorAnalysis | Analysis mode. This property is only used when ProcessingInstructions is not set. Allowed values: [‘PointDetectorAnalysis’, ‘MultiDetectorAnalysis’] |
ProcessingInstructions | Input | string | Grouping pattern of spectrum numbers to yield only the detectors of interest. See GroupDetectors for syntax. | |
WavelengthMin | Input | number | Optional | Wavelength Min in angstroms |
WavelengthMax | Input | number | Optional | Wavelength Max in angstroms |
I0MonitorIndex | Input | number | Optional | I0 monitor workspace index |
MonitorBackgroundWavelengthMin | Input | number | Optional | Wavelength minimum for monitor background subtraction in angstroms. |
MonitorBackgroundWavelengthMax | Input | number | Optional | Wavelength maximum for monitor background subtraction in angstroms. |
MonitorIntegrationWavelengthMin | Input | number | Optional | Wavelength minimum for integration in angstroms. |
MonitorIntegrationWavelengthMax | Input | number | Optional | Wavelength maximum for integration in angstroms. |
NormalizeByIntegratedMonitors | Input | boolean | True | Normalize by dividing by the integrated monitors. |
Params | Input | dbl list | A comma separated list of first bin boundary, width, last bin boundary. These parameters are used for stitching together transmission runs. Values are in wavelength (angstroms). This input is only needed if a SecondTransmission run is provided. | |
StartOverlap | Input | number | Optional | Start wavelength for stitching transmission runs together. Only used if a second transmission run is provided. |
EndOverlap | Input | number | Optional | End wavelength (angstroms) for stitching transmission runs together. Only used if a second transmission run is provided. |
ScaleRHSWorkspace | Input | boolean | True | Scale the right-hand-side or left-hand-side workspace. Only used if a second transmission run is provided. |
OutputWorkspace | Output | MatrixWorkspace | Mandatory | Output transmission workspace in wavelength. |
This algorithm is a facade over CreateTransmissionWorkspace v2. It pulls numeric parameters out of the instrument parameter file where possible. You can override any of these automatically applied defaults by providing your own values.
The first transmission run is the only mandatory property. If ProcessingInstructions
is not set its value is inferred from other properties:
AnalysisMode = PointDetectorAnalaysis
and PointDetectorStart = PointDetectorStop
then ProcessingInstructions
is set to PointDetectorStart
.AnalysisMode = PointDetectorAnalaysis
and PointDetectorStart != PointDetectorStop
then ProcessingInstructions
is set to PointDetectorStart:PointDetectorStop
.AnalysisMode = MultiDetectorAnalaysis
then the spectrum range from MultiDetectorStart
to the last spectrum in the input workspace is used.When WavelengthMin
and/or WavelengthMax
are not provided, the algorithm will
search for LambdaMin
and LambdaMax
in the parameter file. If monitor properties,
I0MonitorIndex
, MonitorBackgroundWavelengthMin
, MonitorBackgroundWavelengthMax
,
MonitorIntegrationWavelengthMin
and MonitorIntegrationWavelengthMax
, are not set, the
algorithm will search for I0MonitorIndex
, MonitorBackgroundMin
, MonitorBackgroundMax
,
MonitorIntegralMin
and MonitorIntegralMax
respectively.
Finally, if a second transmission run is given, the algorithm will run CreateTransmissionWorkspace v2 using
StartOverlap
, EndOverlap
and Params
if those have been set.
See CreateTransmissionWorkspace v2 for more information on the wrapped algorithm.
This is version 2 of the algorithm. For version 1, please see CreateTransmissionWorkspaceAuto-v1.
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 - Create a transmission run
# Create a transmission run with input properties read from the parameter file
trans = Load(Filename='INTER00013463.nxs')
transWS = CreateTransmissionWorkspaceAuto(FirstTransmissionRun=trans)
print("{:.4f}".format(transWS.readY(0)[26]))
print("{:.4f}".format(transWS.readY(0)[27]))
print("{:.4f}".format(transWS.readY(0)[28]))
print("{:.4f}".format(transWS.readY(0)[29]))
Output:
0.0827
0.0859
0.0861
0.0869
Example - Create a transmission run, overriding some default parameters
# Override the default values for MonitorBackgroundWavelengthMin and MonitorBackgroundWavelengthMax
trans = Load(Filename='INTER00013463.nxs')
transWS = CreateTransmissionWorkspaceAuto(FirstTransmissionRun=trans, MonitorBackgroundWavelengthMin=0.0, MonitorBackgroundWavelengthMax=1.0)
print("{:.3f}".format(transWS.readY(0)[26]))
print("{:.3f}".format(transWS.readY(0)[27]))
print("{:.3f}".format(transWS.readY(0)[28]))
print("{:.3f}".format(transWS.readY(0)[29]))
Output:
0.083
0.086
0.086
0.087
Example - Create a transmission run from two runs
trans1 = Load(Filename='INTER00013463.nxs')
trans2 = Load(Filename='INTER00013464.nxs')
transWS = CreateTransmissionWorkspaceAuto(FirstTransmissionRun=trans1, SecondTransmissionRun=trans2, Params=[1.5,0.02,17], StartOverlap=10.0, EndOverlap=12.0)
print("{:.4f}".format(transWS.readY(0)[26]))
print("{:.4f}".format(transWS.readY(0)[27]))
print("{:.4f}".format(transWS.readY(0)[28]))
print("{:.4f}".format(transWS.readY(0)[29]))
Output:
0.0816
0.0841
0.0857
0.0862
Categories: AlgorithmIndex | Reflectometry\ISIS
C++ header: CreateTransmissionWorkspaceAuto2.h (last modified: 2021-03-31)
C++ source: CreateTransmissionWorkspaceAuto2.cpp (last modified: 2021-05-24)