Table of Contents
Name | Direction | Type | Default | Description |
---|---|---|---|---|
FirstTransmissionRun | Input | MatrixWorkspace | Mandatory | First transmission run, or the low wavelength transmision run if SecondTransmissionRun is also provided. |
SecondTransmissionRun | Input | MatrixWorkspace | Second, high wavelength transmission run. Optional. Causes the InputWorkspace to be treated as the low wavelength transmission run. | |
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 |
EndOverlap | Input | number | Optional | End wavelength (angstroms) for stitching transmission runs together |
I0MonitorIndex | Input | number | Optional | I0 monitor workspace index |
ProcessingInstructions | Input | string | Mandatory | Grouping pattern on workspace indexes to yield only the detectors of interest. See GroupDetectors for details. |
WavelengthMin | Input | number | Mandatory | Wavelength minimum in angstroms |
WavelengthMax | Input | number | Mandatory | Wavelength maximum in angstroms |
MonitorBackgroundWavelengthMin | Input | number | Optional | Wavelength minimum for monitor background in angstroms. |
MonitorBackgroundWavelengthMax | Input | number | Optional | Wavelength maximum for monitor background in angstroms. |
MonitorIntegrationWavelengthMin | Input | number | Optional | Wavelength minimum for integration in angstroms. |
MonitorIntegrationWavelengthMax | Input | number | Optional | Wavelength maximum for integration in angstroms. |
OutputWorkspace | Output | MatrixWorkspace | Mandatory | Output Workspace IvsQ. |
Creates a transmission run workspace given one or two TOF workspaces. If two workspaces are provided, then the first workspace is considered a low wavelength transmission run, and the second workspace is considered a high wavelength transmission run.
Both input workspaces must have X-units of TOF. They are first converted to units of wavelength and then stitched together using Stitch1D v3.
A single output workspace is generated with X-units of Wavelength in angstroms.
In most cases you will want to use CreateTransmissionWorkspaceAuto v2, which is a facade over this algorithm that correctly configures the input properties for you.
The diagram above illustrates the main steps in the algorithm. Below is a more detailed diagram describing how transmission workspaces are converted to units of wavelength and normalized by monitors.
Note
To run these usage examples please first download the usage data, and add these to your path. In MantidPlot this is done using Manage User Directories.
Example - Create a transmission run
trans = Load(Filename='INTER00013463.nxs')
transWS = CreateTransmissionWorkspace(
FirstTransmissionRun = trans,
I0MonitorIndex = 2,
ProcessingInstructions = '3,4',
WavelengthMin = 1,
WavelengthMax = 17,
MonitorBackgroundWavelengthMin = 15,
MonitorBackgroundWavelengthMax = 17,
MonitorIntegrationWavelengthMin = 4,
MonitorIntegrationWavelengthMax = 10,
Version=1)
print("The first four transWS Y values are:")
for i in range (4):
print("{:.4f}".format(transWS.readY(0)[i]))
Output:
The first four transWS Y values are:
0.0255
0.0758
0.1322
0.1422
Example - Create a transmission run from two runs
trans1 = Load(Filename='INTER00013463.nxs')
trans2 = Load(Filename='INTER00013464.nxs')
transWS = CreateTransmissionWorkspace(
FirstTransmissionRun = trans1,
SecondTransmissionRun = trans2,
Params = [1.5,0.02,17],
StartOverlap = 10.0,
EndOverlap = 12.0,
I0MonitorIndex = 2,
ProcessingInstructions = '3,4',
WavelengthMin = 1,
WavelengthMax = 17,
MonitorBackgroundWavelengthMin = 15,
MonitorBackgroundWavelengthMax = 17,
MonitorIntegrationWavelengthMin = 4,
MonitorIntegrationWavelengthMax = 10,
Version=1)
print("The first four transWS Y values are:")
for i in range (4):
print("{:.4f}".format(transWS.readY(0)[i]))
Output:
The first four transWS Y values are:
0.0572
0.0574
0.0584
0.0584
Categories: Algorithms | Reflectometry
C++ source: CreateTransmissionWorkspace.cpp (last modified: 2017-03-29)
C++ header: CreateTransmissionWorkspace.h (last modified: 2016-08-08)