11. PIXEL MASK
11.1. Applying the pixel mask
The detector conguration parameter pixel_mask_applied enables (True) or disables (False) applying the pixel
mask on the acquired data. Every threshold has its own pixel mask. These masks may dier from one another.
If true (default), pixels which have any bit set in the pixel_mask are agged with (2
image bit depth
−1). Please consult
the API Reference for details on the detector conguration parameter pixel_mask.
11.2. Updating the pixel mask
11.2.1. Overview
Updating the pixel mask of an EIGER2 detector system involves four basic steps:
1. Retrieving the current pixel mask from the detector system via the SIMPLON API.
2. Manipulating the pixel mask to add or update pixels.
3. Uploading the updated pixel mask to the detector system via the SIMPLON API.
4. Persistently storing the updated pixel mask on the detector system by sending the detector command
arm.
11.2.2. Retrieving the current mask from the detector system
The pixel mask can be retrieved from the detector system by a GET request on the detector conguration
parameter threshold/n/pixel_mask where n is the threshold number. The data of the pixel mask is retrieved
either as ti or in JSON serialization by choosing
application/ti
or
application/json
in the
get
request accordingly.
11.2.3. Manipulating the pixel mask
Information #15
For details about the pixel values in the pixel mask and their meaning, consult the API Refer-
ence.
TIFF
If the pixel mask is retrieved and stored as ti, the uint32 data in the ti le can be manipulated with ALBULA
API.
JSON
If the pixel mask is retrieved as JSON, the HTTP reply has to be parsed correctly into an array. Please see the
example below and the API Reference for details. The values in this array can then be manipulated to reect
the required updates of the pixel mask. After updating the array, it has to be serialized again in JSON according
to the specications in the API Reference.
DECTRIS EIGER
®
2 User Manual v1.8.2 33 | 36