diff --git a/doc/manual/getting_started_mgmt.rst b/doc/manual/getting_started_mgmt.rst index dd2251b69..9f7b06d36 100644 --- a/doc/manual/getting_started_mgmt.rst +++ b/doc/manual/getting_started_mgmt.rst @@ -53,10 +53,10 @@ Experiments may have arguments whose values can be set in the GUI and used in th def build(self): - self.setattr_argument("count", NumberValue(ndecimals=0)) + self.setattr_argument("count", NumberValue(ndecimals=0, step=1)) def run(self): - for i in range(int(self.count)): + for i in range(self.count): print("Hello World", i) @@ -144,15 +144,15 @@ Datasets Modify the ``run()`` method of the experiment as follows: :: def run(self): - parabola = self.set_dataset("parabola", [], broadcast=True) - for i in range(int(self.count)): - parabola.append(i*i) + self.set_dataset("parabola", np.full(self.count, np.nan), broadcast=True) + for i in range(self.count): + self.mutate_dataset("parabola", i, i*i) time.sleep(0.5) -.. note:: You need to import the ``time`` module. +.. note:: You need to import the ``time`` module, and the ``numpy`` module as ``np``. -Commit, push and submit the experiment as before. While it is running, go to the "Datasets" 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. +Commit, push and submit the experiment as before. While it is running, go to the "Datasets" dock of the GUI and create a new XY plot showing the new result (you need to edit the applet command line so that it retrieves the ``parabola`` dataset). 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//