[ESSSANS] LoKI beam-stop mask: NeXus information needed
Los mantenedores suelen responder en 1 día
@SimonHeybrock ya está trabajando en esto.
Desde el 3/11/2026.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
Split out of #767 (section "1. Beam stop"). This issue tracks what the LoKI NeXus files provide for computing a beam-stop mask, and what is still missing. Update the "Current file" section whenever a new file is checked.
Goal
Mask every detector pixel that is in the shadow of a beam stop, seen from the sample:
s = sample position, p = pixel position, c = beam-stop position (from depends_on chain)
# flat beam stop perpendicular to the beam:
t = (c.z - s.z) / (p.z - s.z)
hit = s + t * (p - s) # where the ray sample -> pixel crosses the beam-stop plane
masked = inside(hit - c, beam_stop_outline)
For this we need, per beam stop: its position (time-dependent, from motors) and its shape. Possibly the mask needs to be enlarged for parasitic scattering, but that is a separate concern.
Current file
Checked: coda_loki_999999_00028010.hdf (2026-11-03, ess_nexus_build_info/config_version 0.4.0, config_commit 595996a).
There are five NXbeam_stop groups, beamstop_1 to beamstop_5. Each contains only depends_on. The chain, e.g. for beamstop_1:
/entry/instrument/beamstop_1 NXbeam_stop
depends_on -> /entry/instrument/beamstop_y1/value
beamstop_y1/value NXlog translation (0,1,0) mm LOKI-DtBS1:MC-LinZ-01:Mtr.RBV
beamstop_x/value NXlog translation (1,0,0) mm LOKI-DtBS1:MC-LinY-01:Mtr.RBV
beamstop_z/value NXlog translation (0,0,1) mm LOKI-DtBS1:MC-LinX-01:Mtr.RBV
beamstop_z_stage/transformations/offset translation (0,0,1) -0.31039 m
detector_carriage/value NXlog translation (0,0,1) mm LOKI-DtCar1:MC-LinX-01:Mtr.RBV
carriage/transformations/distance translation (0,0,1) 5.05189 m
.
beamstop_<i> uses beamstop_y<i> (LinZ-0<i>), so which motor moves which beam stop is now defined. beamstop_x and beamstop_z are shared by all five.
Notes:
- EPICS motor names use the engineering convention (z up), NeXus uses the neutron-scattering convention (z along the beam, y up):
LinXmoves along the beam (NeXus z),LinYhorizontally (NeXus x),LinZvertically (NeXus y). The stream list in #767 uses EPICS names; the NeXus groups for the vertical motors arebeamstop_y1..5. - The rear bank (
loki_detector_0) and the beam stops share the stepdetector_carriage/value. The duplicated-step problem from #833 does not occur here. - scippnexus resolves the chain. With all motors at 0 (as in this file) every beam stop resolves to
(0, 0, 4.7415) m.
Missing
- Shape. No beam stop has any geometry. Earlier information (#767): one beam stop is chosen per run; most are square, possibly one is circular. Proposal: an
NXoff_geometrygroup in eachbeamstop_<i>, in the beam stop's local frame (origin = the point thedepends_onchain resolves to). If the support arm or wire blocks neutrons, it should be part of the shape (beam_center_finder.pyalready models an arm for this reason). The NXbeam_stop fieldsdescription(circular/rectangular) +sizewould be a minimal alternative, but cannot describe the arm or a non-square rectangle. - Per-beam-stop offset. All five beam stops resolve to the same point for equal motor positions. If they are mounted at different x or z, each
beamstop_<i>needs a static transformation before the motor, e.g.
If the offsets are really zero, we need confirmation.beamstop_<i>/depends_on -> beamstop_<i>/transformations/offset -> beamstop_y<i>/value -> ... - Motor zero points and directions. The chain implies: all motors at 0 means the beam-stop center is on the nominal beam axis, 0.31039 m upstream of the carriage reference point. Is that true for
LinX-01,LinY-01, and eachLinZ-0<i>? Does positiveLinZmove up (+y)? - Which beam stop is in the beam. Not needed if (1)-(3) are available: we can project all five and mask the union, which is correct if parked beam stops still shadow the rear bank. Open question: are parked beam stops outside the sample-to-detector cone, or behind shielding? NXbeam_stop also has a
statusfield (in/out) if the file producers prefer to write it.
Open questions for reduction
- Can a beam stop move during a run? If not, we can use a single position and raise if the motor readback changes.
- SKADI: not checked yet, no file available.
- Lenguaje dominante
- Python
- Estrellas
- 3
- Forks
- 6
- Merge medio
- 2 d 13 h
- PR fusionados (30 d)
- 35
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de scipp/ess
-
essreduce
Dificultad 2/5 1-3 horas Aptitud para principiantes 69/100
Los mantenedores suelen responder en 1 día
-
[ESSSPECTROSCOPY] The containers don't record the vertical axis used for the sample-table rotationAbiertoessspectroscopy
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
scipp/ess#935 · 4 comentarios ·
Los mantenedores suelen responder en 1 día
-
essspectroscopy
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
scipp/ess#932 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
essspectroscopy
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
[essreduce] A chopper with no `beam_position` is silently placed at 0°Posiblemente ocupada @TTsangSC la tomó hace 2 días. Abiertoessreduce
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
scipp/ess#923 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
Issues similares
-
Test: to_hijri() accepts datetime.datetime and uses only the date partPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertogood first issue
Dificultad 1/5 Menos de una hora Aptitud para principiantes 95/100
omarelshamy25x/shamy-hijri#63 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
polish
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
521xueweihan/HelloGitHub#4729 ·
-
[Bug]: Score parser reads parts of scientific notation as valid scoresPosiblemente ocupada @AshutoshSingh840 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
UKGovernmentBEIS/control-arena#992 ·
Los mantenedores suelen responder en 3 días
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
mvalentsev/awesome-free-ai-coding#70 ·
Los mantenedores suelen responder en 1 día