Skip to content
Permalink
Browse files

minor fixes to docs, changing license

  • Loading branch information
sneakers-the-rat committed Oct 27, 2019
1 parent 28472fa commit ccde01421147fa0cf91534fae67e8927c699c56c
Showing with 5,036 additions and 3,440 deletions.
  1. +373 −674 LICENSE
  2. +11 −8 autopilot/core/gui.py
  3. +16 −16 autopilot/core/networking.py
  4. +2 −0 autopilot/viz/trial_viewer.py
  5. +45 −16 docs/_modules/autopilot/core/gui.html
  6. +31 −7 docs/_modules/autopilot/core/hardware.html
  7. +47 −23 docs/_modules/autopilot/core/networking.html
  8. +31 −7 docs/_modules/autopilot/core/pilot.html
  9. +31 −45 docs/_modules/autopilot/core/plots.html
  10. +31 −7 docs/_modules/autopilot/core/subject.html
  11. +38 −10 docs/_modules/autopilot/core/terminal.html
  12. +31 −7 docs/_modules/autopilot/core/utils.html
  13. +35 −11 docs/_modules/autopilot/prefs.html
  14. +41 −17 docs/_modules/autopilot/setup/setup_pilot.html
  15. +31 −7 docs/_modules/autopilot/setup/setup_terminal.html
  16. +31 −7 docs/_modules/autopilot/stim/managers.html
  17. +31 −7 docs/_modules/autopilot/stim/sound/jackclient.html
  18. +31 −7 docs/_modules/autopilot/stim/sound/pyoserver.html
  19. +31 −7 docs/_modules/autopilot/stim/sound/sounds.html
  20. +31 −7 docs/_modules/autopilot/tasks/free_water.html
  21. +31 −7 docs/_modules/autopilot/tasks/graduation.html
  22. +31 −7 docs/_modules/autopilot/tasks/nafc.html
  23. +31 −7 docs/_modules/autopilot/tasks/task.html
  24. +607 −0 docs/_modules/autopilot/viz/trial_viewer.html
  25. +31 −7 docs/_modules/collections.html
  26. +32 −11 docs/_modules/index.html
  27. +31 −7 docs/_modules/multiprocessing/synchronize.html
  28. +31 −7 docs/_modules/tables/description.html
  29. +31 −7 docs/_modules/threading.html
  30. +0 −1 docs/_sources/autopilot.core.rst.txt
  31. +7 −0 docs/_sources/autopilot.core.styles.rst.txt
  32. +15 −0 docs/_sources/changelog/index.rst.txt
  33. +9 −0 docs/_sources/changelog/v0.2.0.rst.txt
  34. +1 −1 docs/_sources/guide.hardware.rst.txt
  35. +21 −19 docs/_sources/guide.installation.pilot.rst.txt
  36. +3 −3 docs/_sources/guide.installation.rst.txt
  37. +4 −3 docs/_sources/guide.installation.terminal.rst.txt
  38. +19 −11 docs/_sources/guide.overview.rst.txt
  39. +6 −6 docs/_sources/guide.task.rst.txt
  40. +4 −4 docs/_sources/guide.training.rst.txt
  41. +2 −4 docs/_sources/index.rst.txt
  42. +1 −12 docs/_static/basic.css
  43. +9 −7 docs/_static/css/autopilot_theme.css
  44. +3 −5 docs/_static/doctools.js
  45. +1 −2 docs/_static/documentation_options.js
  46. +316 −36 docs/_static/searchtools.js
  47. +1 −1 docs/_static/websupport.js
  48. +41 −15 docs/autopilot.core.gui.html
  49. +37 −29 docs/autopilot.core.hardware.html
  50. +32 −7 docs/autopilot.core.html
  51. +99 −298 docs/autopilot.core.networking.html
  52. +32 −77 docs/autopilot.core.pilot.html
  53. +33 −208 docs/autopilot.core.plots.html
  54. +373 −0 docs/autopilot.core.styles.html
  55. +35 −110 docs/autopilot.core.subject.html
  56. +31 −86 docs/autopilot.core.terminal.html
  57. +31 −143 docs/autopilot.core.utils.html
  58. +32 −41 docs/autopilot.prefs.html
  59. +31 −7 docs/autopilot.setup.html
  60. +31 −82 docs/autopilot.setup.setup_pilot.html
  61. +31 −7 docs/autopilot.setup.setup_scale.html
  62. +31 −64 docs/autopilot.setup.setup_terminal.html
  63. +31 −7 docs/autopilot.stim.html
  64. +31 −123 docs/autopilot.stim.managers.html
  65. +31 −7 docs/autopilot.stim.sound.html
  66. +38 −133 docs/autopilot.stim.sound.jackclient.html
  67. +31 −19 docs/autopilot.stim.sound.pyoserver.html
  68. +36 −260 docs/autopilot.stim.sound.sounds.html
  69. +32 −74 docs/autopilot.tasks.free_water.html
  70. +33 −133 docs/autopilot.tasks.graduation.html
  71. +31 −7 docs/autopilot.tasks.html
  72. +35 −89 docs/autopilot.tasks.nafc.html
  73. +31 −67 docs/autopilot.tasks.task.html
  74. +31 −7 docs/autopilot.viz.html
  75. +79 −31 docs/autopilot.viz.trial_viewer.html
  76. +377 −0 docs/changelog/index.html
  77. +369 −0 docs/changelog/v0.2.0.html
  78. +44 −8 docs/genindex.html
  79. +36 −7 docs/guide.hardware.html
  80. +36 −12 docs/guide.installation.html
  81. +125 −68 docs/guide.installation.pilot.html
  82. +33 −13 docs/guide.installation.terminal.html
  83. +55 −22 docs/guide.overview.html
  84. +41 −17 docs/guide.task.html
  85. +37 −13 docs/guide.training.html
  86. +35 −10 docs/index.html
  87. BIN docs/objects.inv
  88. +71 −7 docs/py-modindex.html
  89. +31 −7 docs/search.html
  90. +1 −1 docs/searchindex.js
  91. +0 −1 docs/source/autopilot.core.rst
  92. +7 −0 docs/source/autopilot.core.styles.rst
  93. +15 −0 docs/source/changelog/index.rst
  94. +9 −0 docs/source/changelog/v0.2.0.rst
  95. +1 −1 docs/source/guide.hardware.rst
  96. +21 −19 docs/source/guide.installation.pilot.rst
  97. +3 −3 docs/source/guide.installation.rst
  98. +4 −3 docs/source/guide.installation.terminal.rst
  99. +19 −11 docs/source/guide.overview.rst
  100. +6 −6 docs/source/guide.task.rst
  101. +4 −4 docs/source/guide.training.rst
  102. +2 −4 docs/source/index.rst
  103. +34 −7 docs/todo.html
  104. +7 −0 mac_pyside_install_issues.txt
  105. +10 −0 requirements_docs.txt
  106. +3 −0 test_text.txt
  107. +3 −0 todo
