feat(bec_widgets): mirror the single-point acquisition-method warning in the GUI
Adds a wrapped, styled warning label under "Random shift max" in the params panel, shown whenever "Single-point scan" is checked and hidden otherwise -- same reminder tomo_parameters() now prints on the CLI side: use tomo_acquire_at_angle(angle), not tomo_scan_projection(angle), when single-point mode is on. Toggled from the existing _on_single_point_changed() handler, so it updates on both a live edit and every params-panel refresh (the widget's checkbox state already drives this handler either way). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -386,6 +386,16 @@ class TomoParamsWidget(BECWidget, QWidget):
|
||||
max_=10.0,
|
||||
decimals=3,
|
||||
)
|
||||
self._lbl_single_point_hook_warning = QLabel(
|
||||
"With single-point mode on, acquire a single projection (including inside "
|
||||
"a custom at_each_angle hook) with tomo_acquire_at_angle(angle), not "
|
||||
"tomo_scan_projection(angle) -- the latter always runs a full Fermat scan "
|
||||
"regardless of this setting."
|
||||
)
|
||||
self._lbl_single_point_hook_warning.setWordWrap(True)
|
||||
self._lbl_single_point_hook_warning.setStyleSheet("color: #B8860B;")
|
||||
self._lbl_single_point_hook_warning.setVisible(False)
|
||||
common_form.addRow("", self._lbl_single_point_hook_warning)
|
||||
self._pw["at_each_angle_hook"] = QComboBox()
|
||||
self._pw["at_each_angle_hook"].setEnabled(False)
|
||||
self._pw["at_each_angle_hook"].setToolTip(
|
||||
@@ -731,6 +741,9 @@ class TomoParamsWidget(BECWidget, QWidget):
|
||||
self._pw["stitch_y"].setEnabled(self._edit_mode and not checked)
|
||||
# random shift only applies to single-point acquisitions
|
||||
self._pw["single_point_random_shift_max"].setEnabled(self._edit_mode and checked)
|
||||
# informational, not an editable field -- shown whenever single-point
|
||||
# is on, in or out of edit mode, mirroring tomo_parameters()'s CLI note
|
||||
self._lbl_single_point_hook_warning.setVisible(checked)
|
||||
|
||||
def _on_poll(self) -> None:
|
||||
"""Periodic refresh: params (guarded against edit mode) + sample name."""
|
||||
|
||||
Reference in New Issue
Block a user