Repository navigation
Add move_slits plan and a Slits tab in the GUI - #115
Merged
Anthony Sligar (sligara7) merged 2 commits intoOct 27, 2026
Merged
Conversation
Moves a slit pair by its center line and gap, as the slits are usually moved: only the values given move, a center move keeps the gap, a gap move is symmetric about the center, and relative=True shifts from the current positions. Gaps move before centers since both drive the same blades. Relative moves read the blade readbacks: bps.rd on the derived gap/center signals raises TypeError (readbacks are not locatable). Assisted-by: copilot:claude-opus-5-5
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The motion sequencing, exports, GUI integration, and regression coverage have no identified blocking issues.
No open issues 🎉
What changed in this PR
Adds a move_slits plan and a Slits GUI tab, making center and gap adjustments available through the existing plan interface.
Changes:
- Supports selective absolute or relative adjustments, moving gaps before centers.
- Exports the plan and adds it to the GUI.
- Adds motion, GUI-field, and namespace tests, plus CLI documentation.
| File | Description |
|---|---|
tests/test_profile_namespace.py |
Checks that move_slits is exposed in the profile namespace. |
tests/photon_delivery_system/test_slits.py |
Tests selective moves, sequencing, relative moves, and missing input. |
tests/gui/test_plan_widget_slits.py |
Checks device selection and scalar fields in the Slits form. |
src/hextools/photon_delivery_system/slits.py |
Implements the move_slits plan. |
src/hextools/photon_delivery_system/__init__.py |
Exports move_slits publicly. |
src/hextools/gui/__main__.py |
Adds the Slits plan tab. |
docs/profile.md |
Lists the newly available plan. |
docs/cli.md |
Adds slit movement examples. |
Review effort: Balanced
The derived gap/center signals took the motors' user_readback signals as raw inputs. A derived signal is only locatable when its raw inputs are, and readback signals are not, so bps.rd and bps.mvr raised TypeError on them. With the Motor devices as raw inputs they locate (the transform still receives readback values), and move_slits uses bps.mv / bps.mvr instead of recomputing the kinematics (Jakub, NSLS2#115). New test pins bps.rd and bps.mvr on every slit axis; observed failing before the fix. Assisted-by: copilot:claude-opus-5-5
Anthony Sligar (sligara7)
added a commit
to sligara7/hextools
that referenced
this pull request
Oct 27, 2026
# Conflicts: # docs/profile.md # src/hextools/gui/__main__.py # tests/test_profile_namespace.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
move_slits(slits, horizontal_center, vertical_center, horizontal_gap, vertical_gap, relative=False)and a Slits tab next to Motors in the GUI.relative=Trueusesbps.mvr. Gaps move before centers, because both drive the same blades.Slitsgap/center signals.Root cause behind Jakub's review comment:
Slitsbuilt its derived gap/center signals from each motor'suser_readback.bps.rdandbps.mvrraisedTypeError, which is why the first version read the blades by hand.Motordevices, which ophyd-async supports by design; the transform still receives readback values.test_slits_gap_and_center_work_with_locating_plan_stubs, pinsbps.rd/bps.mvron both axes. I observed it fail before the fix.bps.mvrmoves relative to the motors' setpoints, as for any motor.Verification: mock tests only; not run on the beamline.
move_slits: absolute, relative and gap-before-center moves, and an empty call refused. The existing slit kinematics and watcher tests still pass.relativecheckbox.move_slitsis in the profile namespace.tyadds no diagnostics.test_detector_viewer_axes, also fails onmainin my dev env (older ntnda-qt-viewer than the lock).