Repository navigation
Add the filter bank (fb) - #9
Merged
Anthony Sligar (sligara7) merged 1 commit intoOct 23, 2026
Merged
Anthony Sligar (sligara7) merged 1 commit into
Anthony Sligar (sligara7) merged 1 commit into
Conversation
TwoButtonShutter fires Cmd:Opn-Cmd or Cmd:Cls-Cmd and waits for Pos-Sts, as nslsii.devices.TwoButtonShutter does; FilterBank holds the four filters at XF:28ID1B-OP{Fltr:1..4}. PV names and the Open=out/Close=in meaning come from pdf-profile-collection 11-motors and the cs-studio-xf OCM screen. One device, fb, replaces the old fb (open commands only) and fb_two_button_shutters/fb2.
Assisted-by: copilot:claude-opus-5-5
There was a problem hiding this comment.
🔵 Needs a closer look
Live command and readback behavior for beamline attenuation hardware remains unverified and needs human confirmation.
No open issues 🎉
What changed in this PR
Adds a four-filter bank to the PDF beamline profile, using two-button actuators with command execution and position readback.
Changes:
- Adds
TwoButtonShutterandFilterBank, supporting numeric and string targets, status-based completion, and timeouts. - Exposes the filter bank as
fbin the collection profile. - Adds mock tests for PV names, commands, readback, timeout behavior, and profile initialization.
| File | Description |
|---|---|
| tests/test_utils.py | Checks that the mock profile exposes fb. |
| tests/test_filter_bank.py | Tests filter commands, readback, validation, and timeouts. |
| src/pdftools/shutter.py | Implements two-button actuators, mock behavior, and the four-filter bank. |
| src/pdftools/profiles/collection.py | Creates fb with the beamline filter PV prefix. |
Review effort: Balanced
Anthony Sligar (sligara7)
merged commit Oct 23, 2026
d04f064
into
NSLS2:pdf-profile-conversion
4 checks passed
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
pdftools.shutter.TwoButtonShutterandFilterBank, and buildsfb(XF:28ID1B-OP{Fltr:1..4}) in the profile.Cmd:Opn-Cmd/Cmd:Cls-Cmdand waits forPos-Sts; 1/"Open"takes it out of the beam, 0/"Close"puts it in, and it reads back"Open"/"Close"(as the old profile'sread()patch did). PV names and meaning checked against the old11-motors.pyand the cs-studio-xf OCM screen.fbreplaces the oldfb(open commands only) andfb_two_button_shutters/fb2; plans usefb.flt4where they usedfb2.flt4.TwoButtonShutterre-fires up to 10 times); as in hextools'Shutter, a move that does not finish times out.Verified: mock tests (PV names, commands fired, readback, timeout, profile boots in mock mode with
fb). Not run on the beamline.