Skip to content

Commit

Permalink
adding the pretty string dunder methods to TwoButtonShutter
Browse files Browse the repository at this point in the history
  • Loading branch information
awalter-bnl committed Jul 25, 2024
1 parent e6c7edb commit 3975b39
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
Binary file modified src/ari_sxn_common/__pycache__/ari_ophyd.cpython-312.pyc
Binary file not shown.
Binary file modified src/ari_sxn_common/__pycache__/common_ophyd.cpython-312.pyc
Binary file not shown.
7 changes: 4 additions & 3 deletions src/ari_sxn_common/ari_ophyd.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
from common_ophyd import (BaffleSlit, Diagnostic, DeviceWithLocations,
ID29EpicsMotor, ID29EpicsSignalRO)
ID29EpicsMotor, ID29EpicsSignalRO,
ID29TwoButtonShutter)
from ophyd import Component
from nslsii.devices import TwoButtonShutter



class M1(DeviceWithLocations):
Expand Down Expand Up @@ -84,7 +85,7 @@ def __init__(self, *args, **kwargs):
labels=('detector',))
ip = Component(ID29EpicsSignalRO, "ip", name='ip', kind='config',
labels=('detector',))
gv = Component(TwoButtonShutter, "gv:", name='gv', kind='config',
gv = Component(ID29TwoButtonShutter, "gv:", name='gv', kind='config',
labels=('position',))


Expand Down
8 changes: 8 additions & 0 deletions src/ari_sxn_common/common_ophyd.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from collections import defaultdict
from nslsii.devices import TwoButtonShutter
from ophyd import (Component, Device, EpicsMotor)
from ophyd.areadetector.base import ADComponent
from ophyd.areadetector.cam import ProsilicaDetectorCam
Expand Down Expand Up @@ -257,6 +258,13 @@ def __init__(self, *args, **kwargs):
device.kind = 'omitted' # set signal to 'omitted'.


class ID29TwoButtonShutter(PrettyStrForSignal, TwoButtonShutter):
"""
An nslsii.devices.TwoButtonShutter class that adds the `__str__` and
`__dir__` methods from PrettyStrForSignal
"""


class Prosilica(PrettyStrForSignal, SingleTrigger, ProsilicaDetector):
"""
Adds the `cam1.array_data` attribute required when not image saving.
Expand Down

0 comments on commit 3975b39

Please sign in to comment.