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: 8f045911f10f
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: c4559fcd99ca
Choose a head ref
  • 2 commits
  • 7 files changed
  • 1 contributor

Commits on Aug 25, 2016

  1. doc/rtio: cleanup

    jordens committed Aug 25, 2016
    Copy the full SHA
    afd2a37 View commit details
  2. doc: use sphinx_rtd_theme

    jordens committed Aug 25, 2016
    Copy the full SHA
    c4559fc View commit details
1 change: 1 addition & 0 deletions conda/artiq/meta.yaml
Original file line number Diff line number Diff line change
@@ -28,6 +28,7 @@ requirements:
- sphinx
- sphinx-argparse
- sphinxcontrib-wavedrom
- sphinx_rtd_theme
- h5py
- dateutil
- pyqt5
File renamed without changes.
File renamed without changes.
14 changes: 14 additions & 0 deletions doc/manual/_templates/layout.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{% extends "!layout.html" %}

{# since sphinx_rtd_theme moves scripts to the end, hook up WaveDrom again #}
{%- block footer %}
{{ super() }}
<script>(function(){
window.addEventListener(
"load",
(function(){ try {
WaveDrom.ProcessAll();
} catch(e) {} }),
false);
})();</script>
{% endblock %}
19 changes: 7 additions & 12 deletions doc/manual/conf.py
Original file line number Diff line number Diff line change
@@ -16,6 +16,7 @@
import sys
import os

import sphinx_rtd_theme
from unittest.mock import MagicMock


@@ -124,24 +125,18 @@ def __getattr__(cls, name):

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'classic'
html_theme = 'sphinx_rtd_theme'

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
html_theme_options = {
'sidebarbgcolor': '#171814',
'sidebarlinkcolor': '#7389ae',
'sidebartextcolor': '#b3b3bb',
'footerbgcolor': '#171814',
'footertextcolor': '#b3b3bb',
'relbarbgcolor': '#171814',
'relbarlinkcolor': '#7389ae',
'relbartextcolor': '#b3b3bb',
'analytics_id': 'UA-75602447-2',
}

# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]

# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
@@ -152,7 +147,7 @@ def __getattr__(cls, name):

# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
html_logo = "../logo/artiq_white.png"
html_logo = '../logo/artiq_white.png'

# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
@@ -293,5 +288,5 @@ def __getattr__(cls, name):
#texinfo_no_detailmenu = False

# -- Options for sphinxcontrib-wavedrom -----------------------------------
offline_skin_js_path = 'static/default.js'
offline_wavedrom_js_path = 'static/WaveDrom.js'
offline_skin_js_path = '_static/default.js'
offline_wavedrom_js_path = '_static/WaveDrom.js'
32 changes: 16 additions & 16 deletions doc/manual/rtio.rst
Original file line number Diff line number Diff line change
@@ -40,7 +40,7 @@ When computing the difference of absolute timestamps, use ``mu_to_seconds(t2-t1)
When accumulating time, do it in machine units and not in SI units, so that rounding errors do not accumulate.

The following basic example shows how to place output events on the timeline.
It emits a precisely timed 2 µs pulse:::
It emits a precisely timed 2 µs pulse::

ttl.on()
delay(2*us)
@@ -62,17 +62,17 @@ The following diagram shows what is going on at the different levels of the soft
{},
{name: 'slack', wave: 'x2x.2x', data: ['4400', '5800']},
{},
{name: 'rtio_counter', wave: 'x2x|2x|2x2x', data: ['2600', '3200', '7000', '9000'], node: ' V.W'},
{name: 'ttl', wave: 'x1.0', node: ' R.S', phase: -7.5},
{ node: ' T.U', phase: -7.5}
{name: 'rtio_counter', wave: 'x2x|2x|2x2x', data: ['2600', '3200', '7000', '9000'], node: ' V.W'},
{name: 'ttl', wave: 'x1.0', node: ' R.S', phase: -6.5},
{ node: ' T.U', phase: -6.5}
],
edge: [
'A~>R', 'P~>R', 'V~>R', 'B~>S', 'Q~>S', 'W~>S',
'R-T', 'S-U', 'T<->U 2µs'
],
}

The sequence is exactly equivalent to:::
The sequence is exactly equivalent to::

