-
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.
Merge pull request #419 from DiamondLightSource/391_aperture_scatterg…
…uard_ophyd_async (#391) Create an ophyd-async ApertureScatterguard device
- Loading branch information
Showing
10 changed files
with
246 additions
and
210 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
from ophyd import Component, Device, EpicsSignalRO | ||
from ophyd_async.core import StandardReadable | ||
from ophyd_async.epics.motion import Motor | ||
from ophyd_async.epics.signal import epics_signal_r | ||
|
||
from dodal.devices.util.motor_utils import ExtendedEpicsMotor | ||
|
||
|
||
class Aperture(Device): | ||
x = Component(ExtendedEpicsMotor, "X") | ||
y = Component(ExtendedEpicsMotor, "Y") | ||
z = Component(ExtendedEpicsMotor, "Z") | ||
small = Component(EpicsSignalRO, "Y:SMALL_CALC") | ||
medium = Component(EpicsSignalRO, "Y:MEDIUM_CALC") | ||
large = Component(EpicsSignalRO, "Y:LARGE_CALC") | ||
class Aperture(StandardReadable): | ||
def __init__(self, prefix: str, name: str = "") -> None: | ||
self.x = Motor(prefix + "X") | ||
self.y = Motor(prefix + "Y") | ||
self.z = Motor(prefix + "Z") | ||
self.small = epics_signal_r(int, prefix + "Y:SMALL_CALC") | ||
self.medium = epics_signal_r(int, prefix + "Y:MEDIUM_CALC") | ||
self.large = epics_signal_r(int, prefix + "Y:LARGE_CALC") | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
from ophyd import Component as Cpt | ||
from ophyd import Device | ||
from ophyd_async.core import StandardReadable | ||
from ophyd_async.epics.motion import Motor | ||
|
||
from dodal.devices.util.motor_utils import ExtendedEpicsMotor | ||
|
||
class Scatterguard(StandardReadable): | ||
"""The scatterguard device.""" | ||
|
||
class Scatterguard(Device): | ||
x = Cpt(ExtendedEpicsMotor, "X") | ||
y = Cpt(ExtendedEpicsMotor, "Y") | ||
def __init__(self, prefix: str, name: str = "") -> None: | ||
self.x = Motor(prefix + "X") | ||
self.y = Motor(prefix + "Y") | ||
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
Oops, something went wrong.