-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert cyrostream to ophyd-async (#713)
* Convert cryostream to ophyd_async * Turn off code cov for pytest in vscode as it affects stops the debugger working * Improve the message printing for dodal connect * Fix merge error
- Loading branch information
1 parent
394eaf7
commit 32ff239
Showing
10 changed files
with
55 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,21 @@ | ||
from ophyd import Component as Cpt | ||
from ophyd import Device, EpicsSignal, EpicsSignalRO | ||
from enum import Enum | ||
|
||
from ophyd_async.core import StandardReadable | ||
from ophyd_async.epics.signal import epics_signal_r, epics_signal_rw | ||
|
||
class Cryo(Device): | ||
course = Cpt(EpicsSignal, "-EA-CJET-01:COARSE:CTRL") | ||
fine = Cpt(EpicsSignal, "-EA-CJET-01:FINE:CTRL") | ||
temp = Cpt(EpicsSignalRO, "-EA-CSTRM-01:TEMP") | ||
backpress = Cpt(EpicsSignalRO, "-EA-CSTRM-01:BACKPRESS") | ||
|
||
class InOut(str, Enum): | ||
IN = "In" | ||
OUT = "Out" | ||
|
||
|
||
class CryoStream(StandardReadable): | ||
def __init__(self, prefix: str, name: str = ""): | ||
self.course = epics_signal_rw(InOut, f"{prefix}-EA-CJET-01:COARSE:CTRL") | ||
self.fine = epics_signal_rw(InOut, f"{prefix}-EA-CJET-01:FINE:CTRL") | ||
self.temperature_k = epics_signal_r(float, f"{prefix}-EA-CSTRM-01:TEMP") | ||
self.back_pressure_bar = epics_signal_r( | ||
float, f"{prefix}-EA-CSTRM-01:BACKPRESS" | ||
) | ||
|
||
super().__init__(name) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters