Repository navigation
Add set_filters plan and a Filters tab in the GUI - #116
Merged
Anthony Sligar (sligara7) merged 3 commits intoOct 28, 2026
Merged
Conversation
Sets filter 1 upstream, filter 1 downstream and filter 2 by material in one move; a filter left unset does not move. Each filter's choices (pass through plus its materials) come from filters.yml, so the GUI shows one dropdown per filter listing that filter's own materials, and the filter devices are taken from the session namespace. Assisted-by: copilot:claude-opus-5-5
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No blocking issues were identified in the plan, GUI integration, exports, or focused tests; runtime tests were not rerun.
No open issues 🎉
What changed in this PR
Adds material-based filter control through a new set_filters plan and a Filters tab in the GUI, using filters.yml as the single source of available settings.
Changes:
- Moves selected filters together while leaving unspecified filters unchanged.
- Exposes three material dropdowns and resolves filter devices from the session namespace.
- Adds plan and GUI tests, profile export coverage, and CLI documentation.
| File | Description |
|---|---|
tests/test_profile_namespace.py |
Checks that set_filters is available in the profile namespace. |
tests/photon_delivery_system/test_filters.py |
Tests configured choices, selective movement, and invalid inputs. |
tests/gui/test_plan_widget_filters.py |
Tests the three material dropdowns and absence of device pickers. |
src/hextools/photon_delivery_system/filters.py |
Implements configuration-derived settings and the set_filters plan. |
src/hextools/photon_delivery_system/__init__.py |
Exports set_filters. |
src/hextools/gui/__main__.py |
Adds the Filters tab beside Motors. |
docs/profile.md |
Lists set_filters among available plans. |
docs/cli.md |
Documents material-based filter commands. |
Review effort: Balanced
…ed slots filters.yml listed filter 1 US as 12/9/6/3 mm SiC and filter 1 DS slots 3-4 as 24/12 mm SiC (from the first filter config, 2026-08-12). The beamline's commissioning wiki (FOE Filters table) has filter 1 US = 6 mm Cu, 6 mm Al, empty, Bo-Hori. and filter 1 DS slots 3-4 = 6 mm Al, Bo-Ver.; all positions and limits already agreed. set_filters offers only slots with a material, so the empty slot is not a choice. Assisted-by: copilot:claude-opus-5-5
# Conflicts: # docs/profile.md # src/hextools/gui/__main__.py # tests/test_profile_namespace.py
Anthony Sligar (sligara7)
added a commit
to sligara7/hextools
that referenced
this pull request
Oct 28, 2026
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
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
set_filters(...)and a Filters tab next to Motors in the GUI: one dropdown each for filter 1 upstream, filter 1 downstream and filter 2.filters.yml: pass through plus its configured materials, e.g.6 mm Cuon filter 1 US,6 mm Alon filter 1 DS,1 mm Cuon filter 2. Empty slots are not offered.filters.ymlstays the single source.ensure_available), so the form only shows the three dropdowns.RE(set_filters(filter1_upstream_setting="6 mm Cu", filter2_setting="1 mm Cu")).filters.ymlmaterials updated from the 27-ID commissioning wiki ("FOE Filters" table). Before, filter 1 US was 12/9/6/3 mm SiC, and filter 1 DS slots 3–4 were 24/12 mm SiC, from the first filter config (2026-08-12). The wiki has:Every motor position and limit already matched; only the labels changed. These labels are also what
Filter.descriptionrecords in run metadata. Jakub Wlodek (@jwlodek), please confirm the wiki is current.Verification: mock tests only; not run on the beamline.
filters.ymlfor each filter.filters.ymldevices mocked.set_filtersis in the profile namespace.test_detector_viewer_axes, also fails onmainin my dev env (older ntnda-qt-viewer than the lock).tyadds no diagnostics.