\(\renewcommand\AA{\unicode{x212B}}\)

MaskNonOverlappingBins v1

../_images/MaskNonOverlappingBins-v1_dlg.png

MaskNonOverlappingBins dialog.

Summary

Marks bins in InputWorkspace which are out of the X range of the second workspace.

Properties

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.

Description

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.

Optimizations

Some small optimizations are possible via CheckSortedX and RaggedInputs. Make sure the input workspaces fill the expectations before using these properties!

  • If there is no doubt that X data in InputWorkspace and ComparisonWorkspace is sorted, the checking for ascending X can be skipped by setting CheckSortedX to False.
  • If 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.

Usage

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