Added I23ZoomController to account for the differing PV names#2097
Added I23ZoomController to account for the differing PV names#2097adaudon wants to merge 4 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2097 +/- ##
========================================
Coverage 99.15% 99.16%
========================================
Files 345 347 +2
Lines 13472 13590 +118
========================================
+ Hits 13358 13476 +118
Misses 114 114 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
DominicOram
left a comment
There was a problem hiding this comment.
Thanks, I think that rather than make a new device it might be better to just change the ZoomController so you can specify the suffix for the percentage/level. That's what we've done in other places where they have been different. I would also suggest you ask controls to make an alias for CAM:MP:SELECT -> ZOOM:MP:SELECT, we can then reuse the device with no changes
That's fair, the initial idea was to minimise changes of common dodal files until I23 could discuss whether they wanted to change their PVs to match other beamlines or to keep it as is. But if it's better longterm then it'd be better to change the ZoomController instead. |
|
Zoom isn't required for optical centering so I23ZoomController was replaced with NullZoomController for now so I23 can decide how they want to proceed with xray centering while having access to optical centering for testing. |
5072edd to
03c9405
Compare
DominicOram
left a comment
There was a problem hiding this comment.
Thanks, one comment in code that I think you need to sort out before merging. Additionally, I think you can do it slightly cleaner by doing something a bit like b25d7f0. The advantages are:
- You don't need to pass the different prefixes around
- You don't have the if statement (which I think had a bug where if people specified a level_prefix but not a percentage_prefix you would not use it.
In general, I think asking controls to alias these is a good idea, particularly if they can add the level enum at the same time.
| prefix=f"{PREFIX.beamline_prefix}-DI-OAV-01:", | ||
| config=OAVConfigBeamCentre(ZOOM_PARAMS_FILE, DISPLAY_CONFIG, config_client), | ||
| percentage_prefix=f"{PREFIX.beamline_prefix}-DI-OAV-01:ZOOM:", | ||
| level_prefix=f"{PREFIX.beamline_prefix}-DI-OAV-01:CAM:", |
There was a problem hiding this comment.
Must: As previously discussed, I don't think this is selecting the zoom level, I think it selects which backlight to use. I think you need to discuss with @JamesOHeaDLS about adding a zoom level enum to i23 like other MX beamlines if you want to use this.
Other mx-beamlines use a different PV name for zoom. Created a ZoomController specific to I23.
Fixes DiamondLightSource/mx-bluesky#1771
Instructions to reviewer on how to test:
Checks for reviewer
dodal connect ${BEAMLINE}