Skip to content
Snippets Groups Projects
Commit 2eeb0f62 authored by Simon Heybrock's avatar Simon Heybrock
Browse files

Re #21181. Add MaskSpectra Sphinx documentation.

parent 1333e9d8
No related branches found
No related tags found
No related merge requests found
.. algorithm::
.. summary::
.. alias::
.. properties::
Description
-----------
Mask (zero) spectra and the underlying detectors in a workspace.
If a spectrum corresponds to more than one detector, all detectors are masked.
Usage
-----
**Example - MaskSpectra**
.. testcode:: MaskSpectraExample
ws = CreateWorkspace(OutputWorkspace='ws', DataX='1,1', DataY='2,2', NSpec=2)
masked = MaskSpectra(InputWorkspace=ws, InputWorkspaceIndexType='WorkspaceIndex', InputWorkspaceIndexSet='1')
print(ws.readY(0), masked.readY(0))
print(ws.readY(1), masked.readY(1))
Output:
.. testoutput:: MaskSpectraExample
(array([ 2.]), array([ 2.]))
(array([ 2.]), array([ 0.]))
.. categories::
.. sourcelink::
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment