示例#1
0
 def test_configure_devices(self):
     _configure_devices(self._glbl)
     # confirm synthetic objects are attached to glbl class
     assert self._glbl.area_det.name == 'pe1c'
     assert self._glbl.temp_controller.name == 'cs700'
     assert self._glbl.shutter.name == 'shctl1'
示例#2
0
import os
from xpdacq.glbl import glbl
from xpdacq.beamtime import *
from xpdacq.utils import import_sample_info
from xpdacq.beamtimeSetup import (start_xpdacq, _start_beamtime,
                                  _end_beamtime, _load_glbl,
                                  _configure_devices)

# configure experiment device being used in current version
if glbl._is_simulation:
    _configure_devices(glbl)
else:
    # at beamline
    _configure_devices(glbl, area_det=pe1c, shutter=shctl1,
                       temp_controller=cs700, db=db)

# beamtime reload happen in xpdacq
from xpdacq.xpdacq import *

# instantiate xrun without beamtime, like bluesky setup
xrun = CustomizedRunEngine(None)
xrun.md['owner'] = glbl.owner
xrun.md['beamline_id'] = glbl.beamline_id
xrun.md['group'] = glbl.group

# load beamtime
bt = start_xpdacq()
if bt is not None:
    print("INFO: Reload beamtime objects:\n{}\n".format(bt))
    xrun.beamtime = bt