Table of Contents
Name | Direction | Type | Default | Description |
---|---|---|---|---|
InputWorkspace | Input | MatrixWorkspace | Mandatory | An input workspace. |
MaskedWorkspace | Input | MatrixWorkspace | If given but not as a MaskWorkspace, the masking from this workspace will be used. If given as a MaskWorkspace, the masking is read from its Y values. | |
OutputWorkspace | Output | MatrixWorkspace | Mandatory | An output workspace. |
Removes all masked spectra from a workspace and stores all unmasked ones in the output workspace. The mask is taken either from the optional MaskedWorkspace property or from the input workspace if it is the only input. The MaskedWorkspace property can either be a masked MatrixWorkspace or a specialised MaskWorkspace.
Example - RemoveMaskedSpectra
# Create a workspace
ws = CreateSampleWorkspace()
# Mask some detectors
MaskDetectors(ws,SpectraList=[10,20,30,40,50])
print('Input workspace has {} spectra'.format(ws.getNumberHistograms()))
# Removed the 5 masked spectra
removed = RemoveMaskedSpectra(ws)
print('Output workspace has {} spectra'.format(removed.getNumberHistograms()))
Output:
Input workspace has 200 spectra
Output workspace has 195 spectra
Categories: AlgorithmIndex | Transforms\Splitting
C++ source: RemoveMaskedSpectra.cpp (last modified: 2019-06-05)
C++ header: RemoveMaskedSpectra.h (last modified: 2018-10-05)