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

MaskInstrument v1

../_images/ImageNotFound.png

Enable screenshots using DOCS_SCREENSHOTS in CMake

Warning

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

Summary

Mask detectors in the instrument

See Also

MaskDetectors

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

C++ source: MaskInstrument.cpp