\(\renewcommand\AA{\unicode{x212B}}\)

MaskInstrument v1

../_images/MaskInstrument-v1_dlg.png

MaskInstrument dialog.

Warning

MaskInstrument is deprecated (on 2020-07-16). Use MaskDetectors instead.

Summary

Mask detectors in the instrument

Properties

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

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 (last modified: 2020-07-16)

C++ source: MaskInstrument.cpp (last modified: 2020-07-16)