\(\renewcommand\AA{\unicode{x212B}}\)
Table of Contents
Warning
MaskInstrument is deprecated (on 2020-07-16). Use MaskDetectors instead.
Name | Direction | Type | Default | Description |
---|---|---|---|---|
InputWorkspace | Input | MatrixWorkspace | Mandatory | |
OutputWorkspace | Output | MatrixWorkspace | Mandatory | Name of the output workspace (can be same as InputWorkspace) |
DetectorIDs | Input | int list | List of detector IDs to mask |
Mask specified detectors in an instrument. This algorithm is just a simplfied version of MaskDetectors and has been deprecated. Please use MaskDetectors instead.
Example - MaskInstrument
ws = CreateSampleWorkspace()
ws = MaskInstrument(InputWorkspace=ws, DetectorIDs='100,102-104')
# Detectors are masked but data and mask data is zeroed
for i in range(6):
print("Detector {} masked: {:5} data {}".format(i, str(ws.getDetector(i).isMasked()), ws.readY(i)[0]))
Output:
Detector 0 masked: True data 0.0
Detector 1 masked: False data 0.3
Detector 2 masked: True data 0.0
Detector 3 masked: True data 0.0
Detector 4 masked: True data 0.0
Detector 5 masked: False data 0.3
Categories: AlgorithmIndex | Transforms\Masking | Deprecated
C++ header: MaskInstrument.h (last modified: 2021-03-31)
C++ source: MaskInstrument.cpp (last modified: 2021-03-31)