From 887d9e599e9e7727ba0b84159bd29dde83034b59 Mon Sep 17 00:00:00 2001 From: prjemian Date: Mon, 18 Jun 2018 11:43:18 -0500 Subject: [PATCH] fixes #38 --- APS_BlueSky_tools/devices.py | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/APS_BlueSky_tools/devices.py b/APS_BlueSky_tools/devices.py index e8e535dfd..654685114 100644 --- a/APS_BlueSky_tools/devices.py +++ b/APS_BlueSky_tools/devices.py @@ -46,8 +46,8 @@ import threading import time from .synApps_ophyd import * -from ophyd import Component, Device, DeviceStatus -from ophyd import Signal, EpicsMotor, EpicsSignal +from ophyd import Component, Device, DeviceStatus, FormattedComponent +from ophyd import Signal, EpicsMotor, EpicsSignal, EpicsSignalRO from bluesky.plan_stubs import mv, mvr, abs_set, wait @@ -85,12 +85,18 @@ class ApsMachineParametersDevice(Device): APS = APS_Machine_Parameters_Device(name="APS") aps_current = APS.current - # make sure these values are logged by every scan - # relies on this global setup: - # from bluesky import SupplementalData - # sd = SupplementalData() - # RE.preprocessors.append(sd) + # make sure these values are logged at start and stop of every scan sd.baseline.append(APS) + # record storage ring current as secondary stream during scans + # name: aps_current_monitor + # db[-1].table("aps_current_monitor") + sd.monitors.append(aps_current) + + The `sd.baseline` and `sd.monitors` usage relies on this global setup: + + from bluesky import SupplementalData + sd = SupplementalData() + RE.preprocessors.append(sd) """ current = Component(EpicsSignalRO, "S:SRcurrentAI")