Add a device to allow i19 hutches to change the energy#2079
Add a device to allow i19 hutches to change the energy#2079noemifrisina wants to merge 7 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2079 +/- ##
=======================================
Coverage 99.14% 99.14%
=======================================
Files 343 344 +1
Lines 13317 13359 +42
=======================================
+ Hits 13203 13245 +42
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.
Great, thanks. Couple of minor things
|
|
||
|
|
||
| I19_1_COMMISSIONING_INSTR_SESSION: str = "cm40638-5" | ||
| I19_1_COMMISSIONING_INSTR_SESSION: str = "cm44168-3" |
There was a problem hiding this comment.
Should: Do we have a longer term solution to having to keep changing this? Can we make a ticket and reference it here?
There was a problem hiding this comment.
There was a ticket in blueapi to enable passing this information to it - can dig it out.
For the moment I started trying to at least half automate the change of commissioning directory in a separate branch - although apparently it could be any string and the REST call would not complain
| from dodal.devices.beamlines.i19.mirror_stripes import StripeChoice | ||
|
|
||
|
|
||
| class OutOfRangeEnergyRequestError(Exception): |
There was a problem hiding this comment.
Nit: It's probably a OutOfRangeEnergyRequestError(ValueError) but doesn't really matter
| if 5 <= energy_in_kev < 10: | ||
| stripe = Stripes.SI | ||
| elif 10 <= energy_in_kev < 20: | ||
| stripe = Stripes.RH | ||
| elif 20 <= energy_in_kev < 30: | ||
| stripe = Stripes.PT |
There was a problem hiding this comment.
Could: It would be nice if these were in a config file I think
There was a problem hiding this comment.
I think there may be one, or there used to be (with just le lower limits in though - but that's fine, they can be worked out if that's the case), will check
Create an access controlled device that i19-1 and i19-2 can use to change the energy on the beamline.
Fixes #2075
Instructions to reviewer on how to test:
dodal connect i19-{1,2}and check it worksChecks for reviewer
dodal connect ${BEAMLINE}