Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: m-labs/artiq
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: fd910faa38bf
Choose a base ref
...
head repository: m-labs/artiq
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 3044a053e188
Choose a head ref
  • 2 commits
  • 7 files changed
  • 1 contributor

Commits on Oct 24, 2015

  1. Copy the full SHA
    b0ef0d2 View commit details
  2. Copy the full SHA
    3044a05 View commit details
Showing with 12 additions and 7 deletions.
  1. +2 −0 .gitignore
  2. +4 −2 artiq/gui/datasets.py
  3. +4 −1 artiq/master/databases.py
  4. +1 −1 doc/manual/getting_started_core.rst
  5. +1 −1 doc/manual/getting_started_mgmt.rst
  6. +0 −1 examples/master/dataset_db.pyon
  7. +0 −1 examples/sim/dataset_db.pyon
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -13,3 +13,5 @@ doc/manual/_build
/.coverage
artiq/test/results
examples/master/results
examples/master/dataset_db.pyon
examples/sim/dataset_db.pyon
6 changes: 4 additions & 2 deletions artiq/gui/datasets.py
Original file line number Diff line number Diff line change
@@ -100,8 +100,10 @@ def init_datasets_model(self, init):
return self.table_model

def update_display_data(self, dsp):
dsp.update_data({k: self.table_model.backing_store[k][1]
for k in dsp.data_sources()})
filtered_data = {k: self.table_model.backing_store[k][1]
for k in dsp.data_sources()
if k in self.table_model.backing_store}
dsp.update_data(filtered_data)

def on_mod(self, mod):
if mod["action"] == "init":
5 changes: 4 additions & 1 deletion artiq/master/databases.py
Original file line number Diff line number Diff line change
@@ -32,7 +32,10 @@ def __init__(self, persist_file, autosave_period=30):
self.persist_file = persist_file
self.autosave_period = autosave_period

file_data = pyon.load_file(self.persist_file)
try:
file_data = pyon.load_file(self.persist_file)
except FileNotFoundError:
file_data = dict()
self.data = Notifier({k: (True, v) for k, v in file_data.items()})

def save(self):
2 changes: 1 addition & 1 deletion doc/manual/getting_started_core.rst
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ As a very first step, we will turn on a LED on the core device. Create a file ``

The central part of our code is our ``LED`` class, that derives from :class:`artiq.language.environment.EnvExperiment`. Among other features, ``EnvExperiment`` calls our ``build`` method and provides the ``setattr_device`` method that interfaces to the device database to create the appropriate device drivers and make those drivers accessible as ``self.core`` and ``self.led``. The ``@kernel`` decorator tells the system that the ``run`` method must be executed on the core device (instead of the host). The decorator uses ``self.core`` internally, which is why we request the core device using ``setattr_device`` like any other.

Copy the files ``device_db.pyon`` and ``dataset_db.pyon`` (containing the device and dataset databases) from the ``examples/master`` folder of ARTIQ into the same directory as ``led.py`` (alternatively, you can use the ``--device-db`` and ``--dataset-db`` options of ``artiq_run``). You can open the database files using a text editor - their contents are in a human-readable format. You will probably want to set the IP address of the core device in ``device_db.pyon`` so that the computer can connect to it (it is the ``host`` parameter of the ``comm`` entry). See :ref:`device-db` for more information. The example device database is designed for the NIST QC1 hardware on the KC705; see :ref:`board-ports` for RTIO channel assignments if you need to adapt the device database to a different hardware platform.
Copy the file ``device_db.pyon`` (containing the device database) from the ``examples/master`` folder of ARTIQ into the same directory as ``led.py`` (alternatively, you can use the ``--device-db`` option of ``artiq_run``). You can open PYON database files using a text editor - their contents are in a human-readable format. You will probably want to set the IP address of the core device in ``device_db.pyon`` so that the computer can connect to it (it is the ``host`` parameter of the ``comm`` entry). See :ref:`device-db` for more information. The example device database is designed for the NIST QC1 hardware on the KC705; see :ref:`board-ports` for RTIO channel assignments if you need to adapt the device database to a different hardware platform.

.. note::
If the ``led`` device is a bidirectional TTL (i.e. ``TTLInOut`` instead of ``TTLOut``), you need to put it in output (driving) mode. Add the following at the beginning of ``run``: ::
2 changes: 1 addition & 1 deletion doc/manual/getting_started_mgmt.rst
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ Starting your first experiment with the master

In the previous tutorial, we used the ``artiq_run`` utility to execute our experiments, which is a simple stand-alone tool that bypasses the ARTIQ management system. We will now see how to run an experiment using the master (the central program in the management system that schedules and executes experiments) and the GUI client (that connects to the master and controls it).

First, create a folder ``~/artiq-master`` and copy the ``device_db.pyon`` and ``dataset_db.pyon`` (containing the device and dataset databases) found in the ``examples/master`` directory from the ARTIQ sources. The master uses those files in the same way as ``artiq_run``.
First, create a folder ``~/artiq-master`` and copy the file ``device_db.pyon`` (containing the device database) found in the ``examples/master`` directory from the ARTIQ sources. The master uses those files in the same way as ``artiq_run``.

Then create a ``~/artiq-master/repository`` sub-folder to contain experiments. The master scans this ``repository`` folder to determine what experiments are available (the name of the folder can be changed using ``-r``).

1 change: 0 additions & 1 deletion examples/master/dataset_db.pyon

This file was deleted.

1 change: 0 additions & 1 deletion examples/sim/dataset_db.pyon

This file was deleted.