Skip to content

Add i06-1 magnets - #2115

Open
oliwenmandiamond wants to merge 60 commits into
mainfrom
add_i06_magnets
Open

Add i06-1 magnets#2115
oliwenmandiamond wants to merge 60 commits into
mainfrom
add_i06_magnets

Conversation

@oliwenmandiamond

@oliwenmandiamond oliwenmandiamond commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Fixes #2120

Instructions to reviewer on how to test:

  1. Check implementations make sense
  2. Check tests coverage is sufficient
  3. Check doc strings for devices make sense
  4. Check dodal connect i06-1

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}

@oliwenmandiamond oliwenmandiamond changed the title Add i06 magnets Add i06-1 magnets Jul 9, 2026
@codecov

codecov Bot commented Jul 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.18%. Comparing base (3b77d81) to head (70175a5).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2115      +/-   ##
==========================================
+ Coverage   99.16%   99.18%   +0.02%     
==========================================
  Files         354      360       +6     
  Lines       13842    14221     +379     
==========================================
+ Hits        13726    14105     +379     
  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.

@Relm-Arrowny Relm-Arrowny 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.

I gone through it roughly, I have a few questions

Comment thread src/dodal/beamlines/i06_1.py Outdated
Comment thread src/dodal/beamlines/i06_1.py Outdated
Comment thread src/dodal/devices/beamlines/i06_1/magnets/ramp_controller.py
Comment thread src/dodal/devices/beamlines/i06_1/magnets/ramp_controller.py
Comment thread src/dodal/devices/beamlines/i06_1/magnets/ramp_controller.py
Comment thread src/dodal/devices/beamlines/i06_1/magnets/superconducting_magnet.py
Comment thread src/dodal/devices/beamlines/i06_1/magnets/superconducting_magnet.py Outdated
Comment thread src/dodal/devices/beamlines/i06_1/magnets/superconducting_magnet.py Outdated
Comment thread src/dodal/devices/beamlines/i06_1/magnets/superconducting_magnet.py Outdated
Comment thread src/dodal/devices/beamlines/i06_1/magnets/superconducting_magnet.py Outdated
@Relm-Arrowny Relm-Arrowny self-assigned this Jul 20, 2026
Comment thread src/dodal/devices/beamlines/i06_1/magnets/movement.py Outdated

@Relm-Arrowny Relm-Arrowny 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.

Overall this is looking super solid—I just have one question regarding moving StandardMovable to the controller level, along with a couple of small edge-case notes.

y: float
z: float

def to_spherical(self) -> "MagnetSphericalPosition":

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.

We could make use of annotations here in line with everything else:

Suggested change
def to_spherical(self) -> "MagnetSphericalPosition":
def to_spherical(self) -> MagnetSphericalPosition:

with

from __future__ import annotations

Comment thread src/dodal/devices/beamlines/i06_1/magnets/movement.py Outdated
Comment thread src/dodal/devices/beamlines/i06_1/magnets/movement.py Outdated
Comment on lines +81 to +87
for axis, old, new in decreases:
if abs(new) < abs(old):
kwargs = {axis: new}
steps.append(MagnetStep(**kwargs))

if any(abs(new) > abs(old) for _, old, new in decreases):
steps.append(MagnetStep(x=target.x, y=target.y, z=target.z))

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.

We are still moving all the axis to negative one by one first, I thank we could at least move all negative in one step?
It is worth checking if we actually need to move one by one in negative direction, I think the idea of sphere mode with lower vector limit is to allow async the movement and speed for all 3 axis so that we can keep the field direction.
We can probably make it in a new issue as spherical is actually out of scope,

Comment thread src/dodal/devices/beamlines/i06_1/magnets/movement.py Outdated
Comment thread src/dodal/devices/beamlines/i06_1/magnets/superconducting_magnet.py Outdated
Comment thread src/dodal/devices/beamlines/i06_1/magnets/superconducting_magnet.py Outdated
Comment thread src/dodal/devices/beamlines/i06_1/magnets/superconducting_magnet.py Outdated
Comment thread src/dodal/devices/beamlines/i06_1/magnets/superconducting_magnet.py
Comment thread src/dodal/devices/beamlines/i06_1/magnets/superconducting_magnet.py
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.

Create i06 vector magnet device in dodal

3 participants