diff --git a/docs/source/upcoming_release_notes/1309-PCDSAreaDetectorTyphos_camviewer_rate.rst b/docs/source/upcoming_release_notes/1309-PCDSAreaDetectorTyphos_camviewer_rate.rst new file mode 100644 index 00000000000..160d1041096 --- /dev/null +++ b/docs/source/upcoming_release_notes/1309-PCDSAreaDetectorTyphos_camviewer_rate.rst @@ -0,0 +1,32 @@ +1309 PCDSAreaDetectorTyphos_camviewer_rate +################# + +API Breaks +---------- +- N/A + +Library Features +---------------- +- N/A + +Device Features +--------------- +- Added rate signal to PCDSAreaDetectorTyphos +- Value is passed in open_viewer to open camViewer with the selected rate +- Default is five, but can be changed from gui with a TyphosSlider + +New Devices +----------- +- N/A + +Bugfixes +-------- +- N/A + +Maintenance +----------- +- N/A + +Contributors +------------ +- KaushikMalapati diff --git a/pcdsdevices/areadetector/detectors.py b/pcdsdevices/areadetector/detectors.py index e37fb97a633..e25fa5c42c9 100644 --- a/pcdsdevices/areadetector/detectors.py +++ b/pcdsdevices/areadetector/detectors.py @@ -16,7 +16,7 @@ from ophyd.areadetector.trigger_mixins import SingleTrigger from ophyd.device import Component as Cpt from ophyd.ophydobj import OphydObject -from ophyd.signal import AttributeSignal, EpicsSignal, EpicsSignalRO +from ophyd.signal import AttributeSignal, EpicsSignal, EpicsSignalRO, Signal from pcdsutils.ext_scripts import get_hutch_name from pcdsdevices.variety import set_metadata @@ -399,7 +399,9 @@ def open_viewer(self): '--instrument', '{}.format(get_hutch_name())', '--oneline', - 'GE:16,{0}:IMAGE1;{0},,{0}'.format(self.prefix[0:-1])] + 'GE:16,{0}:IMAGE1;{0},,{0}'.format(self.prefix[0:-1]), + '--rate', + str(self.viewer_rate.get()),] self.log.info('Opening python viewer for camera...') subprocess.run(arglist, stdout=subprocess.DEVNULL, @@ -408,6 +410,9 @@ def open_viewer(self): # Make viewer available in Typhos screen cam_viewer = Cpt(AttributeSignal, attr='_open_screen', kind='normal') set_metadata(cam_viewer, dict(variety='command-proc', value=1)) + viewer_rate = Cpt(Signal, value=5, kind='normal', doc='Rate for camViewer') + set_metadata(viewer_rate, dict(variety='scalar-range', + range={'value': (0, 100), 'source': 'value'})) @property def _open_screen(self):