def test_rel_list_grid_scan(RE, hw): expected_data = [] for motor1_pos in [6, 7, 8]: for motor2_pos in [18, 28, 38]: expected_data.append({ 'motor2': motor2_pos, 'motor2_setpoint': motor2_pos, 'det': 1.0, 'motor1': motor1_pos, 'motor1_setpoint': motor1_pos }) hw.motor1.set(5) hw.motor2.set(8) scan = bp.rel_list_grid_scan([hw.det], hw.motor1, [1, 2, 3], hw.motor2, [10, 20, 30]) multi_traj_checker(RE, scan, expected_data)
def test_rel_list_grid_scan_snake_list(RE, hw): expected_data = [] for motor1_pos in [6, 7, 8]: if motor1_pos == 7: motor2_list = [38, 28, 18] else: motor2_list = [18, 28, 38] for motor2_pos in motor2_list: expected_data.append({ 'motor2': motor2_pos, 'motor2_setpoint': motor2_pos, 'det': 1.0, 'motor1': motor1_pos, 'motor1_setpoint': motor1_pos }) hw.motor1.set(5) hw.motor2.set(8) scan = bp.rel_list_grid_scan([hw.det], hw.motor1, [1, 2, 3], hw.motor2, [10, 20, 30], snake_axes=[hw.motor2]) multi_traj_checker(RE, scan, expected_data)
def test_simple_rel_list_grid_scan(): RE = RunEngine() hardware = yaqc_bluesky.Device(39424) sensor = yaqc_bluesky.Device(39425) lis = [-0.1, 0, 0.1, 0.2, 0.5] RE(rel_list_grid_scan([sensor], hardware, lis))