forked from M-Labs/artiq
1
0
Fork 0

doc: more updates for dataset API

This commit is contained in:
Sebastien Bourdeauducq 2015-10-13 18:45:04 +08:00
parent fc4791bbbe
commit ef487ee8b0
3 changed files with 6 additions and 6 deletions

View File

@ -3,7 +3,7 @@ Core device
The core device is a FPGA-based hardware component that contains a softcore CPU tightly coupled with the so-called RTIO core that provides precision timing. The CPU executes Python code that is statically compiled by the ARTIQ compiler, and communicates with the core device peripherals (TTL, DDS, etc.) over the RTIO core. This architecture provides high timing resolution, low latency, low jitter, high level programming capabilities, and good integration with the rest of the Python experiment code. The core device is a FPGA-based hardware component that contains a softcore CPU tightly coupled with the so-called RTIO core that provides precision timing. The CPU executes Python code that is statically compiled by the ARTIQ compiler, and communicates with the core device peripherals (TTL, DDS, etc.) over the RTIO core. This architecture provides high timing resolution, low latency, low jitter, high level programming capabilities, and good integration with the rest of the Python experiment code.
While it is possible to use all the other parts of ARTIQ (controllers, master, GUI, result management, etc.) without a core device, many experiments require it. While it is possible to use all the other parts of ARTIQ (controllers, master, GUI, dataset management, etc.) without a core device, many experiments require it.
.. _core-device-flash-storage: .. _core-device-flash-storage:

View File

@ -1,7 +1,7 @@
The environment The environment
=============== ===============
Experiments interact with an environment that consists of devices, parameters, arguments and results. Access to the environment is handled by the class :class:`artiq.language.environment.EnvExperiment` that experiments should derive from. Experiments interact with an environment that consists of devices, arguments and datasets. Access to the environment is handled by the class :class:`artiq.language.environment.EnvExperiment` that experiments should derive from.
.. _device-db: .. _device-db:

View File

@ -136,20 +136,20 @@ 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. 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 Datasets
------- --------
Modify the ``run()`` method of the experiment as follows: :: Modify the ``run()`` method of the experiment as follows: ::
def run(self): def run(self):
parabola = self.set_result("parabola", [], realtime=True) parabola = self.set_dataset("parabola", [], broadcast=True)
for i in range(int(self.count)): for i in range(int(self.count)):
parabola.append(i*i) parabola.append(i*i)
time.sleep(0.5) time.sleep(0.5)
.. note:: You need to import the ``time`` module. .. 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. 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.
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>/<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``.