Table of Contents
Reduces a single TOF/Lambda reflectometry run into a mod Q vs I/I0 workspace. Performs transmission corrections.
Name | Direction | Type | Default | Description |
---|---|---|---|---|
InputWorkspace | Input | MatrixWorkspace | Mandatory | Run to reduce. |
AnalysisMode | Input | string | PointDetectorAnalysis | The type of analysis to perform. Point detector or multi detector. Allowed values: [‘PointDetectorAnalysis’, ‘MultiDetectorAnalysis’] |
RegionOfInterest | Input | int list | Indices of the spectra a pair (lower, upper) that mark the ranges that correspond to the region of interest (reflected beam) in multi-detector mode. | |
RegionOfDirectBeam | Input | int list | Indices of the spectra a pair (lower, upper) that mark the ranges that correspond to the direct beam in multi-detector mode. | |
I0MonitorIndex | Input | number | Mandatory | 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 |
WavelengthStep | Input | number | 0.05 | Wavelength rebinning step in angstroms. Defaults to 0.05. Used for rebinning intermediate workspaces converted into wavelength. |
MonitorBackgroundWavelengthMin | Input | number | Mandatory | Wavelength minimum for monitor background in angstroms. |
MonitorBackgroundWavelengthMax | Input | number | Mandatory | Wavelength maximum for monitor background in angstroms. |
MonitorIntegrationWavelengthMin | Input | number | Mandatory | Wavelength minimum for integration in angstroms. |
MonitorIntegrationWavelengthMax | Input | number | Mandatory | Wavelength maximum for integration in angstroms. |
DetectorComponentName | Input | string | Name of the detector component i.e. point-detector. If these are not specified, the algorithm will attempt lookup using a standard naming convention. | |
SampleComponentName | Input | string | Name of the sample component i.e. some-surface-holder. If these are not specified, the algorithm will attempt lookup using a standard naming convention. | |
OutputWorkspace | Output | MatrixWorkspace | Mandatory | Output Workspace IvsQ. |
OutputWorkspaceWavelength | Output | MatrixWorkspace | Output Workspace IvsLam. Intermediate workspace. | |
ThetaIn | Input | number | Optional | Final theta value in degrees. Optional, this value will be calculated internally and provided as ThetaOut if not provided. |
ThetaOut | Output | number | Calculated final theta in degrees. | |
NormalizeByIntegratedMonitors | Input | boolean | True | Normalize by dividing by the integrated monitors. |
CorrectDetectorPositions | Input | boolean | True | Correct detector positions using ThetaIn (if given) |
FirstTransmissionRun | Input | MatrixWorkspace | First transmission run, or the low wavelength transmission run if SecondTransmissionRun is also provided. | |
SecondTransmissionRun | Input | MatrixWorkspace | Second, high wavelength transmission run. Optional. Causes the FirstTransmissionRun 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 |
StrictSpectrumChecking | Input | boolean | True | Enforces spectrum number checking prior to normalization |
CorrectionAlgorithm | Input | string | None | The type of correction to perform. Allowed values: [‘None’, ‘PolynomialCorrection’, ‘ExponentialCorrection’] |
Polynomial | Input | dbl list | Coefficients to be passed to the PolynomialCorrection algorithm. | |
C0 | Input | number | 0 | C0 value to be passed to the ExponentialCorrection algorithm. |
C1 | Input | number | 0 | C1 value to be passed to the ExponentialCorrection algorithm. |
Reduces a single TOF reflectometry run into a mod Q vs I/I0 workspace. Performs transmission corrections. Handles both point detector and multidetector cases. The algorithm can correct detector locations based on an input theta value.
Historically the work performed by this algorithm was known as the Quick script.
If MonitorBackgroundWavelengthMin and MonitorBackgroundWavelengthMax are both set to 0, then background normalization will not be performed on the monitors.
The default analysis mode is PointDetectorAnalysis. Only this mode supports Transmission corrections (see below). For PointAnalysisMode the analysis can be roughly reduced to IvsLam = DetectorWS / sum(I0) / TransmissionWS / sum(I0). The normalization by tranmission run(s) is optional. If necessary, input workspaces are converted to Wavelength first via ConvertUnits v1.
IvsQ is calculated via ConvertUnits v1 into units of MomentumTransfer. Corrections may be applied prior to the transformation to ensure that the detectors are in the correct location according to the input Theta value. Corrections are only enabled when a Theta input value has been provided.
Transmission correction is a normalization step, which may be applied to PointDetectorAnalysis reduction.
Transmission runs are expected to be in TOF. The spectra numbers in the Transmission run workspaces must be the same as those in the Input Run workspace. If two Transmission runs are provided then the Stitching parameters associated with the transmission runs will also be required. If a single Transmission run is provided, then no stitching parameters will be needed.
If no Transmission runs are provided, then polynomial correction can be performed instead. Polynomial correction is enabled by setting the CorrectionAlgorithm property. If set to PolynomialCorrection it runs the PolynomialCorrection v1 algorithm, with this algorithms Polynomial property used as its Coefficients property.
If the CorrectionAlgorithm property is set to ExponentialCorrection, then the ExponentialCorrection v1 algorithm is used, with C0 and C1 taken from the C0 and C1 properties.
Detector Position Correction is used for when the position of the detector is not aligned with the reflected beamline. The correction algorithm used is SpecularReflectionPositionCorrect v1 which is a purely vertical position correction.
Example - Reduce a Run
run = Load(Filename='INTER00013460.nxs')
# Basic reduction with no transmission run
IvsQ, IvsLam, thetaOut = ReflectometryReductionOne(InputWorkspace=run, ThetaIn=0.7, I0MonitorIndex=2, ProcessingInstructions='3:4',
WavelengthMin=1.0, WavelengthMax=17.0,
MonitorBackgroundWavelengthMin=15.0, MonitorBackgroundWavelengthMax=17.0,
MonitorIntegrationWavelengthMin=4.0, MonitorIntegrationWavelengthMax=10.0 )
print "The first four IvsLam Y values are: [ %.4e, %.4e, %.4e, %.4e ]" % (IvsLam.readY(0)[0], IvsLam.readY(0)[1], IvsLam.readY(0)[2], IvsLam.readY(0)[3])
print "The first four IvsQ Y values are: [ %.4e, %.4e, %.4e, %.4e ]" % (IvsQ.readY(0)[0], IvsQ.readY(0)[1], IvsQ.readY(0)[2], IvsQ.readY(0)[3])
print "Theta out is the same as theta in:",thetaOut
Output:
The first four IvsLam Y values are: [ 0.0000e+00, 0.0000e+00, 4.9588e-07, 1.2769e-06 ]
The first four IvsQ Y values are: [ 2.1435e-05, 5.0384e-05, 5.2332e-05, 5.2042e-05 ]
Theta out is the same as theta in: 0.7
Categories: Algorithms | Reflectometry