\(\renewcommand\AA{\unicode{x212B}}\)
Table of Contents
Name | Direction | Type | Default | Description |
---|---|---|---|---|
InputWorkspace | Input | MatrixWorkspace | Mandatory | An input workspace. |
MaskWorkspace | Input | MatrixWorkspace | An optional mask workspace. | |
OutputWorkspace | Output | MatrixWorkspace | Mandatory | An output workspace. |
This algorithm is useful for removing unwanted spectra using masks. If MaskWorkspace is provided it is used to select the spectra to remove. Otherwise the internal mask in the InputWorkspace is used.
Example - ExtractUnmaskedSpectra
# Create histogram workspace
ws = CreateSampleWorkspace()
# Mask 10 spectra
MaskDetectors(ws, [1,2,3,4,5,6,7,8,9,10])
# Extract unmasked into a new workspace
ows = ExtractUnmaskedSpectra(ws)
# Compare workspace sizes
print('Number of spectra in original workspace {}'.format(ws.getNumberHistograms()))
print('Number of spectra in cropped workspace {}'.format(ows.getNumberHistograms()))
Output:
Number of spectra in original workspace 200
Number of spectra in cropped workspace 190
Categories: AlgorithmIndex | Transforms\Splitting