forked from M-Labs/artiq
1
0
Fork 0

doc/getting_started_mgmt: adapt to changes. Closes #462

This commit is contained in:
Sebastien Bourdeauducq 2016-06-03 23:10:00 -04:00
parent 98ae779941
commit 5ce155614e
1 changed files with 8 additions and 8 deletions

View File

@ -53,10 +53,10 @@ Experiments may have arguments whose values can be set in the dashboard and used
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/<date>/<time>``. Open that file with HDFView or h5dump, and observe the data we just generated as well as the Git commit ID of the experiment (a hexadecimal hash such as ``947acb1f90ae1b8862efb489a9cc29f7d4e0c645`` that represents the data at a particular time in the Git repository). The list of Git commit IDs can be found using the ``git log`` command in ``~/artiq-work``.
After the experiment has finished executing, the results are written to a HDF5 file that resides in ``~/artiq-master/results/<date>/<hour>``. Open that file with HDFView or h5dump, and observe the data we just generated as well as the Git commit ID of the experiment (a hexadecimal hash such as ``947acb1f90ae1b8862efb489a9cc29f7d4e0c645`` that represents the data at a particular time in the Git repository). The list of Git commit IDs can be found using the ``git log`` command in ``~/artiq-work``.
.. note:: HDFView and h5dump are third-party tools not supplied with ARTIQ.