Add i06-1 magnets - #2115
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
…/dodal into add_i06_magnets
Relm-Arrowny
left a comment
There was a problem hiding this comment.
I gone through it roughly, I have a few questions
Relm-Arrowny
left a comment
There was a problem hiding this comment.
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": |
There was a problem hiding this comment.
We could make use of annotations here in line with everything else:
| def to_spherical(self) -> "MagnetSphericalPosition": | |
| def to_spherical(self) -> MagnetSphericalPosition: |
with
from __future__ import annotations| 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)) |
There was a problem hiding this comment.
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,
Co-authored-by: Raymond Fan <raymond.fan@diamond.ac.uk>
Co-authored-by: Raymond Fan <raymond.fan@diamond.ac.uk>
Co-authored-by: Raymond Fan <raymond.fan@diamond.ac.uk>
…/dodal into add_i06_magnets
Fixes #2120
Instructions to reviewer on how to test:
dodal connect i06-1Checks for reviewer
dodal connect ${BEAMLINE}