\(\renewcommand\AA{\unicode{x212B}}\)
MaskInstrument v1¶
Warning
MaskInstrument is deprecated (on 2020-07-16). Use MaskDetectors instead.
Summary¶
Mask detectors in the instrument
See Also¶
Properties¶
Name |
Direction |
Type |
Default |
Description |
---|---|---|---|---|
InputWorkspace |
Input |
Mandatory |
||
OutputWorkspace |
Output |
Mandatory |
Name of the output workspace (can be same as InputWorkspace) |
|
DetectorIDs |
Input |
int list |
List of detector IDs to mask |
Description¶
Mask specified detectors in an instrument. This algorithm is just a simplfied version of MaskDetectors and has been deprecated. Please use MaskDetectors instead.
Usage¶
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
Source¶
C++ header: MaskInstrument.h
C++ source: MaskInstrument.cpp