From 6a6d2e080b492aac76c75fd225846307b74a2680 Mon Sep 17 00:00:00 2001 From: Dawn Date: Thu, 10 Sep 2026 14:42:19 +0200 Subject: [PATCH] feat: X10SA energy range 6-30 keV Pick the mono limits by BEAMLINE env via mx_beamline(): X10SA gets 6-30 keV, other beamlines keep the 4-20 placeholder until confirmed. Co-Authored-By: Claude Fable 5.1 --- src/aare/gui/panels/monochromator_panel.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/aare/gui/panels/monochromator_panel.py b/src/aare/gui/panels/monochromator_panel.py index 28f787e5..56b98f4b 100644 --- a/src/aare/gui/panels/monochromator_panel.py +++ b/src/aare/gui/panels/monochromator_panel.py @@ -1,3 +1,5 @@ +from aarecommon.config.beamline import mx_beamline +from aarecommon.models.beamline import MXBeamline from aarecommon.models.models import DAQStatusModel from PySide6.QtCore import Signal, Slot from PySide6.QtWidgets import QDoubleSpinBox, QGridLayout, QLabel, QPushButton, QWidget @@ -9,8 +11,8 @@ from aare.gui.widgets.title_label import TitleLabel # TODO: placeholder range (was an arbitrary 1-30; nothing downstream validates — # daq.change_energy forwards straight to bec) — confirm the real monochromator # limits with the Beamline Scientist. Shared by both Set Energy rows. -ENERGY_MIN_KEV = 4.0 -ENERGY_MAX_KEV = 20.0 +# X10SA mono reaches 6-30 keV; others keep the placeholder until confirmed. +ENERGY_MIN_KEV, ENERGY_MAX_KEV = (6.0, 30.0) if mx_beamline() == MXBeamline.X10SA else (4.0, 20.0) # "arrived" window for the moving->neutral transition; per-hardware knob like # MotorMoveGroup's tol (the mono never lands exactly on the setpoint) ENERGY_AT_TARGET_TOL_KEV = 0.001