1,047 LICENSE

Large diffs are not rendered by default.

@@ -1,16 +1,19 @@
"""
Note:
Let's start by saying all the GUI code is a little screwy.
Currently, the GUI code is some of the oldest code in the library --
in particular much of it was developed before the network infrastructure was mature.
As a result, a lot of modules are interdependent (eg. pass objects between each other).
This will be corrected before v1.0
It was developed before much of the rest of the package, and
thus has some severe violations of modularity - passing
methods back and forth between objects, etc.
AKA it was developed much before I knew how Python worked.
These classes implement the GUI used by the Terminal.
That being said...
The GUI is built using `PySide <https://pypi.org/project/PySide/>`_, a Python wrapper around Qt4.
These classes implement the GUI used by the Terminal.
These classes are all currently used only by the :class:`~.autopilot.core.terminal.Terminal`.
If performing any GUI operations in another thread (eg. as a callback from a networking object),
the method must be decorated with `@gui_event` which will call perform the update in the main thread as required by Qt.
"""

import sys
@@ -36,7 +39,7 @@
from autopilot.core.networking import Net_Node
from functools import wraps
from autopilot.core.utils import InvokeEvent
from autopilot.core.plots import gui_event
#from autopilot.core.plots import gui_event
from autopilot.core import styles

import pdb
@@ -620,23 +620,23 @@ class Terminal_Station(Station):
+-------------+-------------------------------------------+-----------------------------------------------+
| Key | Method | Description |
+=============+===========================================+===============================================+
| 'PING' | :meth:`~.Terminal_Station.l_ping` | We are asked to confirm that we are alive |
| 'PING' | :meth:`~.Terminal_Station.l_ping` | We are asked to confirm that we are alive |
+-------------+-------------------------------------------+-----------------------------------------------+
| 'INIT' | :meth:`~.Terminal_Station.l_init` | Ask all pilots to confirm that they are alive |
| 'INIT' | :meth:`~.Terminal_Station.l_init` | Ask all pilots to confirm that they are alive |
+-------------+-------------------------------------------+-----------------------------------------------+
| 'CHANGE' | :meth:`~.Terminal_Station.l_change` | Change a parameter on the Pi |
| 'CHANGE' | :meth:`~.Terminal_Station.l_change` | Change a parameter on the Pi |
+-------------+-------------------------------------------+-----------------------------------------------+
| 'STOPALL' | :meth:`~.Terminal_Station.l_stopall` | Stop all pilots and plots |
| 'STOPALL' | :meth:`~.Terminal_Station.l_stopall` | Stop all pilots and plots |
+-------------+-------------------------------------------+-----------------------------------------------+
| 'KILL' | :meth:`~.Terminal_Station.l_kill` | Terminal wants us to die :( |
| 'KILL' | :meth:`~.Terminal_Station.l_kill` | Terminal wants us to die :( |
+-------------+-------------------------------------------+-----------------------------------------------+
| 'DATA' | :meth:`~.Terminal_Station.l_data` | Stash incoming data from a Pilot |
| 'DATA' | :meth:`~.Terminal_Station.l_data` | Stash incoming data from a Pilot |
+-------------+-------------------------------------------+-----------------------------------------------+
| 'STATE' | :meth:`~.Terminal_Station.l_state` | A Pilot has changed state |
| 'STATE' | :meth:`~.Terminal_Station.l_state` | A Pilot has changed state |
+-------------+-------------------------------------------+-----------------------------------------------+
| 'HANDSHAKE' | :meth:`~.Terminal_Station.l_handshake` | A Pi is telling us it's alive and its IP |
| 'HANDSHAKE' | :meth:`~.Terminal_Station.l_handshake` | A Pi is telling us it's alive and its IP |
+-------------+-------------------------------------------+-----------------------------------------------+
| 'FILE' | :meth:`~.Terminal_Station.l_file` | The pi needs some file from us |
| 'FILE' | :meth:`~.Terminal_Station.l_file` | The pi needs some file from us |
+-------------+-------------------------------------------+-----------------------------------------------+
"""
@@ -843,13 +843,13 @@ class Pilot_Station(Station):
+-------------+-------------------------------------+-----------------------------------------------+
| Key | Method | Description |
+=============+=====================================+===============================================+
| 'STATE' | :meth:`~.Pilot_Station.l_state` | Pilot has changed state |
| 'COHERE' | :meth:`~.Pilot_Station.l_cohere` | Make sure our data and the Terminal's match. |
| 'PING' | :meth:`~.Pilot_Station.l_ping` | The Terminal wants to know if we're listening |
| 'START' | :meth:`~.Pilot_Station.l_start` | We are being sent a task to start |
| 'STOP' | :meth:`~.Pilot_Station.l_stop` | We are being told to stop the current task |
| 'PARAM' | :meth:`~.Pilot_Station.l_change` | The Terminal is changing some task parameter |
| 'FILE' | :meth:`~.Pilot_Station.l_file` | We are receiving a file |
| 'STATE' | :meth:`~.Pilot_Station.l_state` | Pilot has changed state |
| 'COHERE' | :meth:`~.Pilot_Station.l_cohere` | Make sure our data and the Terminal's match. |
| 'PING' | :meth:`~.Pilot_Station.l_ping` | The Terminal wants to know if we're listening |
| 'START' | :meth:`~.Pilot_Station.l_start` | We are being sent a task to start |
| 'STOP' | :meth:`~.Pilot_Station.l_stop` | We are being told to stop the current task |
| 'PARAM' | :meth:`~.Pilot_Station.l_change` | The Terminal is changing some task parameter |
| 'FILE' | :meth:`~.Pilot_Station.l_file` | We are receiving a file |
+-------------+-------------------------------------+-----------------------------------------------+
"""
@@ -1,4 +1,6 @@
"""
Tools to visulize data after collection.
Warning:
this module is unfinished, so it is undocumented.
"""
@@ -22,11 +22,21 @@
<script type="text/javascript" src="../../../_static/js/modernizr.min.js"></script>


<script type="text/javascript" id="documentation_options" data-url_root="../../../" src="../../../_static/documentation_options.js"></script>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../../',
VERSION:'0.2',
LANGUAGE:'None',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" src="../../../_static/jquery.js"></script>
<script type="text/javascript" src="../../../_static/underscore.js"></script>
<script type="text/javascript" src="../../../_static/doctools.js"></script>
<script type="text/javascript" src="../../../_static/language_data.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>

<script type="text/javascript" src="../../../_static/js/theme.js"></script>

@@ -35,7 +45,6 @@

<link rel="stylesheet" href="../../../_static/css/autopilot_theme.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/graphviz.css" type="text/css" />
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />

@@ -97,9 +106,16 @@

<p class="caption"><span class="caption-text">User Guide:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../guide.overview.html">Overview</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../guide.overview.html">Overview</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../../../guide.overview.html#concepts-and-terms-in-autopilot">Concepts and Terms in Autopilot</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../guide.overview.html#program-structure-overview">Program Structure Overview</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../guide.overview.html#tasks">Tasks</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../guide.overview.html#hardware">Hardware</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../guide.overview.html#agents">Agents</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../../guide.installation.html">Installation</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../../../guide.installation.pilot.html">Setup a Pilot</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../../../guide.installation.pilot.html">Pilot Setup</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../../../guide.installation.pilot.html#scripted-installation">Scripted Installation</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../guide.installation.pilot.html#manual-preinstall">Manual Preinstall</a><ul>
<li class="toctree-l4"><a class="reference internal" href="../../../guide.installation.pilot.html#rasbian-installation">Rasbian Installation</a></li>
@@ -111,7 +127,7 @@
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../../guide.installation.terminal.html">Setup a Terminal</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../../../guide.installation.terminal.html">Terminal Setup</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../../../guide.installation.terminal.html#prerequisites">Prerequisites</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../guide.installation.terminal.html#scripted-terminal-setup">Scripted Terminal Setup</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../guide.installation.terminal.html#manual-terminal-presetup">Manual Terminal Presetup</a><ul>
@@ -159,7 +175,7 @@
<li class="toctree-l2"><a class="reference internal" href="../../../guide.task.html#distributed-go-no-go-using-child-agents">Distributed Go/No-Go - Using Child Agents</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../../../guide.task.html#additional-prefs">Additional Prefs</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../guide.task.html#go-no-go-parameterization">Go/No-Go Parameterization</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../guide.task.html#id5">Initialization</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../guide.task.html#id1">Initialization</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../guide.task.html#the-child-task">The Child Task</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../guide.task.html#a-very-smart-wheel">A Very Smart Wheel</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../guide.task.html#go-no-go-stage-methods">Go/No-Go Stage Methods</a></li>
@@ -185,6 +201,7 @@
<li class="toctree-l2"><a class="reference internal" href="../../../autopilot.core.networking.html">networking</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../autopilot.core.pilot.html">pilot</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../autopilot.core.plots.html">plots</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../autopilot.core.styles.html">styles</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../autopilot.core.subject.html">subject</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../autopilot.core.terminal.html">terminal</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../autopilot.core.utils.html">utils</a></li>
@@ -222,6 +239,13 @@
<p class="caption"><span class="caption-text">Meta:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../todo.html">To-Do</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../changelog/index.html">Changelog</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../../../changelog/index.html#version-0-2">Version 0.2</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../../../changelog/v0.2.0.html">v0.2.0 (October 26, 2019)</a></li>
</ul>
</li>
</ul>
</li>
</ul>


@@ -287,17 +311,20 @@
<h1>Source code for autopilot.core.gui</h1><div class="highlight"><pre>
<span></span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd">Note:</span>
<span class="sd"> Let&#39;s start by saying all the GUI code is a little screwy.</span>
<span class="sd"> Currently, the GUI code is some of the oldest code in the library --</span>
<span class="sd"> in particular much of it was developed before the network infrastructure was mature.</span>
<span class="sd"> As a result, a lot of modules are interdependent (eg. pass objects between each other).</span>
<span class="sd"> This will be corrected before v1.0</span>


<span class="sd"> It was developed before much of the rest of the package, and</span>
<span class="sd"> thus has some severe violations of modularity - passing</span>
<span class="sd"> methods back and forth between objects, etc.</span>
<span class="sd">These classes implement the GUI used by the Terminal.</span>

<span class="sd"> AKA it was developed much before I knew how Python worked.</span>
<span class="sd">The GUI is built using `PySide &lt;https://pypi.org/project/PySide/&gt;`_, a Python wrapper around Qt4.</span>

<span class="sd"> That being said...</span>
<span class="sd">These classes are all currently used only by the :class:`~.autopilot.core.terminal.Terminal`.</span>

<span class="sd">These classes implement the GUI used by the Terminal.</span>
<span class="sd">If performing any GUI operations in another thread (eg. as a callback from a networking object),</span>
<span class="sd">the method must be decorated with `@gui_event` which will call perform the update in the main thread as required by Qt.</span>
<span class="sd">&quot;&quot;&quot;</span>

<span class="kn">import</span> <span class="nn">sys</span>
@@ -323,7 +350,8 @@ <h1>Source code for autopilot.core.gui</h1><div class="highlight"><pre>
<span class="kn">from</span> <span class="nn">autopilot.core.networking</span> <span class="kn">import</span> <span class="n">Net_Node</span>
<span class="kn">from</span> <span class="nn">functools</span> <span class="kn">import</span> <span class="n">wraps</span>
<span class="kn">from</span> <span class="nn">autopilot.core.utils</span> <span class="kn">import</span> <span class="n">InvokeEvent</span>
<span class="kn">from</span> <span class="nn">autopilot.core.plots</span> <span class="kn">import</span> <span class="n">gui_event</span>
<span class="c1">#from autopilot.core.plots import gui_event</span>
<span class="kn">from</span> <span class="nn">autopilot.core</span> <span class="kn">import</span> <span class="n">styles</span>

<span class="kn">import</span> <span class="nn">pdb</span>
<span class="kn">import</span> <span class="nn">time</span>
@@ -421,6 +449,7 @@ <h1>Source code for autopilot.core.gui</h1><div class="highlight"><pre>
<span class="bp">self</span><span class="o">.</span><span class="n">init_ui</span><span class="p">()</span>

<span class="bp">self</span><span class="o">.</span><span class="n">setSizePolicy</span><span class="p">(</span><span class="n">QtGui</span><span class="o">.</span><span class="n">QSizePolicy</span><span class="o">.</span><span class="n">Maximum</span><span class="p">,</span><span class="n">QtGui</span><span class="o">.</span><span class="n">QSizePolicy</span><span class="o">.</span><span class="n">Maximum</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">setStyleSheet</span><span class="p">(</span><span class="n">styles</span><span class="o">.</span><span class="n">CONTROL_PANEL</span><span class="p">)</span>

<div class="viewcode-block" id="Control_Panel.init_ui"><a class="viewcode-back" href="../../../autopilot.core.gui.html#autopilot.core.gui.Control_Panel.init_ui">[docs]</a> <span class="k">def</span> <span class="nf">init_ui</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
@@ -666,7 +695,7 @@ <h1>Source code for autopilot.core.gui</h1><div class="highlight"><pre>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="c1"># type: () -&gt; None</span>
<span class="n">label</span> <span class="o">=</span> <span class="n">QtGui</span><span class="o">.</span><span class="n">QLabel</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">pilot</span><span class="p">)</span>
<span class="n">label</span><span class="o">.</span><span class="n">setStyleSheet</span><span class="p">(</span><span class="s2">&quot;font: bold 14pt; text-align:right;&quot;</span><span class="p">)</span>
<span class="n">label</span><span class="o">.</span><span class="n">setStyleSheet</span><span class="p">(</span><span class="s2">&quot;font: bold 14pt; text-align:right&quot;</span><span class="p">)</span>
<span class="n">label</span><span class="o">.</span><span class="n">setAlignment</span><span class="p">(</span><span class="n">QtCore</span><span class="o">.</span><span class="n">Qt</span><span class="o">.</span><span class="n">AlignVCenter</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">button</span> <span class="o">=</span> <span class="n">Pilot_Button</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">pilot</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">subject_list</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">start_fn</span><span class="p">)</span>
<span class="n">add_button</span> <span class="o">=</span> <span class="n">QtGui</span><span class="o">.</span><span class="n">QPushButton</span><span class="p">(</span><span class="s2">&quot;+&quot;</span><span class="p">)</span>

0 comments on commit ccde014

Please sign in to comment.
You can’t perform that action at this time.