Skip to content
Snippets Groups Projects
Commit 6b691922 authored by Sander de Snoo's avatar Sander de Snoo
Browse files

Fixed test

parent 41203a6e
No related branches found
No related tags found
No related merge requests found
from pulse_lib.tests.configurations.test_configuration import context
#%%
# %%
from scipy import signal
......@@ -21,7 +21,8 @@ def tukey_pulse(duration, sample_rate, amplitude, alpha):
n_points = int(round(duration / sample_rate * 1e9))
return signal.windows.tukey(n_points, alpha) * amplitude
#%%
# %%
def test1():
pulse = context.init_pulselib(n_gates=1, n_markers=1)
......@@ -40,9 +41,10 @@ def test1():
sequence = pulse.mk_sequence(segments)
sequence.n_rep = 2
context.add_hw_schedule(sequence)
context.plot_awgs(sequence, ylim=(-0.2, 0.2))
def test2():
pulse = context.init_pulselib(n_gates=1, n_markers=1)
......@@ -61,7 +63,7 @@ def test2():
sequence = pulse.mk_sequence(segments)
sequence.n_rep = 2
context.add_hw_schedule(sequence)
context.plot_awgs(sequence, ylim=(-0.2, 0.2))
......@@ -83,7 +85,7 @@ def test3():
sequence = pulse.mk_sequence(segments)
sequence.n_rep = 2
context.add_hw_schedule(sequence)
context.plot_awgs(sequence, ylim=(-0.2, 0.2))
......@@ -106,9 +108,10 @@ def test4():
sequence = pulse.mk_sequence(segments)
sequence.n_rep = 2
context.add_hw_schedule(sequence)
context.plot_awgs(sequence, ylim=(-0.2, 0.2))
def test5():
pulse = context.init_pulselib(n_gates=1, n_markers=1)
......@@ -129,10 +132,11 @@ def test5():
sequence = pulse.mk_sequence(segments)
sequence.n_rep = 2
context.add_hw_schedule(sequence)
context.plot_awgs(sequence, ylim=(-0.2, 0.2))
#%%
# %%
if __name__ == '__main__':
ds1 = test1()
ds2 = test2()
......@@ -140,8 +144,8 @@ if __name__ == '__main__':
ds4 = test4()
ds5 = test5()
#%%
# %%
if False:
from pulse_lib.tests.utils.last_upload import get_last_upload
lu = get_last_upload(context.pulse)
\ No newline at end of file
lu = get_last_upload(context.pulse)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment