Fix: high resolution is updated when energy changes, dtz stays constant
CI / test-with-beamline-plugins (pxi_bec) (pull_request) Successful in 1m17s
CI / lint (pull_request) Successful in 42s
CI / test (3.12) (pull_request) Successful in 1m11s
CI / test (3.13) (pull_request) Successful in 1m17s
CI / test (3.14) (pull_request) Successful in 1m24s
CI / test-with-beamline-plugins (pxii_bec) (pull_request) Successful in 1m24s
CI / test-with-beamline-plugins (pxiii_bec) (pull_request) Successful in 1m35s
CI / test-with-coverage (pull_request) Successful in 1m50s
CI / coverage-analysis (pull_request) Failing after 4s
CI / lint (push) Successful in 37s
Docs build and publish / docker (push) Successful in 19s
Build and Publish / release (push) Successful in 25s
CI / test (3.12) (push) Successful in 1m18s
CI / test (3.13) (push) Successful in 1m18s
CI / test (3.14) (push) Successful in 1m20s
CI / test-with-beamline-plugins (pxi_bec) (push) Successful in 1m30s
CI / test-with-beamline-plugins (pxii_bec) (push) Successful in 1m36s
CI / test-with-beamline-plugins (pxiii_bec) (push) Successful in 1m52s
CI / test-with-coverage (push) Successful in 1m50s
CI / coverage-analysis (push) Skipped

This commit was merged in pull request #228.
This commit is contained in:
leonarski_f committed 2026-09-14 15:26:38 +02:00
1 parent c692cd048c
commit c6a558db9f
1 file changed
+10
@@ -345,6 +345,8 @@ class ScanSettingsPanel(QWidget):
# -- status -------------------------------------------------------------
@Slot(DAQStatusModel)
def update_daq_status(self, s: DAQStatusModel):
previous_energy = self._diffraction.energy_keV
self._diffraction = s.diffraction
self._beamline_state = s.state
self._ring_current = s.bl.ring_current_mA
@@ -356,6 +358,14 @@ class ScanSettingsPanel(QWidget):
self._dtz_to_res(s.bl.dtz_min), self._dtz_to_res(s.bl.dtz_max)
)
if self._diffraction.energy_keV != previous_energy:
dtz = self.dtz_enter.committed_value
resolution = self._dtz_to_res(dtz)
self.high_res_enter.set_committed_value(resolution)
if self._show_user_values and self._user_dtz is not None:
self._user_resolution = resolution
self._can_edit_params = (not s.busy) and (
s.session.session in (SessionsStateEnum.OwnedByYou, SessionsStateEnum.PendingElseToYou)
)