def inner(): md = { 'plan_args': {}, 'plan_name': 'execute_xia_trajectory', 'comment': comment } md.update(**metadata) yield from bp.open_run(md=md) # TODO Replace this with actual status object logic. xia1.start_mapping_scan() hhm.enable_loop.put("0") hhm.start_trajectory.put("1") ttime.sleep(3) finished = 0 while (hhm.theta.moving == True or finished == 0): finished = 0 ttime.sleep(.1) if (hhm.theta.moving == False): ttime.sleep(.5) finished = 1 xia1.stop_scan() #write_file(comment, [flyers[0].filepath.value, flyers[1].filepath.value, flyers[2].filepath.value] , '') yield from bp.close_run()
def multicount(dets, num): "Creates a single 'run'" for det in dets: yield from bp.stage(det) yield from bp.open_run() for _ in range(num): yield from bp.trigger_and_read(dets) yield from bp.close_run() for det in dets: yield from bp.unstage(det)
def multicount(dets, num): "Adds some metadata specific to this plan" md = {'plan_name': 'multicount', 'num': num} for det in dets: yield from bp.stage(det) yield from bp.open_run(md=md) for _ in range(num): yield from bp.trigger_and_read(dets) yield from bp.close_run() for det in dets: yield from bp.unstage(det)
def multicount(dets, num, md=None): "Allows user to pass in custom metadata." if md is None: md = {} md = ChainMap(md, {'plan_name': 'multicount', 'num': num}) for det in dets: yield from bp.stage(det) yield from bp.open_run(md=md) for _ in range(num): yield from bp.trigger_and_read(dets) yield from bp.close_run() for det in dets: yield from bp.unstage(det)
def inner(): md = { 'plan_args': {}, 'plan_name': 'execute_trajectory', 'comment': comment } md.update(**metadata) yield from bp.open_run(md=md) # TODO Replace this with actual status object logic. hhm.enable_loop.put("1") ttime.sleep(2) while (hhm.theta.moving == True or hhm.enable_loop_rbv.value == 1): ttime.sleep(.1) #write_file(comment, [flyers[0].filepath.value, flyers[1].filepath.value, flyers[2].filepath.value] , '') yield from bp.close_run()
def inner(): md = { 'plan_args': {}, 'plan_name': 'energy_multiple_scans', 'comment': comment } md.update(**metadata) yield from bp.open_run(md=md) for i in range(0, repeats): print('Run:', i + 1) hhm_en.energy.move(start) ttime.sleep(2) while (hhm_en.energy.moving == True): ttime.sleep(.1) hhm_en.energy.move(stop) ttime.sleep(2) while (hhm_en.energy.moving == True): ttime.sleep(.1) #write_file(comment, [flyers[0].filepath.value, flyers[1].filepath.value, flyers[2].filepath.value] , '') yield from bp.close_run()