From 2c893ba0a2eb5f6c8632f2f4063d5f6853f36e21 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Wed, 26 Aug 2015 20:40:37 +0800 Subject: [PATCH] doc/manual: add results to mgmt tutorial --- doc/manual/getting_started_mgmt.rst | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/doc/manual/getting_started_mgmt.rst b/doc/manual/getting_started_mgmt.rst index 53db876b3..1ff2e7fed 100644 --- a/doc/manual/getting_started_mgmt.rst +++ b/doc/manual/getting_started_mgmt.rst @@ -136,3 +136,21 @@ The master should now run the new version from its repository. As an exercise, add another argument to the experiment, commit and push the result, and verify that the new control is added in the GUI. +Results +------- + +Modify the ``run()`` method of the experiment as follows: :: + + def run(self): + parabola = self.set_result("parabola", [], realtime=True) + for i in range(int(self.count)): + parabola.append(i*i) + time.sleep(0.5) + +.. note:: You need to import the ``time`` module. + +Commit, push and submit the experiment as before. While it is running, go to the "Results" dock of the GUI and create a new XY plot showing the new result. Observe how the points are added one by one to the plot. + +After the experiment has finished executing, the results are written to a HDF5 file that resides in ``~/artiq-master/results//