fix(tomo_params): block submit/queue-add when Fermat scan is below minimum
The estimated Fermat-scan point count was only ever flagged with an orange label -- Submit and Add-to-queue would both happily accept a configuration that's guaranteed to abort when actually run. Enforce the same minimum in _validate(), shared by both actions, so it's now a hard block instead of a cosmetic warning.
This commit is contained in:
@@ -848,6 +848,13 @@ class TomoParamsWidget(BECWidget, QWidget):
|
||||
rshift = params.get("single_point_random_shift_max", 0.0)
|
||||
if not 0 <= rshift <= 10:
|
||||
return "single_point_random_shift_max must be between 0 and 10 µm"
|
||||
count, min_positions = self._profile["compute_fermat_positions"](params)
|
||||
if count < min_positions:
|
||||
return (
|
||||
f"Estimated Fermat scan points ({count}) is below the minimum of "
|
||||
f"{min_positions} required for the scan to run -- increase FOV, "
|
||||
"reduce step size, or adjust stitch/piezo range before submitting."
|
||||
)
|
||||
return None
|
||||
|
||||
# ── type visibility ───────────────────────────────────────────────────────
|
||||
@@ -911,8 +918,10 @@ class TomoParamsWidget(BECWidget, QWidget):
|
||||
edited fov/step/stitch/piezo-range fields (see
|
||||
self._profile["compute_fermat_positions"], which calls the real
|
||||
scan class's own position-generation algorithm -- not a
|
||||
reimplementation). Warning-only: flags orange below the scan
|
||||
server's own minimum, never blocks Submit/Add-to-queue."""
|
||||
reimplementation). This is just the live preview cue (flags orange
|
||||
below the scan server's own minimum); the actual minimum is
|
||||
enforced as a hard block in _validate(), shared by both
|
||||
submit_params() and add_edited_to_queue()."""
|
||||
params = {}
|
||||
for key in self._profile["fermat_position_fields"]:
|
||||
widget = self._pw.get(key)
|
||||
|
||||
Reference in New Issue
Block a user