Beispiel #1
0
def test_absolute_spiral(RE, hw):
    motor1 = hw.motor1
    motor2 = hw.motor2
    det = hw.det
    motor1.set(1.0)
    motor2.set(1.0)
    scan = bp.spiral([det],
                     motor1,
                     motor2,
                     0.0,
                     0.0,
                     1.0,
                     1.0,
                     0.1,
                     1.0,
                     tilt=0.0)
    approx_multi_traj_checker(RE, scan, _get_spiral_data(0.0, 0.0), decimal=2)

    scan = bp.spiral([det],
                     motor1,
                     motor2,
                     0.5,
                     0.5,
                     1.0,
                     1.0,
                     0.1,
                     1.0,
                     tilt=0.0)
    approx_multi_traj_checker(RE, scan, _get_spiral_data(0.5, 0.5), decimal=2)
Beispiel #2
0
def test_absolute_spiral(RE, hw):
    motor1 = hw.motor1
    motor2 = hw.motor2
    det = hw.det
    motor1.set(1.0)
    motor2.set(1.0)
    scan = bp.spiral([det], motor1, motor2, 0.0, 0.0, 1.0, 1.0, 0.1, 1.0,
                     tilt=0.0)
    approx_multi_traj_checker(RE, scan, _get_spiral_data(0.0, 0.0),
                              decimal=2)

    scan = bp.spiral([det], motor1, motor2, 0.5, 0.5, 1.0, 1.0, 0.1, 1.0,
                     tilt=0.0)
    approx_multi_traj_checker(RE, scan, _get_spiral_data(0.5, 0.5),
                              decimal=2)
Beispiel #3
0
 def _gen(self):
     return spiral(self.detectors,
                   self.x_motor,
                   self.y_motor,
                   self.x_start,
                   self.y_start,
                   self.x_range,
                   self.y_range,
                   self.dr,
                   self.nth,
                   tilt=self.tilt,
                   md=self.md)
Beispiel #4
0
def absolute_spiral(dets, x_motor, y_motor, x_start, y_start, x_range,
                    y_range, dr, nth, time=None, *, per_step=None,
                    md=None, tilt=0.0):
    cyc = plan_patterns.spiral_simple(x_motor, y_motor, x_motor.position,
                                      y_motor.position, x_range, y_range, dr,
                                      nth, tilt=tilt)
    total_points = len(cyc)

    yield from _pre_scan(dets, total_points=total_points, count_time=time)
    return (yield from plans.spiral(
        dets, x_motor, y_motor, x_start, y_start,
        x_range, y_range, dr, nth, per_step=per_step,
        md=md, tilt=tilt))
Beispiel #5
0
def test_simple_spiral():
    RE = RunEngine()
    hardware_x = yaqc_bluesky.Device(39423)
    hardware_y = yaqc_bluesky.Device(39424)
    sensor = yaqc_bluesky.Device(39425)
    RE(
        spiral(
            [sensor],
            x_motor=hardware_x,
            y_motor=hardware_y,
            x_start=0,
            y_start=0,
            x_range=1,
            y_range=1,
            dr=0.5,
            nth=10,
        ))
Beispiel #6
0
 bp.grid_scan([hw.ab_det],
              hw.motor,
              0,
              10,
              10,
              hw.motor2,
              0,
              10,
              10,
              True,
              per_step=one_nd_step),
 bp.spiral([hw.ab_det],
           hw.motor,
           hw.motor2,
           0,
           0,
           10,
           10,
           1,
           10,
           per_step=one_nd_step),
 bp.grid_scan([hw.direct_img],
              hw.motor,
              0,
              10,
              10,
              hw.motor2,
              0,
              10,
              10,
              True,
              per_step=one_nd_step),
Beispiel #7
0
from bluesky.simulators import plot_raster_path
from ophyd.sim import motor1, motor2, det
from bluesky.plans import spiral

plan = spiral([det], motor1, motor2, x_start=0.0, y_start=0.0, x_range=1.,
              y_range=1.0, dr=0.1, nth=10)
plot_raster_path(plan, 'motor1', 'motor2', probe_size=.01)
Beispiel #8
0
     0,
     10,
     10,
     hw.motor2,
     0,
     10,
     10,
     True,
     per_step=one_nd_step,
 ),
 bp.spiral(
     [hw.ab_det],
     hw.motor,
     hw.motor2,
     0,
     0,
     10,
     10,
     1,
     10,
     per_step=one_nd_step,
 ),
 bp.grid_scan(
     [rand_img],
     hw.motor,
     0,
     10,
     10,
     hw.motor2,
     0,
     10,
     10,