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 %s spectra' % ws.getNumberHistograms()
# Removed the 5 masked spectra
removed = RemoveMaskedSpectra(ws)
print 'Output workspace has %s spectra' % removed.getNumberHistograms()
Output:
Input workspace has 200 spectra
Output workspace has 195 spectra
Categories: Algorithms | Transforms | Splitting