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