Skip to content

Add front-end Slit1 aperture plan and a Slit Control tab - #117

Merged
Anthony Sligar (sligara7) merged 4 commits into
NSLS2:mainfrom
sligara7:hex-fe-slit1-aperture
Oct 28, 2026
Merged

Anthony Sligar (sligara7) merged 4 commits into
NSLS2:mainfrom
sligara7:hex-fe-slit1-aperture

Conversation

@sligara7

@sligara7 Anthony Sligar (sligara7) commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

No description provided.

FrontEndSlit device (Y axis, fixed aperture positions), set_fe_slit1_aperture plan, and a Slit Control tab with an aperture dropdown and live Y/aperture readback.

Assisted-by: copilot:claude-opus-5-5
Copilot AI balanced review requested due to automatic review settings October 27, 2026 22:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The slit wrapper must forward stop requests so motor motion can be interrupted by RunEngine controls.

1 open issue
What changed in this PR

Adds front-end Slit1 aperture selection to the beamline device model, session plans, and GUI, with live readbacks in local mode.

Changes:

  • Adds a FrontEndSlit device and plan for selecting five fixed apertures.
  • Integrates Slit1 into the collection profile and a new Slit Control tab.
  • Adds mock tests and CLI documentation.
File Description
tests/​test_profile_namespace.py Checks that the aperture plan is exported.
tests/​photon_delivery_system/​test_fe_slit.py Tests aperture mapping, readbacks, moves, and invalid inputs.
tests/​gui/​test_slit_control.py Tests the dropdown and live readbacks.
src/​hextools/​profiles/​collection.py Creates Slit1 and includes it in baseline readings.
src/​hextools/​photon_delivery_system/​fe_slit.py Defines the slit device, apertures, and movement plan.
src/​hextools/​photon_delivery_system/​__init__.py Exports the new device, enum, and plan.
src/​hextools/​gui/​slit_control.py Implements the plan form and local live readbacks.
src/​hextools/​gui/​__main__.py Registers Slit1 and adds the Slit Control tab.
docs/​profile.md Lists the new session plan.
docs/​cli.md Documents aperture-selection commands.

Review effort: Balanced

Comment thread src/hextools/photon_delivery_system/fe_slit.py
Copilot AI balanced review requested due to automatic review settings October 27, 2026 22:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

A beamline maintainer must confirm the production PV prefix against the live IOC before approving hardware-control integration.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@jwlodek

Copy link
Copy Markdown
Contributor

Anthony Sligar (@sligara7) i think we should avoid making device specific widgets like this. It's how a gui codebase can quickly balloon in complexity/size. Let's discuss how to achieve something similar without needing to make a widget specific to the device.

… readout widget

Per review: no widgets written for one device. The aperture dropdown comes from set_fe_slit1_aperture's type hint.

Assisted-by: copilot:claude-opus-5-5
@sligara7

Copy link
Copy Markdown
Contributor Author

Agreed. Reworked in c1995e8: dropped the slit-specific widget; the Slit Control tab is now just the generic plan form for set_fe_slit1_aperture. A live readout can come later through something generic.

Copilot AI balanced review requested due to automatic review settings October 28, 2026 14:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

There are no active review issues blocking the Slit1 fixed-aperture control change.

No open issues 🎉

Review effort: Balanced

Keep both: the Slit Control tab and set_fe_slit1_aperture beside the Filters tab and set_filters.

Assisted-by: copilot:claude-opus-5-5
Copilot AI balanced review requested due to automatic review settings October 28, 2026 19:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

A beamline owner needs to confirm the hard-coded PV, calibrated aperture positions, and safe motion and stopping behavior because mock tests cannot validate these hardware contracts.

No open issues 🎉

Review effort: Balanced

@sligara7
Anthony Sligar (sligara7) merged commit c1db4d1 into NSLS2:main Oct 28, 2026
6 checks passed
@sligara7
Anthony Sligar (sligara7) deleted the hex-fe-slit1-aperture branch October 28, 2026 19:37
plan_tabs = QTabWidget()
plan_tabs.addTab(QtPlanWidget(re_client, move_motor), "Motors")
plan_tabs.addTab(QtPlanWidget(re_client, move_slits), "Slits")
plan_tabs.addTab(QtPlanWidget(re_client, set_fe_slit1_aperture), "Slit Control")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd maybe use a different name, since slits vs slit control sounds kind of the same. I wonder if we could do Slits tab, with two plan widgets stacked on top of each other?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants