-
Notifications
You must be signed in to change notification settings - Fork 2
/
play.py
36 lines (23 loc) · 863 Bytes
/
play.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import bluesky
import wright_plans
import yaqc_bluesky
from bluesky import plans as bsp
from bluesky.callbacks.best_effort import BestEffortCallback
from wright_plans._constants import Constant, ConstantTerm
from wright_plans.attune import motortune, run_tune_test
from wright_plans._messages import register_set_except
#from bluesky_autonomic import OPADevice
import databroker
cat = databroker.catalog["mongo"]
bec = BestEffortCallback()
d1 = yaqc_bluesky.Device(38401)
d2 = yaqc_bluesky.Device(38402)
d0 = yaqc_bluesky.Device(38500)
wm = yaqc_bluesky.Device(39876)
daq = yaqc_bluesky.Device(38999)
opa = yaqc_bluesky.Device(39301)
RE = bluesky.RunEngine({})
RE.subscribe(bec)
RE.subscribe(cat.v1.insert)
register_set_except(RE)
RE(run_tune_test([daq], opa, spectrometer={"device": wm, "method": "scan", "units": "wn", "width": -250, "npts": 11}))