Example #1
0
def test_process():
    rs = insert_run_start(time=ttime.time(), scan_id=105, owner="stepper", beamline_id="example", uid=str(uuid.uuid4()))
    step_scan.run(run_start_uid=rs)
    c = count()

    def f(name, doc):
        next(c)

    process(db[rs], f)
    assert next(c) == len(list(restream(db[rs])))
def run(motor, x, start, stop, num_steps, loops, *, exposure=1,  **metadata):
    print('moving %s to initial position' % motor.name)
    subs = [LiveTable(['pe1_stats1_total', motor.name]),
            LivePlot('pe1_stats1_total', motor.name)]
    motor.move(x)
    pe1c.images_per_set.put(exposure // 0.1)
    dark_uid = take_dark()
    steps = loops * list(np.linspace(start, stop, num=num_steps, endpoint=True))
    plan = DeltaListScanPlan([pe1c], motor, steps)
    uid = RE(plan, subs, dark_frame=dark_uid, **metadata)
    sleep(3)
    process(db[uid], exporter)
Example #3
0
 def cb(value, **kwargs):
     return process(db[value], callback)
Example #4
0
 def cb(value, **kwargs):
     return process(db[value], callback)