From 2257cfa95272600906a136aefb43ed549ee91076 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sun, 15 Mar 2015 18:13:47 +0100 Subject: [PATCH] wavesynth/compute_samples/: demonstrate dds clear --- artiq/wavesynth/compute_samples.py | 49 ++++++++++++++++++++++++++---- 1 file changed, 43 insertions(+), 6 deletions(-) diff --git a/artiq/wavesynth/compute_samples.py b/artiq/wavesynth/compute_samples.py index 7ba485bfe..ea7f7e5a1 100644 --- a/artiq/wavesynth/compute_samples.py +++ b/artiq/wavesynth/compute_samples.py @@ -112,7 +112,7 @@ def main(): [ # segment 0 { - # line 0 + # segment 0, line 0 "dac_divider": 1, "duration": 100, "channel_data": [ @@ -127,7 +127,7 @@ def main(): "jump": False }, { - # line 1 + # segment 1, line 1 "dac_divider": 1, "duration": 100, "channel_data": [ @@ -145,7 +145,7 @@ def main(): [ # segment 1 { - # line 2 + # segment 1, line 0 "dac_divider": 1, "duration": 100, "channel_data": [ @@ -160,28 +160,65 @@ def main(): "jump": False }, { - # line 3 + # segment 1, line 1 "dac_divider": 1, "duration": 100, "channel_data": [ { # channel 0 "dds": {"amplitude": [50.5, -1.0, 0.01], - "phase": [0.0, 100.05, -0.0005], + "phase": [0.0, 0.05, -0.0005], "clear": False} } ], "wait_trigger": False, "jump": True } + ], + [ + # segment 2 + { + # segment 2, line 0 + "dac_divider": 1, + "duration": 84, + "channel_data": [ + { + # channel 0 + "dds": {"amplitude": [100.0], + "phase": [0.0, 0.05], + "clear": False} + } + ], + "wait_trigger": True, + "jump": False + }, + { + # segment 2, line 1 + "dac_divider": 1, + "duration": 116, + "channel_data": [ + { + # channel 0 + "dds": {"amplitude": [100.0], + "phase": [0.0, 0.05], + "clear": True} + } + ], + "wait_trigger": False, + "jump": True + } ] ] - x = list(range(400)) + x = list(range(600)) s = Synthesizer(1, program) r = s.trigger(0) y = r[0] + r = s.trigger(2) + y += r[0] + r = s.trigger() + y += r[0] r = s.trigger(1) y += r[0] cairoplot.scatter_plot("plot.png", [x, y])