Skip to content

Improve I19 Filter Wheel 1 Selection - #2137

Open
CoePaul wants to merge 1 commit into
mainfrom
issue2136
Open

Improve I19 Filter Wheel 1 Selection#2137
CoePaul wants to merge 1 commit into
mainfrom
issue2136

Conversation

@CoePaul

@CoePaul CoePaul commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Addresses #2136

  • Replaces brittle enumeration of I19 filter wheel one which was tightly coupled to interchangeable installed filters in favour of mapping to wheel slot locations. e.g. W1S4

  • The mapping from slot label to absorber specifics and business logic exclusions etc has to be done outside this enum no matter what form it takes

  • This change renders the labelling less brittle as old label AIR5 would have become redundant when slot 5 sees a future foil filter added.

  • Note the abuse of an enum is (temporarily at least) a necessary evil imposed by the assumptions in the design of the standard FilterWheel class

Instructions to reviewer on how to test:

  1. See if You agree with the explanation of rationale behind the change
  2. Confirm no CI tests ( nor dodal connect ) is affected ( the latter shouldn't be as the filter wheel device is skipped for now )

Checks for reviewer

  • Would the PR title make sense to a scientist on a set of release notes
  • If a new device has been added does it follow the standards
  • If changing the API for a pre-existing device, ensure that any beamlines using this device have updated their Bluesky plans accordingly
  • Have the connection tests for the relevant beamline(s) been run via dodal connect ${BEAMLINE}

Addresses #2136

* Replaces brittle enumeration of I19 filter wheel one which was
  tightly coupled to interchangeable installed filters
  in favour of mapping to wheel slot locations. e.g. W1S4

* The mapping from slot label to absorber specifics
  and business logic exclusions etc has to be done outside this
  enum no matter what form it takes

* This change renders the labelling less brittle
   as old label AIR5 would have become redundant when slot 5 sees
   a future foil filter added.

* Note the abuse of an enum is (temporarily at least) a necessary
  evil imposed by the assumptions in the design of the standard
  FilterWheel class
@CoePaul
CoePaul requested a review from a team as a code owner July 28, 2026 13:15
@CoePaul CoePaul self-assigned this Jul 28, 2026
@codecov

codecov Bot commented Jul 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.16%. Comparing base (4463efb) to head (8613d22).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2137   +/-   ##
=======================================
  Coverage   99.16%   99.16%           
=======================================
  Files         354      354           
  Lines       13832    13832           
=======================================
  Hits        13716    13716           
  Misses        116      116           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant