Skip to content

Implement EPICS-backed Polynomial ID Device for I06#2016

Merged
Relm-Arrowny merged 56 commits into
mainfrom
2003-add-apple2-energy-device-to-i06
May 14, 2026
Merged

Implement EPICS-backed Polynomial ID Device for I06#2016
Relm-Arrowny merged 56 commits into
mainfrom
2003-add-apple2-energy-device-to-i06

Conversation

@Relm-Arrowny
Copy link
Copy Markdown
Contributor

@Relm-Arrowny Relm-Arrowny commented Apr 17, 2026

Fixes #2003

  • Introduced I06EpicsPolynomialDevice to construct EnergyMotorLookup tables dynamically from EPICS PVs.
  • Added an optional inverse EnergyMotorConverter to Apple2Controller for bidirectional gap/energy calculations.
  • Renamed EnergyMotorConverter parameters from energy to value to better support generic bidirectional conversions (e.g., Motor ↔ Energy).

Instructions to reviewer on how to test:

  1. Do thing x
  2. Confirm thing y happens

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}

@Relm-Arrowny Relm-Arrowny linked an issue Apr 17, 2026 that may be closed by this pull request
7 tasks
Copy link
Copy Markdown
Contributor

@oliwenmandiamond oliwenmandiamond left a comment

Choose a reason for hiding this comment

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

This looks good. Just think the variable name needs to be changed + need to add the config

Comment thread src/dodal/devices/insertion_device/apple2_controller.py Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.13%. Comparing base (dfd1705) to head (5d4e583).

Additional details and impacted files
@@           Coverage Diff            @@
##             main    #2016    +/-   ##
========================================
  Coverage   99.12%   99.13%            
========================================
  Files         331      333     +2     
  Lines       12913    13021   +108     
========================================
+ Hits        12800    12908   +108     
  Misses        113      113            

☔ View full report in Codecov by Sentry.
📢 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.

@Relm-Arrowny Relm-Arrowny marked this pull request as ready for review April 23, 2026 16:15
@Relm-Arrowny Relm-Arrowny requested a review from a team as a code owner April 23, 2026 16:15
Copy link
Copy Markdown
Contributor

@oliwenmandiamond oliwenmandiamond left a comment

Choose a reason for hiding this comment

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

Thanks, is a good first start but I think the design needs a bit more work. Please see my comments

Comment thread src/dodal/devices/beamlines/i06_shared/i06_apple2_controller.py Outdated
Comment thread src/dodal/devices/beamlines/i06_shared/i06_apple2_controller.py
Comment thread src/dodal/beamlines/i06_shared.py Outdated
Comment thread src/dodal/beamlines/i06_shared.py Outdated
Comment thread src/dodal/devices/beamlines/i06_shared/i06_epics_lookup.py
Comment thread src/dodal/devices/insertion_device/apple2_controller.py Outdated
Copy link
Copy Markdown
Contributor

@oliwenmandiamond oliwenmandiamond left a comment

Choose a reason for hiding this comment

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

Thanks, I think this looks much better. Couple comments to help refine it and some questions I have

Comment thread src/dodal/beamlines/i06_shared.py Outdated
Comment thread src/dodal/beamlines/i06_shared.py Outdated
Comment thread src/dodal/devices/beamlines/i06_shared/i06_epics_lookup.py Outdated
Comment thread src/dodal/devices/insertion_device/apple2_controller.py
Comment thread src/dodal/devices/insertion_device/apple2_controller.py Outdated
Comment thread src/dodal/devices/insertion_device/energy_motor_lookup.py
Comment thread src/dodal/beamlines/i06_shared.py Outdated
Comment thread src/dodal/beamlines/i06_shared.py Outdated
Copy link
Copy Markdown
Contributor

@oliwenmandiamond oliwenmandiamond left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@Relm-Arrowny Relm-Arrowny merged commit c3e106f into main May 14, 2026
19 of 20 checks passed
@Relm-Arrowny Relm-Arrowny deleted the 2003-add-apple2-energy-device-to-i06 branch May 14, 2026 08:03
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.

Add apple2 energy device to i06

2 participants