Exemplo n.º 1
0
class MyExperiment(Experiment):
    dx = mc_cls.scan("mc").stages[0](limits=[-10, 10])
    dy = mc_cls.scan("mc").stages[0](limits=[-30, 30])

    dlogical_x = mc_cls.scan("mc").x_y_z.x(limits=[-10, 10])
    dlogical_y = mc_cls.scan("mc").x_y_z.y(limits=[-10, 10])
    dlogical_z = mc_cls.scan("mc").x_y_z.z(limits=[-5, 5])

    dlogical_r = mc_cls.scan("mc").r_theta_z.r(limits=[0, 10])
    dlogical_theta = mc_cls.scan("mc").r_theta_z.theta(limits=[0, 2 * np.pi])
    dlogical_cylindrical_z = mc_cls.scan("mc").r_theta_z.z(limits=[-5, 5])

    read_power = {
        "power": "power_meter.device",
    }

    scan_methods = [
        scan(x=dx, name="dx Scan", read=read_power),
        scan(x=dx, y=dy, name="dx-dy Scan", read=read_power),
        # Single Axes (variable X scan)
        scan(x=dlogical_x, name="Logical X", read=read_power),
        # XZ Plane scan
        scan(x=dlogical_x, z=dlogical_z, name="Logical XZ", read=read_power),
        # Cylindrical coordinates scan
        scan(
            r=dlogical_r,
            theta=dlogical_theta,
            z=dlogical_cylindrical_z,
            name="Cylindrical",
            read=read_power,
        ),
    ]
Exemplo n.º 2
0
class MyExperiment(AutoExperiment):
    dx = ManualMotionController.scan("mc").s0(limits=[-10, 10])
    dy = ManualMotionController.scan("mc").s1(limits=[-30, 30])

    read_power = {"power": "power_meter.device"}

    DxScan = scan(x=dx, name="dx Scan", read=read_power)
    DxDyScan = scan(x=dx, y=dy, name="dx-dy Scan", read=read_power)

    scan_methods = [DxScan, DxDyScan]
    run_with = [DxScan(n_x=2500)] * 10

    exit_after_finish = True
    discard_data = True
Exemplo n.º 3
0
class PreconditionFailExperiment(UILessExperiment):
    scan_methods = [
        scan(
            name="Precondition Scan",
            preconditions=[precondition],
        )
    ]
Exemplo n.º 4
0
class UILessExperiment(Experiment):
    save_on_main = True
    scan_methods = [scan(name="No Scan")]

    def __init__(self, app):
        super().__init__(app)
        self.ui = Sink()
Exemplo n.º 5
0
class UILessAutoExperiment(AutoExperiment):
    save_on_main = True
    config_cls = scan(name="No Scan")
    scan_methods = [config_cls]
    run_with = [config_cls()]

    def __init__(self, app):
        super().__init__(app)
        self.ui = Sink()
Exemplo n.º 6
0
class MyExperiment(AutoExperiment):
    dx = MockMotionController.scan("mc").stages[0](limits=[-10, 10])
    read_power = {"power": "ccd.device"}

    DxScan = scan(x=dx, name="dx Scan", read=read_power)

    scan_methods = [DxScan]
    run_with = [DxScan(n_x=1000)] * 10

    exit_after_finish = True
    discard_data = True
class MyExperiment(Experiment):
    scan_methods = [
        scan(
            name="Sensitivity Scan",
            sensitivity=dsensitivity,
            x=dx,
            read=read_power,
        ),
        scan(x=dx, tc=dtime_constant, name="Time Constant Scan", read=read_power),
        scan(
            name="Fast Scan",
            x=dx,
            read=read_power,
            profiles=dict(lockin="Fast"),
        ),
        scan(
            name="Slow Scan",
            x=dx,
            read=read_power,
            profiles=dict(lockin="Slow"),
        ),
    ]
Exemplo n.º 8
0
class MyExperiment(Experiment):
    dx = MockMotionController.scan("mc").stages[0]()
    read_power = dict(power="power_meter.device")

    scan_methods = [
        scan(
            x=dx,
            name="dx Scan",
            read=read_power,
            preconditions=[second_axis_is_retracted],
        ),
    ]

    # can also set a "global" check, that can be verified whenever starting or resuming a scan
    # if you need really custom behavior just modify `start_running` or `{initial_state}_to_running`
    # as is appropriate for your application
    interlocks = [high_voltage_is_off]
Exemplo n.º 9
0
class MyExperiment(Experiment):
    dx = MockMotionController.scan("mc").stages[0](limits=[-10, 10])
    dtime_constant = ManagedDSP7265.scan("lockin").time_constant()

    read_power = {
        "power": "lockin.x",
    }

    scan_methods = [
        # Two different ways of achieving a one axis scan with some instrument setup and teardown
        scan(
            x=dx,
            name="dx Scan",
            read=read_power,
            setup=setup_lockin,
            teardown=teardown_lockin,
        ),
        CustomScan,
    ]
Exemplo n.º 10
0
class MyExperiment(Experiment):
    dx = MockMotionController.scan("mc").stages[0](limits=[-10, 10])
    dy = MockMotionController.scan("mc").stages[1](limits=[-30, 30])

    read_power = {
        "power": "power_meter.device",
    }

    scan_methods = [
        scan(x=dx.step(randomly), name="Random Scan", read=read_power),
        scan(
            name="Forwards and Backwards",
            x=dx.step(forwards_and_backwards),
            read=read_power,
        ),
        scan(x=dx.step(backwards), name="Backwards", read=read_power),
        scan(x=dx.step(only(10)), name="At Most 10", read=read_power),
        scan(xy=step_together(dx, dy), name="Diagonal Scan", read=read_power),
        scan(xy=staircase_product(dx, dy), name="Staircase Scan", read=read_power),
    ]
Exemplo n.º 11
0
class MyExperiment(Experiment):
    scan_methods = [
        scan(x=dx, name="dx Scan", read=read_power),
        scan(x=dx, y=dy, name="dx-dy Scan", read=read_power),
    ]
Exemplo n.º 12
0
class ScanPropertyExperiment(UILessExperiment):
    scan_methods = [
        scan(sensitivity=dsensitivity, categorical=dcat, name="Test Scan")
    ]