Skip to content

Commit 7f2d3e3

Browse files
rtuck99jacob720DominicOram
authored
Add cryostream gantry device (#1664)
* Add cryostream_gantry device * Add selection PVs to cryostream gantry --------- Co-authored-by: Jacob Williamson <[email protected]> Co-authored-by: Dominic Oram <[email protected]>
1 parent e946940 commit 7f2d3e3

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed

src/dodal/beamlines/i03.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
from dodal.devices.backlight import Backlight
2222
from dodal.devices.baton import Baton
2323
from dodal.devices.collimation_table import CollimationTable
24-
from dodal.devices.cryostream import CryoStream
24+
from dodal.devices.cryostream import CryoStream, CryoStreamGantry
2525
from dodal.devices.detector.detector_motion import DetectorMotion
2626
from dodal.devices.diamond_filter import DiamondFilter, I03Filters
2727
from dodal.devices.eiger import EigerDetector
@@ -396,6 +396,14 @@ def cryostream() -> CryoStream:
396396
return CryoStream(PREFIX.beamline_prefix)
397397

398398

399+
@device_factory()
400+
def cryostream_gantry() -> CryoStreamGantry:
401+
"""Get the i03 cryostream gantry device, instantiate it if it hasn't already been.
402+
If this is called when already instantiated in i03, it will return the existing object.
403+
"""
404+
return CryoStreamGantry(PREFIX.beamline_prefix)
405+
406+
399407
@device_factory()
400408
def diamond_filter() -> DiamondFilter[I03Filters]:
401409
"""Get the i03 diamond filter device, instantiate it if it hasn't already been.

src/dodal/devices/cryostream.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ class TurboEnum(StrictEnum):
3232
AUTO = "Auto"
3333

3434

35+
class CryoStreamSelection(StrictEnum):
36+
CRYOJET = "CryoJet"
37+
HC1 = "HC1"
38+
39+
3540
class OxfordCryoStreamController(StandardReadable):
3641
def __init__(self, prefix: str, name: str = ""):
3742
with self.add_children_as_readables(StandardReadableFormat.CONFIG_SIGNAL):
@@ -107,3 +112,19 @@ def __init__(self, prefix: str, name=""):
107112
self.status = OxfordCryoStreamStatus(prefix=prefix)
108113

109114
super().__init__(name)
115+
116+
117+
class CryoStreamGantry(StandardReadable):
118+
def __init__(self, prefix: str, name: str = ""):
119+
with self.add_children_as_readables(StandardReadableFormat.CONFIG_SIGNAL):
120+
self.cryostream_selector = epics_signal_r(
121+
CryoStreamSelection, f"{prefix}-EA-GANT-01:CTRL"
122+
)
123+
self.hc1_selected = epics_signal_r(
124+
int, f"{prefix}-MO-STEP-02:GPIO_INP_BITS.B2"
125+
)
126+
self.cryostream_selected = epics_signal_r(
127+
int, f"{prefix}-MO-STEP-02:GPIO_INP_BITS.B3"
128+
)
129+
130+
super().__init__(name)

0 commit comments

Comments
 (0)