Skip to content

[ESSSANS] Masking (Loki, partially Skadi) #767

Description

@SimonHeybrock

What

  • We need differents kinds of masks
  • Some masks are static and pre-defined by instrument scientists, other are dependent on the sample-environement or instrument setup in general (but also defined by instrument scientist, for the user).
  • Static masks need to be available in SciCat outside user proposal
  • Dynamic masks will also need to be saved on SciCat, inside the user proposal

Kinds of masks

The following is specific for Loki, some of this would apply also to Skadi:

1. Beam stop

  • There is a set of beam stops in use, will pick one of them for a run
  • Beam stop has motion, is placed near beam center
  • Us projection through detector from sample to define mask for everying shaded
  • May need to extend mask due to parasitic scattering, etc., but might be better to use an additional mask for that.

2. Detector screening

Rear (or mid window-frame detectors) are in the "shade" of the front/mid window-frame detectors. Those regions must be masked. Can probably be static after hot-commissioning. Shapes are quite complicated so it is not clear if a simple geometric approximation can be done, or whether it would need to be drawn and defined by hand. Should this be based on a simulation, like the following:

Image

Note:

  • This might depend on the sample position (per-experiment)
  • The mask on the rear bank would depend on the carriage position, but it looks like the masks for this bank is quite simple (inner edges from mid detectors?) so a geometric definition based on sample and detector positions might be feasible.

3. Broken straws or tubes

  • Will be permanent (until tubes fixes, i.e., need mechanism to timestamp and replace mask files)
  • A simple tool to do this is needed interactively.
  • Simple conditions like "tubes with 0 counts" are not adequate, defects can show up in various ways, e.g., counts lumped together on one end, etc.

Suggestion:

  • Use existing LokiBankViewer an extend it.
  • Two modes, tube-mode and straw-mode
  • Clicking a row (maybe with a special tool to be activated) toggles masking it -- depending on the mode the row corresponds to toggling the masking of a tube or a straw.
  • Output should be a tube-mask and a straw-mask. We should assume these are applied after folding of the detectors, i.e., these can be small lower-dimensional masks, not for every pixel.

4. Other

  • Some sample envs may not allow for full scattering angle, so we might need to mask everything above, say, 20 deg.

Activity

  1. self-assigned this
    on Oct 1, 2026
  2. olihammond commented on Oct 2, 2026

    @olihammond

    This came up earlier when coordinating for SKADI– it was noted that the detector motion will be inverted as compared to LoKI, whereby the smallest-angle bank is fixed, and the others have (x, y, z) motion. They will not move during measurements, and there are plans to have standard configurations where there is minimal, or no, occlusion. Nevertheless, there are more opportunities to cause scenarios where you would need this masking implementation to be portable, as noted by @nvaytet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions