docs(flomni): "Compensating" -> "New" for move_foptz_with_shift's shift fields
CI for csaxs_bec / test (push) Successful in 3m15s

manual_shift_x/manual_shift_y are replaced outright by
move_foptz_with_shift (self.manual_shift_x = manual_shift_x), not adjusted
relative to the previous value -- "Compensating" wrongly implied the
latter. Wording-only change across the GUI field labels, the action's
help/docstring text, and the two AI_docs testing notes that describe them.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NPZ9gzN2rt3wgiMnTKyrug
This commit is contained in:
x01dcandClaude Sonnet 5 committed 2026-10-01 15:52:26 +02:00
1 parent 47cbb08c13
commit 91eb55bf13
3 files changed
+20 -19

No files matched your search

@@ -215,7 +215,7 @@ file is exactly how a regression sneaks in.
the step list above, formatted like `move{'positions': {'ccm_energy': 6.2}}`.
8. Switch the action dropdown to `move_foptz_with_shift`. Confirm the field
area now shows three spinboxes: **foptz target (absolute)**,
**Compensating manual_shift_x**, **Compensating manual_shift_y**. Confirm
**New manual_shift_x**, **New manual_shift_y**. Confirm
the foptz-target spinbox's range reflects `foptz`'s *live* device limits
(try typing a value past the real limit, confirm the widget clamps it
rather than accepting it -- this is the live-limit lookup, not a static
@@ -280,8 +280,8 @@ interruptible mid-scan for the crash-resume tests (§4, B5).
14. **✅ Back-compat + real dispatch, combined.**
`test_legacy_job_no_kind_defaults_to_tomo_and_command_moves_foptz`. A `kind`-less
legacy queue entry still runs as a tomogram; in the same mixed-queue run, a
command job actually moves `foptz` and sets the compensating
`manual_shift_x`/`manual_shift_y` via the real `move_foptz_with_shift` action
command job actually moves `foptz` and sets new `manual_shift_x`/
`manual_shift_y` values via the real `move_foptz_with_shift` action
path (the only sim-movable path now that `ftray` is no longer in the move
allow-list; `foptz` is also the real device this action exists for, unlike
`ftray`'s old sim-only stand-in role).
@@ -357,8 +357,8 @@ still just its design.
queue therefore never has to carry runtime values between steps; `kwargs` stays
plain JSON. The same "bundle, don't split" idea also applies to a compound action
with no runtime-dependent result but a correctness-critical pairing of writes --
`move_foptz_with_shift` (moves `foptz` + sets the compensating
`manual_shift_x`/`manual_shift_y` atomically, deliberately not reachable as two
`move_foptz_with_shift` (moves `foptz` + sets new `manual_shift_x`/
`manual_shift_y` values atomically, deliberately not reachable as two
separate steps) is the concrete example currently in the registry.
- **Publish the registry via a global var** (`tomo_queue_actions`) on `Flomni.__init__`
so the GUI builds its dropdowns/forms from it — no hardcoded mirror to drift (the
@@ -4458,9 +4458,8 @@ class Flomni(
# control for the whole endstation. ccm_energy/idgap are real front-end
# devices (bl_frontend.yaml/bl_optics_hutch.yaml, not the flomni sim
# config). foptz is deliberately NOT here -- it has its own dedicated
# "move_foptz_with_shift" action below so the compensating
# manual_shift_x/y correction can never be forgotten (see that action's
# docstring).
# "move_foptz_with_shift" action below so the new manual_shift_x/y
# correction can never be forgotten (see that action's docstring).
_TOMO_QUEUE_MOVE_DEVICES = {
"ccm_energy": {"label": "Energy", "unit": "keV"},
"idgap": {"label": "Undulator gap", "unit": "mm"},
@@ -4489,10 +4488,10 @@ class Flomni(
"func": "_queue_action_move_foptz_with_shift",
"idempotent": True, # absolute move + absolute param set, re-runs harmlessly
"help": (
"Move foptz (FZP optics-Z) to an absolute target and set the "
"compensating manual_shift_x/manual_shift_y in the same step -- "
"changing foptz shifts the aligned scan center, so this is the "
"only way to queue a foptz move."
"Move foptz (FZP optics-Z) to an absolute target and set new "
"manual_shift_x/manual_shift_y values (replacing the current "
"ones) in the same step -- changing foptz shifts the aligned "
"scan center, so this is the only way to queue a foptz move."
),
"params": {
"foptz_target": {
@@ -4516,7 +4515,7 @@ class Flomni(
"min": -10.0,
"max": 10.0,
"unit": "um",
"label": "Compensating manual_shift_x",
"label": "New manual_shift_x",
},
"manual_shift_y": {
"type": "float",
@@ -4524,7 +4523,7 @@ class Flomni(
"min": -50.0,
"max": 50.0,
"unit": "um",
"label": "Compensating manual_shift_y",
"label": "New manual_shift_y",
},
},
},
@@ -4533,14 +4532,16 @@ class Flomni(
def _queue_action_move_foptz_with_shift(
self, foptz_target: float, manual_shift_x: float, manual_shift_y: float
) -> None:
"""Move foptz and set the compensating manual_shift_x/y together.
"""Move foptz and set new manual_shift_x/y values together.
manual_shift_x/manual_shift_y are replaced outright by the values
given here, not adjusted relative to whatever they were before.
foptz changes the FZP-to-sample distance, which shifts the aligned
scan center (interferometer mirrors aren't perfectly parallel to the
beam) -- bundling the compensating shift into this one action is
deliberate: foptz is NOT in _TOMO_QUEUE_MOVE_DEVICES, so this is the
only way to queue a foptz move, precisely so the shift can't be
forgotten.
beam) -- bundling the new shift into this one action is deliberate:
foptz is NOT in _TOMO_QUEUE_MOVE_DEVICES, so this is the only way to
queue a foptz move, precisely so the shift can't be forgotten.
FUTURE: manual_shift_x/y could be auto-suggested from a calibration
proportional to the change in foptz, instead of typed in by hand --