\(\renewcommand\AA{\unicode{x212B}}\)
Table of Contents
Name | Direction | Type | Default | Description |
---|---|---|---|---|
InputWorkspace | Input | MatrixWorkspace | Mandatory | A workspace to mask. |
OutputWorkspace | Output | MatrixWorkspace | Mandatory | The masked workspace. |
ComparisonWorkspace | Input | MatrixWorkspace | Mandatory | A workspace to compare the InputWorkspace’s binning to. |
MaskPartiallyOverlapping | Input | boolean | False | If true, mask also bins that overlap only partially. |
RaggedInputs | Input | string | Check | Choose whether the input workspaces have common bins, are ragged, or if the algorithm should check. Allowed values: [‘Check’, ‘Ragged’, ‘Common Bins’] |
CheckSortedX | Input | boolean | True | If true, the algorithm ensures that both workspaces have X sorted in ascending order. |
This algorithm masks the bins in InputWorkspace
which lie in \(X\) range that is not covered by ComparisonWorkspace
. The MaskPartiallyOverlapping
flag affect the behavior with regards to bins which are partially covered by ComparisonWorkspace
. The algorithm works only with the X data sorted in ascending order.
The algorithm currently applies the default masking weight to the bins which does not clear the data.
Some small optimizations are possible via CheckSortedX
and RaggedInputs
. Make sure the input workspaces fill the expectations before using these properties!
InputWorkspace
and ComparisonWorkspace
is sorted, the checking for ascending X can be skipped by setting CheckSortedX
to False
.RaggedInputs
is set to 'Check'
(the default), the algorithm will check if both InputWorkspace
and ComparisonWorkspace
are ragged workspaces and choose the processing method accordingly. The test can be skipped by setting RaggedInputs
to 'Ragged'
or 'Common Bins'
which forces a specific processing method.Example - MaskNonOverlappingBins
bigWS = CreateSampleWorkspace(XMin=0, XMax=20000)
smallWS = CreateSampleWorkspace(XMin=9000, XMax=11000)
masked = MaskNonOverlappingBins(bigWS, smallWS)
print('It is not (yet) possible to access the bin masking information in Python.')
print('Please check that the correct bins are grayed out in the data view.')
Output:
It is not (yet) possible to access the bin masking information in Python.
Please check that the correct bins are grayed out in the data view.
Categories: AlgorithmIndex | Transforms\Masking
C++ header: MaskNonOverlappingBins.h (last modified: 2021-03-31)
C++ source: MaskNonOverlappingBins.cpp (last modified: 2021-03-31)