ttl.pulse(2*us)

@@ -85,7 +85,7 @@ An RTIO event must always be programmed with a timestamp in the future.
In other words, the timeline cursor ``now`` must be after the current wall clock ``rtio_counter``: the past can not be altered.
The following example tries to place an rising edge event on the timeline.
If the current cursor is in the past, an :class:`artiq.coredevice.exceptions.RTIOUnderflow` exception is thrown.
The experiment attempts to handle the exception by moving the cursor forward and repeating the programming of the rising edge.::
The experiment attempts to handle the exception by moving the cursor forward and repeating the programming of the rising edge::

try:
ttl.on()
@@ -122,7 +122,7 @@ Input channels and events

Input channels detect events, timestamp them, and place them in a buffer for the experiment to read out.
The following example counts the rising edges occurring during a precisely timed 500 ns interval.
If more than 20 rising edges were received it outputs a pulse.::
If more than 20 rising edges were received it outputs a pulse::

input.gate_rising(500*ns)
if input.count() > 20:
@@ -136,12 +136,12 @@ In these situations where ``count()`` leads to a synchronization of timeline cur
.. wavedrom::
{
signal: [
{name: 'kernel', wave: '3..5|..2.3..x..', data: ['gate_rising()', 'count()', 'delay()', 'pulse()'], node: '.A.B...C.ZD.E'},
{name: 'now_mu', wave: '2.2.|....2.2.', node: '.P.Q.....XV.W'},
{name: 'kernel', wave: '3..5.|2.3..x..', data: ['gate_rising()', 'count()', 'delay()', 'pulse()'], node: '.A.B..C.ZD.E'},
{name: 'now_mu', wave: '2.2..|..2.2.', node: '.P.Q....XV.W'},
{},
{},
{name: 'input gate', wave: 'x1.0', node: '.T.U', phase: -3.5},
{name: 'output', wave: 'x1.0', node: '.R.S', phase: -11.5}
{name: 'input gate', wave: 'x1.0', node: '.T.U', phase: -2.5},
{name: 'output', wave: 'x1.0', node: '.R.S', phase: -10.5}
],
edge: [
'A~>T', 'P~>T', 'B~>U', 'Q~>U', 'U~>C', 'D~>R', 'E~>S', 'V~>R', 'W~>S'
@@ -160,7 +160,7 @@ Seamless handover
-----------------

The timeline cursor persists across kernel invocations.
This is demonstrated in the following example where a pulse is split across two kernels:::
This is demonstrated in the following example where a pulse is split across two kernels::

def run():
k1()
@@ -181,12 +181,12 @@ Here, ``run()`` calls ``k1()`` which exits leaving the cursor one second after t
{
signal: [
{name: 'kernel', wave: '3.2..2..|3.', data: ['k1: on()', 'k1: delay(dt)', 'k1->k2 swap', 'k2: off()'], node: '..A........B'},
{name: 'now', wave: '2....2...|.', data: ['t0', 't0+dt'], node: '..P........Q'},
{name: 'now', wave: '2....2...|.', data: ['t', 't+dt'], node: '..P........Q'},
{},
{},
{name: 'rtio_counter', wave: 'x.........|2x|2', data: ['t0', 't0+dt'], node: '...........V..W'},
{name: 'ttl', wave: 'x1..0', node: '.R..S', phase: -10.5},
{ node: ' T..U', phase: -10.5}
{name: 'rtio_counter', wave: 'x......|2xx|2', data: ['t', 't+dt'], node: '........V...W'},
{name: 'ttl', wave: 'x1...0', node: '.R...S', phase: -7.5},
{ node: ' T...U', phase: -7.5}
],
edge: [
'A~>R', 'P~>R', 'V~>R', 'B~>S', 'Q~>S', 'W~>S',
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@

# Depends on PyQt5, but setuptools cannot check for it.
requirements = [
"sphinx", "sphinx-argparse", "sphinxcontrib-wavedrom",
"sphinx", "sphinx-argparse", "sphinxcontrib-wavedrom", "sphinx_rtd_theme",
"asyncserial", "numpy", "scipy",
"python-dateutil", "prettytable", "h5py",
"quamash", "pyqtgraph", "pygit2", "aiohttp",