\(\renewcommand\AA{\unicode{x212B}}\)
ReflectometryISISLoadAndProcess v1¶
Summary¶
Reduce ISIS reflectometry data, including optional loading and summing/slicing of the input runs.
See Also¶
ReflectometrySliceEventWorkspace, ReflectometryReductionOneAuto
Properties¶
Name |
Direction |
Type |
Default |
Description |
---|---|---|---|---|
InputRunList |
Input |
str list |
Mandatory |
A list of run numbers or workspace names for the input runs. Multiple runs will be summed before reduction. |
ThetaIn |
Input |
number |
Optional |
Angle in degrees |
ThetaLogName |
Input |
string |
The name ThetaIn can be found in the run log as |
|
ReloadInvalidWorkspaces |
Input |
boolean |
True |
If true, reload input workspaces if they are of the incorrect type |
GroupTOFWorkspaces |
Input |
boolean |
True |
If true, group the TOF workspaces |
HideInputWorkspaces |
Input |
boolean |
False |
If true, make the input workspaces invisible in the ADS. |
CalibrationFile |
Input |
string |
Calibration data file containing a list of detector IDs and twoTheta offsets (in degrees).These should be provided as two spaced-delimited columns, labelled detectorid and theta_offset. Allowed values: [‘dat’] |
|
ROIDetectorIDs |
Input |
string |
When detector IDs are provided, the algorithm will attempt to sum counts across each row of a RectangularDetector after the flood correction step. Detectors not included in the given range will be masked before summing. This will only work correctly when the instrument definition file(IDF) contains a single RectangularDetector panel. |
|
SliceWorkspace |
Input |
boolean |
False |
If true, slice the input workspace |
TimeInterval |
Input |
dbl list |
Array for lengths of time intervals for splitters: if the array is empty, then there will be one splitter created from StartTime and StopTime; if the array has one value, then if this value is positive, all splitters will have same time intervals, else the time intervals will be exponentially increasing; if the size of the array is larger than one, then the splitters can have various time interval values. |
|
LogName |
Input |
string |
Name of the sample log to use to filter - for example, the pulse charge is recorded in ‘ProtonCharge’. |
|
LogValueInterval |
Input |
number |
Optional |
Delta of log value to be sliced into from min log value and max log value; if not given, then only value |
UseNewFilterAlgorithm |
Input |
boolean |
True |
If true, use the new FilterEvents algorithm instead of FilterByTime. |
NumberOfSlices |
Input |
long |
Optional |
The number of uniform-length slices to slice the input workspace into |
SummationType |
Input |
string |
SumInLambda |
The type of summation to perform. Allowed values: [‘SumInLambda’, ‘SumInQ’] |
ReductionType |
Input |
string |
Normal |
The type of reduction to perform when summing in Q. Allowed values: [‘Normal’, ‘DivergentBeam’, ‘NonFlatSample’] |
IncludePartialBins |
Input |
boolean |
False |
If true then partial bins at the beginning and end of the output range are included |
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. |
|
CorrectDetectors |
Input |
boolean |
True |
Moves detectors to twoTheta if ThetaIn or ThetaLogName is given |
DetectorCorrectionType |
Input |
string |
VerticalShift |
When correcting detector positions, this determines whether detectorsshould be shifted vertically or rotated around the sample position. Allowed values: [‘VerticalShift’, ‘RotateAroundSample’] |
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. |
SubtractBackground |
Input |
boolean |
False |
If true then perform background subtraction |
BackgroundProcessingInstructions |
Input |
string |
These processing instructions will be passed to the background subtraction algorithm |
|
BackgroundCalculationMethod |
Input |
string |
PerDetectorAverage |
The type of background reduction to perform. Allowed values: [‘PerDetectorAverage’, ‘Polynomial’, ‘AveragePixelFit’] |
DegreeOfPolynomial |
Input |
number |
0 |
Degree of the fitted polynomial. |
CostFunction |
Input |
string |
Least squares |
The cost function to be passed to the Fit algorithm. Allowed values: [‘Least squares’, ‘Unweighted least squares’] |
NormalizeByIntegratedMonitors |
Input |
boolean |
True |
Normalize by dividing by the integrated monitors. |
CorrectionAlgorithm |
Input |
string |
AutoDetect |
The type of correction to perform. Allowed values: [‘None’, ‘AutoDetect’, ‘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. |
FirstTransmissionRunList |
Input |
str list |
A list of run numbers or workspace names for the first transmission run. Multiple runs will be summed before reduction. |
|
SecondTransmissionRunList |
Input |
str list |
A list of run numbers or workspace names for the second transmission run. Multiple runs will be summed before reduction. |
|
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. |
TransmissionProcessingInstructions |
Input |
string |
These processing instructions will be passed to the transmission workspace algorithm |
|
Debug |
Input |
boolean |
False |
Whether to enable the output of extra workspaces. |
MomentumTransferMin |
Input |
number |
Optional |
Minimum Q value in IvsQ Workspace. Used for Rebinning the IvsQ Workspace |
MomentumTransferStep |
Input |
number |
Optional |
Resolution value in IvsQ Workspace. Used for Rebinning the IvsQ Workspace. This value will be made minus to apply logarithmic rebinning. If you wish to have linear bin-widths then please provide a negative value. |
MomentumTransferMax |
Input |
number |
Optional |
Maximum Q value in IvsQ Workspace. Used for Rebinning the IvsQ Workspace |
ScaleFactor |
Input |
number |
Optional |
Factor you wish to scale Q workspace by. |
OutputWorkspaceBinned |
Output |
Output workspace in Q (rebinned workspace) |
||
OutputWorkspace |
Output |
Output workspace in Q (native binning) |
||
OutputWorkspaceWavelength |
Output |
Output workspace in wavelength |
||
OutputWorkspaceTransmission |
Output |
Output transmissison workspace in wavelength |
||
OutputWorkspaceFirstTransmission |
Output |
First transmissison workspace in wavelength |
||
OutputWorkspaceSecondTransmission |
Output |
Second transmissison workspace in wavelength |
||
FloodCorrection |
Input |
string |
Workspace |
The way to apply flood correction: Workspace - use FloodWorkspace property to get the flood workspace, ParameterFile - use parameters in the parameter file to construct and apply flood correction workspace. Allowed values: [‘Workspace’, ‘ParameterFile’, ‘None’] |
FloodWorkspace |
Input |
string |
A flood workspace or filename to apply. If empty and FloodCorrection is ‘Workspace’ then no correction is applied. |
|
PolarizationAnalysis |
Input |
boolean |
False |
Apply polarization corrections |
PolarizationEfficiencies |
Input |
string |
A workspace or file name containing the polarization efficiency factors for either the Wildes or Fredrikze correction methods. |
ReflectometryISISLoadAndProcess¶
This algorithm performs full preparation and processing for a single run or combined set of runs in an ISIS reflectometry reduction. Note that a set of runs here is a set that will be combined prior to reduction (it does not deal with a group of runs that will be post-processed after reduction). This algorithm is primarily aimed at reducing a single row in the table on the ISIS Reflectometry
interface.
The steps this algorithm performs are:
Ensure workspaces are loaded and are of the correct type.
Sum multiple input runs into a single workspace, if there is more than one.
Sum multiple transmission runs into a single workspace, if there is more than one.
Perform background subtraction, if requested.
Perform time-slicing of the input run, if requested.
Perform the reduction.
Clean up the TOF workspaces into a group.
Input runs and transmission runs are loaded if required, or existing workspaces are used if they are already loaded. When runs are loaded, they are named based on the run number with a TOF_
or TRANS_
prefix. To determine whether workspaces are already loaded, workspace names are matched based on the run number with or without this prefix. Other naming formats are not considered to match.
If a value is provided for the CalibrationFile
property then calibration will be applied for input runs that are loaded (but not where existing workspaces are being used). The calibration will be performed using ReflectometryISISCalibration v1. See the documentation for the required calibration file format.
If time slicing is enabled, the input run must be an event workspace and have monitors loaded; otherwise, it must be a histogram workspace. If the workspace already exists but is the incorrect type or is missing monitors, it will be reloaded.
Input runs can be combined before reduction by supplying a comma-separated list of run numbers. They will be summed using the Plus v1 algorithm. Similarly, multiple input workspaces for the first and/or second transmission inputs can be summed prior to reduction.
If SubtractBackground
is true, then background subtraction will be performed using the ReflectometryBackgroundSubtraction v1 algorithm. There are various options for specifying how the subtraction should be done.
If SliceWorkspace
is true, the time slicing will be performed using the ReflectometrySliceEventWorkspace v1 algorithm. Various options are available for specifying the filter to use and slicing can be done by time or by log value.
The reduction is performed using ReflectometryReductionOneAuto v3.
Finally, the TOF workspaces are cleaned up by grouping them into a workspace group named TOF
. If a group by this name already exists then they will be added to that group.
Usage¶
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: Run reduction on a single run
ReflectometryISISLoadAndProcess(InputRunList='INTER13460')
names = mtd.getObjectNames()
names.sort()
print('Workspaces in the ADS after reduction: {}'.format(names))
Output:
Workspaces in the ADS after reduction: ['IvsQ_13460', 'IvsQ_binned_13460', 'TOF', 'TOF_13460']
Example: Sum multiple input runs
ReflectometryISISLoadAndProcess(InputRunList='INTER13460, INTER13462')
names = mtd.getObjectNames()
names.sort()
print('Workspaces in the ADS after reduction: {}'.format(names))
Output:
Workspaces in the ADS after reduction: ['IvsQ_13460+13462', 'IvsQ_binned_13460+13462', 'TOF', 'TOF_13460', 'TOF_13460+13462', 'TOF_13462']
Example: Sum multiple transmission runs into a single input
ReflectometryISISLoadAndProcess(InputRunList='INTER13460',FirstTransmissionRunList='INTER13463,INTER13464')
names = mtd.getObjectNames()
names.sort()
print('Workspaces in the ADS after reduction: {}'.format(names))
Output:
Workspaces in the ADS after reduction: ['IvsQ_13460', 'IvsQ_binned_13460', 'TOF', 'TOF_13460', 'TRANS_13463', 'TRANS_13463+13464', 'TRANS_13464', 'TRANS_LAM_13463+13464']
Example: Two separate transmission run inputs
ReflectometryISISLoadAndProcess(InputRunList='INTER13460',FirstTransmissionRunList='INTER13463',
SecondTransmissionRunList='INTER13464')
names = mtd.getObjectNames()
names.sort()
print('Workspaces in the ADS after reduction: {}'.format(names))
Output:
Workspaces in the ADS after reduction: ['IvsQ_13460', 'IvsQ_binned_13460', 'TOF', 'TOF_13460', 'TRANS_13463', 'TRANS_13464', 'TRANS_LAM_13463_13464']
Example: Slice input run
ReflectometryISISLoadAndProcess(InputRunList='INTER38415', SliceWorkspace=True, TimeInterval=210)
names = mtd.getObjectNames()
names.sort()
print('Workspaces in the ADS after reduction: {}'.format(names))
Output:
Workspaces in the ADS after reduction: ['IvsLam_38415', 'IvsLam_38415_sliced_0_210', 'IvsLam_38415_sliced_210_420', 'IvsLam_38415_sliced_420_610', 'IvsQ_38415', 'IvsQ_38415_sliced_0_210', 'IvsQ_38415_sliced_210_420', 'IvsQ_38415_sliced_420_610', 'IvsQ_binned_38415', 'IvsQ_binned_38415_sliced_0_210', 'IvsQ_binned_38415_sliced_210_420', 'IvsQ_binned_38415_sliced_420_610', 'TOF', 'TOF_38415', 'TOF_38415_monitors', 'TOF_38415_sliced', 'TOF_38415_sliced_0_210', 'TOF_38415_sliced_210_420', 'TOF_38415_sliced_420_610']
See also
Algorithm ReflectometrySliceEventWorkspace v1, ReflectometryReductionOneAuto v3 and the ISIS Reflectometry
interface.
Categories: AlgorithmIndex | Reflectometry\ISIS | Workflow\Reflectometry