Exemplo n.º 1
0
v_param = lp.linspace(0, 200, 5, axis=0, unit = "mV", name = "vPulse")
t_wait = lp.linspace(20, 100, 3, axis=1, unit = "mV", name = "t_wait")


seg1 = p.mk_segment()
seg2 = p.mk_segment()

seg1.P1.add_ramp_ss(0, 100, 0, v_param)
seg1.P1.add_block(100, 200, v_param)

seg2.P2.add_block(0, 100, 200)
seg2.P2.wait(t_wait)
seg2.reset_time()
seg2.add_HVI_marker('dig_trigger_1', t_off=50)
seg2.P1.add_block(0, 100, v_param)

# create sequence
seq = p.mk_sequence([seg1,seg2])
seq.set_hw_schedule(HardwareScheduleMock())

for t in seq.t_wait.values:
    for v_pulse in seq.vPulse.values:
        seq.t_wait(t)
        seq.vPulse(v_pulse)
        seq.upload()
        seq.play()

        plot_awgs(awgs)
        pt.title('AWG upload {t} - {v_pulse}')
#  points to pulse to
gates = ['vP1', 'vP2']

P0 = (-200, -200)
P1 = (-200, 200)
P2 = (-25, 25)
P3 = (25, -25)

seg1 = p.mk_segment(name='init')
seg1.add_block(0, 10000000, gates, P0, reset_time=True)
seg2 = p.mk_segment(name='load')
seg2.add_block(0, 10000000, gates, P1, reset_time=True)
seg3 = p.mk_segment(name='measure')
seg3.add_block(0, 50000000, gates, P3, reset_time=True)

# generate the sequence and upload it.
my_seq = p.mk_sequence([seg1, seg2, seg3])

my_seq.set_hw_schedule(HardwareScheduleMock())
my_seq.sample_rate = 1e7

my_seq.upload()

my_seq.play()

plot_awgs(awgs, bias_T_rc_time=bias_T_rc_time)
pt.title('With bias-T compensation')
pt.grid(True)
pt.ylim(-0.30, 0.55)