Mask

The Create / edit mask window draws detector masks for calibration and integration. You can open the same wizard from:

The mask path is optional for calibration: leave it empty to use the automatic mask (beam-stop + negative pixels). When you save a user mask, it is stored as a session path and synced into the calibration form. After calibration, a new session mask is applied on each integrate as auto_mask | user (using auto_mask.npy from the integrator directory when present).

Mask wizard overview

Layout

Recipes

To open the mask wizard

Left Set mask, or from Calibration: Configure mask (or left-click the loaded calibrant image when not zooming/panning).

To draw a polygon mask

Set Mode: to Polygon. Use Mask to add masked regions or Unmask to clear masking inside the polygon. Click vertices → double-click to finish. Undo / clear as needed.

To draw a rectangular mask

Set Mode: to Rectangular, choose Mask or Unmask, then two clicks for corners.

To draw a pixel mask

Set Mode: to Pixel → click pixels to toggle (red = masked).

To threshold by intensity

Set Mode: to Threshold. Drag the histogram handles to choose the keep band in log(1+I) for non-negative pixels. Everything outside the band is masked — including raw I < 0 (intensities are never shifted). Double-click the histogram to reset to [0, max], then Apply threshold.

To save the mask

Confirm Mask path → Save mask → wizard commits the file and updates the left Mask panel and calibration form.

Highlight Save mask