示例#1
0
def scan():
    tmax = round_next(5 * timing_system.bct, dt)
    nsteps = tmax / dt
    lxd.value = 0
    data = rscan([lxd, locked], [0, 1], [tmax, 1],
                 nsteps, [clk_shift_count, delay],
                 averaging_time=1.0,
                 logfile="logfiles/scan.log")
from timing_sequence import Sequence
from instrumentation import actual_delay,lecroy_scope
from LokToClock import LokToClock
from timing_sequence import lxd,Sequence
from scan import rscan,timescan as tscan
from motor_wrapper import motor_wrapper
from sleep import sleep
from numpy import arange

locked = motor_wrapper(LokToClock,"locked")
psod1_count = motor_wrapper(timing_system.psod1,"count")
psod2_count = motor_wrapper(timing_system.psod2,"count")

delay = lecroy_scope().measurement(2)
dt = timing_system.psod2.stepsize
tmax = round_next(5*timing_system.bct,dt)
nsteps = tmax/dt

def scan():
    lxd.value = 0
    data = rscan([lxd,delay.gate.start,delay.gate.stop],[0,0,0],
        [tmax,-tmax,-tmax],nsteps,[psod1_count,psod2_count,delay],
        averaging_time=1.0,logfile="logfiles/scan.log")

def scan_fast():
    timing_sequencer.running = False
    lxd_fast.value = 0
    data = rscan([lxd_fast,delay.gate.start,delay.gate.stop],[0,0,0],
        [tmax,-tmax,-tmax],nsteps,[psod1_count,psod2_count,delay],
        averaging_time=1.0,logfile="logfiles/scan.log")