فهرست منبع

Fixed signalling + remade docs

rparedis 5 سال پیش
والد
کامیت
78e87a80f2
53فایلهای تغییر یافته به همراه531 افزوده شده و 1994 حذف شده
  1. 3 3
      doc/CBD.lib.endpoints.rst
  2. BIN
      doc/_build/doctrees/CBD.lib.doctree
  3. BIN
      doc/_build/doctrees/CBD.lib.endpoints.doctree
  4. BIN
      doc/_build/doctrees/CBD.lib.interface.doctree
  5. BIN
      doc/_build/doctrees/CBD.lib.interface.endpoints.doctree
  6. BIN
      doc/_build/doctrees/CBD.lib.interface.plotting.doctree
  7. BIN
      doc/_build/doctrees/CBD.realtime.plotting.doctree
  8. BIN
      doc/_build/doctrees/CBD.simulator.doctree
  9. BIN
      doc/_build/doctrees/environment.pickle
  10. BIN
      doc/_build/doctrees/examples/LivePlot.doctree
  11. BIN
      doc/_build/doctrees/examples/RealTime.doctree
  12. 2 2
      doc/_build/html/CBD.CBD.html
  13. 1 11
      doc/_build/html/CBD.html
  14. 85 56
      doc/_build/html/CBD.lib.interface.endpoints.html
  15. 3 18
      doc/_build/html/CBD.lib.html
  16. 0 469
      doc/_build/html/CBD.lib.interface.html
  17. 0 596
      doc/_build/html/CBD.lib.interface.plotting.html
  18. 4 4
      doc/_build/html/CBD.lib.std.html
  19. 21 15
      doc/_build/html/CBD.realtime.plotting.html
  20. 58 0
      doc/_build/html/CBD.simulator.html
  21. 80 57
      doc/_build/html/_modules/CBD/lib/interface/endpoints.html
  22. 0 551
      doc/_build/html/_modules/CBD/lib/interface/plotting.html
  23. 41 27
      doc/_build/html/_modules/CBD/realtime/plotting.html
  24. 53 1
      doc/_build/html/_modules/CBD/simulator.html
  25. 1 2
      doc/_build/html/_modules/index.html
  26. 7 0
      doc/_build/html/_sources/CBD.lib.endpoints.rst.txt
  27. 0 7
      doc/_build/html/_sources/CBD.lib.interface.endpoints.rst.txt
  28. 0 7
      doc/_build/html/_sources/CBD.lib.interface.plotting.rst.txt
  29. 0 16
      doc/_build/html/_sources/CBD.lib.interface.rst.txt
  30. 1 7
      doc/_build/html/_sources/CBD.lib.rst.txt
  31. 20 5
      doc/_build/html/_sources/examples/LivePlot.rst.txt
  32. 1 1
      doc/_build/html/_sources/examples/RealTime.rst.txt
  33. 18 5
      doc/_build/html/examples/LivePlot.html
  34. 1 1
      doc/_build/html/examples/RealTime.html
  35. 47 64
      doc/_build/html/genindex.html
  36. 0 1
      doc/_build/html/modules.html
  37. BIN
      doc/_build/html/objects.inv
  38. 1 11
      doc/_build/html/py-modindex.html
  39. 1 1
      doc/_build/html/searchindex.js
  40. 2 2
      doc/examples/LivePlot.rst
  41. 1 1
      examples/EvenNumberGen/EvenNumberGen_experiment.py
  42. 2 2
      examples/LCG/LCG_experiment.py
  43. 1 1
      examples/SinGen/SinGen_experiment.py
  44. 1 1
      examples/SinGen/bkh.py
  45. 1 1
      examples/SinGen/mpl.py
  46. 1 1
      examples/StateEventLocation/StateEventLocation.py
  47. 1 1
      examples/StateEventLocation/StateEventLocation_experiment.py
  48. 5 4
      examples/notebook/.ipynb_checkpoints/SinGen-checkpoint.ipynb
  49. 5 4
      examples/notebook/SinGen.ipynb
  50. 26 3
      src/CBD/lib/endpoints.py
  51. 22 28
      src/CBD/realtime/plotting.py
  52. 12 6
      src/CBD/simulator.py
  53. 2 1
      whishlist.txt

+ 3 - 3
doc/CBD.lib.endpoints.rst

@@ -1,7 +1,7 @@
-CBD.lib.interface.endpoints module
-==================================
+CBD.lib.endpoints module
+========================
 
-.. automodule:: CBD.lib.interface.endpoints
+.. automodule:: CBD.lib.endpoints
     :members:
     :undoc-members:
     :show-inheritance:

BIN
doc/_build/doctrees/CBD.lib.doctree


BIN
doc/_build/doctrees/CBD.lib.endpoints.doctree


BIN
doc/_build/doctrees/CBD.lib.interface.doctree


BIN
doc/_build/doctrees/CBD.lib.interface.endpoints.doctree


BIN
doc/_build/doctrees/CBD.lib.interface.plotting.doctree


BIN
doc/_build/doctrees/CBD.realtime.plotting.doctree


BIN
doc/_build/doctrees/CBD.simulator.doctree


BIN
doc/_build/doctrees/environment.pickle


BIN
doc/_build/doctrees/examples/LivePlot.doctree


BIN
doc/_build/doctrees/examples/RealTime.doctree


+ 2 - 2
doc/_build/html/CBD.CBD.html

@@ -31,7 +31,7 @@
     <link rel="index" title="Index" href="genindex.html" />
     <link rel="search" title="Search" href="search.html" />
     <link rel="next" title="CBD.CBD2LaTeX module" href="CBD.CBD2LaTeX.html" />
-    <link rel="prev" title="CBD.lib.std module" href="CBD.lib.std.html" /> 
+    <link rel="prev" title="CBD.lib.endpoints module" href="CBD.lib.endpoints.html" /> 
 
   
   <script async src="https://www.googletagmanager.com/gtag/js?id=UA-167094275-1"></script>
@@ -833,7 +833,7 @@ signal.</p>
         <a href="CBD.CBD2LaTeX.html" class="btn btn-neutral float-right" title="CBD.CBD2LaTeX module" accesskey="n" rel="next">Next <img src="_static/images/chevron-right-orange.svg" class="next-page"></a>
       
       
-        <a href="CBD.lib.std.html" class="btn btn-neutral" title="CBD.lib.std module" accesskey="p" rel="prev"><img src="_static/images/chevron-right-orange.svg" class="previous-page"> Previous</a>
+        <a href="CBD.lib.endpoints.html" class="btn btn-neutral" title="CBD.lib.endpoints module" accesskey="p" rel="prev"><img src="_static/images/chevron-right-orange.svg" class="previous-page"> Previous</a>
       
     </div>
   

+ 1 - 11
doc/_build/html/CBD.html

@@ -278,19 +278,9 @@
 <div class="toctree-wrapper compound">
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="CBD.lib.html">Standard CBD Library (BBL)</a><ul>
-<li class="toctree-l2"><a class="reference internal" href="CBD.lib.html#subpackages">Subpackages</a><ul>
-<li class="toctree-l3"><a class="reference internal" href="CBD.lib.interface.html">CBD.lib.interface package</a><ul>
-<li class="toctree-l4"><a class="reference internal" href="CBD.lib.interface.html#submodules">Submodules</a><ul>
-<li class="toctree-l5"><a class="reference internal" href="CBD.lib.interface.endpoints.html">CBD.lib.interface.endpoints module</a></li>
-<li class="toctree-l5"><a class="reference internal" href="CBD.lib.interface.plotting.html">CBD.lib.interface.plotting module</a></li>
-</ul>
-</li>
-</ul>
-</li>
-</ul>
-</li>
 <li class="toctree-l2"><a class="reference internal" href="CBD.lib.html#submodules">Submodules</a><ul>
 <li class="toctree-l3"><a class="reference internal" href="CBD.lib.std.html">CBD.lib.std module</a></li>
+<li class="toctree-l3"><a class="reference internal" href="CBD.lib.endpoints.html">CBD.lib.endpoints module</a></li>
 </ul>
 </li>
 </ul>

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 85 - 56
doc/_build/html/CBD.lib.interface.endpoints.html


+ 3 - 18
doc/_build/html/CBD.lib.html

@@ -30,7 +30,7 @@
   <link rel="stylesheet" href="_static/style.css" type="text/css" />
     <link rel="index" title="Index" href="genindex.html" />
     <link rel="search" title="Search" href="search.html" />
-    <link rel="next" title="CBD.lib.interface package" href="CBD.lib.interface.html" />
+    <link rel="next" title="CBD.lib.std module" href="CBD.lib.std.html" />
     <link rel="prev" title="CBD package" href="CBD.html" /> 
 
   
@@ -275,26 +275,12 @@
               
   <div class="section" id="module-CBD.lib">
 <span id="standard-cbd-library-bbl"></span><h1>Standard CBD Library (BBL)<a class="headerlink" href="#module-CBD.lib" title="Permalink to this headline">¶</a></h1>
-<div class="section" id="subpackages">
-<h2>Subpackages<a class="headerlink" href="#subpackages" title="Permalink to this headline">¶</a></h2>
-<div class="toctree-wrapper compound">
-<ul>
-<li class="toctree-l1"><a class="reference internal" href="CBD.lib.interface.html">CBD.lib.interface package</a><ul>
-<li class="toctree-l2"><a class="reference internal" href="CBD.lib.interface.html#submodules">Submodules</a><ul>
-<li class="toctree-l3"><a class="reference internal" href="CBD.lib.interface.endpoints.html">CBD.lib.interface.endpoints module</a></li>
-<li class="toctree-l3"><a class="reference internal" href="CBD.lib.interface.plotting.html">CBD.lib.interface.plotting module</a></li>
-</ul>
-</li>
-</ul>
-</li>
-</ul>
-</div>
-</div>
 <div class="section" id="submodules">
 <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this headline">¶</a></h2>
 <div class="toctree-wrapper compound">
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="CBD.lib.std.html">CBD.lib.std module</a></li>
+<li class="toctree-l1"><a class="reference internal" href="CBD.lib.endpoints.html">CBD.lib.endpoints module</a></li>
 </ul>
 </div>
 </div>
@@ -308,7 +294,7 @@
   
     <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
       
-        <a href="CBD.lib.interface.html" class="btn btn-neutral float-right" title="CBD.lib.interface package" accesskey="n" rel="next">Next <img src="_static/images/chevron-right-orange.svg" class="next-page"></a>
+        <a href="CBD.lib.std.html" class="btn btn-neutral float-right" title="CBD.lib.std module" accesskey="n" rel="next">Next <img src="_static/images/chevron-right-orange.svg" class="next-page"></a>
       
       
         <a href="CBD.html" class="btn btn-neutral" title="CBD package" accesskey="p" rel="prev"><img src="_static/images/chevron-right-orange.svg" class="previous-page"> Previous</a>
@@ -340,7 +326,6 @@
             <div class="catalyst-side-scroll" id="catalyst-side-scroll-right">
               <ul>
 <li><a class="reference internal" href="#">Standard CBD Library (BBL)</a><ul>
-<li><a class="reference internal" href="#subpackages">Subpackages</a></li>
 <li><a class="reference internal" href="#submodules">Submodules</a></li>
 </ul>
 </li>

+ 0 - 469
doc/_build/html/CBD.lib.interface.html

@@ -1,469 +0,0 @@
-
-
-
-<!DOCTYPE html>
-<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
-<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
-<head>
-  <meta charset="utf-8">
-  
-  <meta name="viewport" content="width=device-width, initial-scale=1.0">
-  
-  <title>CBD.lib.interface package &mdash; CBD Simulation Development Kit  documentation</title>
-  
-
-  
-  
-  
-  
-
-  
-
-  
-  
-    
-
-  
-
-  <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
-  <!-- <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> -->
-  <link rel="stylesheet" href="_static/style.css" type="text/css" />
-    <link rel="index" title="Index" href="genindex.html" />
-    <link rel="search" title="Search" href="search.html" />
-    <link rel="next" title="CBD.lib.interface.endpoints module" href="CBD.lib.interface.endpoints.html" />
-    <link rel="prev" title="Standard CBD Library (BBL)" href="CBD.lib.html" /> 
-
-  
-  <script async src="https://www.googletagmanager.com/gtag/js?id=UA-167094275-1"></script>
-  <script src="_static/js/googleanalytics.min.js"></script>
-  
-  <script src="_static/js/modernizr.min.js"></script>
-
-  <!-- Preload the theme fonts -->
-
-<link rel="preload" href="_static/fonts/FreightSans/freight-sans-book.woff2" as="font" type="font/woff2" crossorigin="anonymous">
-<link rel="preload" href="_static/fonts/FreightSans/freight-sans-medium.woff2" as="font" type="font/woff2" crossorigin="anonymous">
-<link rel="preload" href="_static/fonts/IBMPlexMono/IBMPlexMono-Medium.woff2" as="font" type="font/woff2" crossorigin="anonymous">
-<link rel="preload" href="_static/fonts/FreightSans/freight-sans-bold.woff2" as="font" type="font/woff2" crossorigin="anonymous">
-<link rel="preload" href="_static/fonts/FreightSans/freight-sans-medium-italic.woff2" as="font" type="font/woff2" crossorigin="anonymous">
-<link rel="preload" href="_static/fonts/IBMPlexMono/IBMPlexMono-SemiBold.woff2" as="font" type="font/woff2" crossorigin="anonymous">
-
-<!-- Preload the katex fonts -->
-
-<link rel="preload" href="https://cdn.jsdelivr.net/npm/katex@0.10.0/dist/fonts/KaTeX_Math-Italic.woff2" as="font" type="font/woff2" crossorigin="anonymous">
-<link rel="preload" href="https://cdn.jsdelivr.net/npm/katex@0.10.0/dist/fonts/KaTeX_Main-Regular.woff2" as="font" type="font/woff2" crossorigin="anonymous">
-<link rel="preload" href="https://cdn.jsdelivr.net/npm/katex@0.10.0/dist/fonts/KaTeX_Main-Bold.woff2" as="font" type="font/woff2" crossorigin="anonymous">
-<link rel="preload" href="https://cdn.jsdelivr.net/npm/katex@0.10.0/dist/fonts/KaTeX_Size1-Regular.woff2" as="font" type="font/woff2" crossorigin="anonymous">
-<link rel="preload" href="https://cdn.jsdelivr.net/npm/katex@0.10.0/dist/fonts/KaTeX_Size4-Regular.woff2" as="font" type="font/woff2" crossorigin="anonymous">
-<link rel="preload" href="https://cdn.jsdelivr.net/npm/katex@0.10.0/dist/fonts/KaTeX_Size2-Regular.woff2" as="font" type="font/woff2" crossorigin="anonymous">
-<link rel="preload" href="https://cdn.jsdelivr.net/npm/katex@0.10.0/dist/fonts/KaTeX_Size3-Regular.woff2" as="font" type="font/woff2" crossorigin="anonymous">
-<link rel="preload" href="https://cdn.jsdelivr.net/npm/katex@0.10.0/dist/fonts/KaTeX_Caligraphic-Regular.woff2" as="font" type="font/woff2" crossorigin="anonymous">
-</head>
-
-<div class="container-fluid header-holder tutorials-header" id="header-holder">
-  <div class="container">
-    <div class="header-container">
-      <a class="header-logo" href="https://catalyst-team.com/" aria-label="Catalyst"></a>
-
-      <div class="main-menu">
-        <ul>
-
-          <li>
-            <div class="ecosystem-dropdown">
-              <a id="dropdownMenuButtonEcosystem" data-toggle="ecosystem-dropdown">
-                Ecosystem
-              </a>
-              <div class="ecosystem-dropdown-menu">
-                <a class="nav-dropdown-item" href="https://alchemy.host">
-                  <span class=dropdown-title>Alchemy</span>
-                  <p>Experiments logging & visualization</p>
-                </a>
-                <a class="nav-dropdown-item" href="https://github.com/catalyst-team/catalyst">
-                  <span class=dropdown-title>Catalyst</span>
-                  <p>Accelerated deep learning R&D</p>
-                </a>
-                <a class="nav-dropdown-item" href="https://github.com/catalyst-team/reaction">
-                  <span class=dropdown-title>Reaction</span>
-                  <p>Convenient deep learning models serving</p>
-                </a>
-              </div>
-            </div>
-          </li>
-
-          <li>
-            <div class="projects-dropdown">
-              <a id="dropdownMenuButtonProjects" data-toggle="projects-dropdown">
-                Projects
-              </a>
-              <div class="projects-dropdown-menu">
-                <a class="nav-dropdown-item" href="https://github.com/catalyst-team/codestyle">
-                  <span class=dropdown-title>Codestyle</span>
-                  <p>Joint R&D codestyle</p>
-                </a>
-                <a class="nav-dropdown-item" href="https://github.com/catalyst-team/neuro">
-                  <span class=dropdown-title>Catalyst.Neuro</span>
-                  <p>Catalyst.Team and TReNDS collaborative project</p>
-                </a>
-                <a class="nav-dropdown-item" href="https://github.com/catalyst-team/classification">
-                  <span class=dropdown-title>Classification</span>
-                  <p>Image classification pipeline with transfer learning</p>
-                </a>
-                <a class="nav-dropdown-item" href="https://github.com/catalyst-team/detection">
-                  <span class=dropdown-title>Detection</span>
-                  <p>Object detection pipeline</p>
-                </a>
-                <a class="nav-dropdown-item" href="https://github.com/catalyst-team/segmentation">
-                  <span class=dropdown-title>Segmentation</span>
-                  <p>Image semantic segmentation pipeline</p>
-                </a>
-                <a class="nav-dropdown-item" href="https://github.com/catalyst-team/gan">
-                  <span class=dropdown-title>Catalyst.GAN</span>
-                  <p>GAN pipelines</p>
-                </a>
-              </div>
-            </div>
-          </li>
-
-          <li>
-            <a href="https://github.com/catalyst-team/dl-course">Deep learning course</a>
-          </li>
-        </ul>
-      </div>
-
-      <a class="main-menu-open-button" href="#" data-behavior="open-mobile-menu"></a>
-    </div>
-
-  </div>
-</div>
-
-
-<body class="catalyst-body">
-
-   
-
-    
-
-    <div class="table-of-contents-link-wrapper">
-      <span>Table of Contents</span>
-      <a href="#" class="toggle-table-of-contents" data-behavior="toggle-table-of-contents"></a>
-    </div>
-
-    <nav data-toggle="wy-nav-shift" class="catalyst-left-menu" id="catalyst-left-menu">
-      <div class="catalyst-side-scroll">
-        <div class="catalyst-menu catalyst-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
-          <div class="catalyst-left-menu-search">
-            
-
-            
-              
-              
-            
-
-            
-
-
-  
-
-
-<div role="search">
-  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
-    <input type="text" name="q" placeholder="Search Docs" />
-    <input type="hidden" name="check_keywords" value="yes" />
-    <input type="hidden" name="area" value="default" />
-  </form>
-</div>
-
-            
-          </div>
-
-          
-            
-            
-              
-            
-            
-              <p class="caption"><span class="caption-text">Setup</span></p>
-<ul>
-<li class="toctree-l1"><a class="reference internal" href="install.html">How to install the CBD framework?</a></li>
-<li class="toctree-l1"><a class="reference internal" href="running.html">How to run a CBD simulation?</a></li>
-<li class="toctree-l1"><a class="reference internal" href="changelog.html">Changelog</a></li>
-</ul>
-<p class="caption"><span class="caption-text">Simple Examples</span></p>
-<ul>
-<li class="toctree-l1"><a class="reference internal" href="examples/SinGen.html">Sine Generator</a></li>
-<li class="toctree-l1"><a class="reference internal" href="examples/EvenNumberGen.html">Hierarchical Even Number Generator</a></li>
-<li class="toctree-l1"><a class="reference internal" href="examples/Fibonacci.html">Fibonacci Sequence Generator</a></li>
-<li class="toctree-l1"><a class="reference internal" href="examples/LCG.html">Linear Congruential Generator</a></li>
-</ul>
-<p class="caption"><span class="caption-text">Advanced Examples</span></p>
-<ul>
-<li class="toctree-l1"><a class="reference internal" href="examples/RealTime.html">Realtime Simulation</a></li>
-<li class="toctree-l1"><a class="reference internal" href="examples/LivePlot.html">Live Plotting of Data During the Simulation</a></li>
-</ul>
-<p class="caption"><span class="caption-text">Internal Documentation</span></p>
-<ul class="current">
-<li class="toctree-l1 current"><a class="reference internal" href="CBD.html">CBD package</a></li>
-</ul>
-
-            
-          
-        </div>
-      </div>
-    </nav>
-
-    <div class="catalyst-container">
-      <div class="catalyst-page-level-bar" id="catalyst-page-level-bar">
-        <div class="catalyst-breadcrumbs-wrapper">
-          
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-<div role="navigation" aria-label="breadcrumbs navigation">
-
-  <ul class="catalyst-breadcrumbs">
-    
-      <li>
-        <a href="index.html">
-          
-            Docs
-          
-        </a> &gt;
-      </li>
-
-        
-          <li><a href="CBD.html">CBD package</a> &gt;</li>
-        
-          <li><a href="CBD.lib.html">Standard CBD Library (BBL)</a> &gt;</li>
-        
-      <li>CBD.lib.interface package</li>
-    
-    
-      <li class="catalyst-breadcrumbs-aside">
-        
-            
-        
-      </li>
-    
-  </ul>
-
-  
-</div>
-        </div>
-
-        <div class="catalyst-shortcuts-wrapper" id="catalyst-shortcuts-wrapper">
-          Shortcuts
-        </div>
-      </div>
-
-      <section data-toggle="wy-nav-shift" id="catalyst-content-wrap" class="catalyst-content-wrap">
-        <div class="catalyst-content-left">
-          
-          <div class="rst-content">
-          
-            <div role="main" class="main-content" itemscope="itemscope" itemtype="http://schema.org/Article">
-             <article itemprop="articleBody" id="catalyst-article" class="catalyst-article">
-              
-  <div class="section" id="module-CBD.lib.interface">
-<span id="cbd-lib-interface-package"></span><h1>CBD.lib.interface package<a class="headerlink" href="#module-CBD.lib.interface" title="Permalink to this headline">¶</a></h1>
-<div class="section" id="submodules">
-<h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this headline">¶</a></h2>
-<div class="toctree-wrapper compound">
-<ul>
-<li class="toctree-l1"><a class="reference internal" href="CBD.lib.interface.endpoints.html">CBD.lib.interface.endpoints module</a></li>
-<li class="toctree-l1"><a class="reference internal" href="CBD.lib.interface.plotting.html">CBD.lib.interface.plotting module</a></li>
-</ul>
-</div>
-</div>
-</div>
-
-
-             </article>
-             
-            </div>
-            <footer>
-  
-    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
-      
-        <a href="CBD.lib.interface.endpoints.html" class="btn btn-neutral float-right" title="CBD.lib.interface.endpoints module" accesskey="n" rel="next">Next <img src="_static/images/chevron-right-orange.svg" class="next-page"></a>
-      
-      
-        <a href="CBD.lib.html" class="btn btn-neutral" title="Standard CBD Library (BBL)" accesskey="p" rel="prev"><img src="_static/images/chevron-right-orange.svg" class="previous-page"> Previous</a>
-      
-    </div>
-  
-
-  <hr>
-
-  <div role="contentinfo">
-    <p>
-        &copy; Copyright 2020, Randy Paredis.
-
-    </p>
-  </div>
-    
-      <div>
-        Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
-      </div>
-     
-
-</footer>
-
-          </div>
-        </div>
-
-        <div class="catalyst-content-right" id="catalyst-content-right">
-          <div class="catalyst-right-menu" id="catalyst-right-menu">
-            <div class="catalyst-side-scroll" id="catalyst-side-scroll-right">
-              <ul>
-<li><a class="reference internal" href="#">CBD.lib.interface package</a><ul>
-<li><a class="reference internal" href="#submodules">Submodules</a></li>
-</ul>
-</li>
-</ul>
-
-            </div>
-          </div>
-        </div>
-      </section>
-    </div>
-
-  
-
-
-  
-
-     
-       <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></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 async="async" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
-     
-
-  
-
-  <script type="text/javascript" src="_static/js/vendor/popper.min.js"></script>
-  <script type="text/javascript" src="_static/js/vendor/bootstrap.min.js"></script>
-  <script type="text/javascript" src="_static/js/theme.js"></script>
-
-  <script type="text/javascript">
-      jQuery(function () {
-          SphinxRtdTheme.Navigation.enable(true);
-      });
-  </script> 
-
-  <!-- Begin Footer -->
-
-  <footer class="site-footer" id="site-footer">
-    <div class="container footer-container">
-      <div class="footer-logo-wrapper">
-        <a href="https://catalyst-team.com/" class="footer-logo"></a>
-      </div>
-
-      <div class="footer-links-wrapper">
-        <div class="footer-links-col">
-          <ul>
-            <li class="list-title"><a href="https://github.com/catalyst-team">Ecosystem</a></li>
-            <li><a class="nav-dropdown-item" href="https://alchemy.host">Alchemy</a></li>
-            <li><a class="nav-dropdown-item" href="https://github.com/catalyst-team/catalyst">Catalyst</a></li>
-            <li><a class="nav-dropdown-item" href="https://github.com/catalyst-team/reaction">Reaction</a></li>
-          </ul>
-        </div>
-
-        <div class="footer-links-col">
-          <ul>
-            <li class="list-title"><a href="https://github.com/catalyst-team">Projects</a></li>
-            <li><a class="nav-dropdown-item" href="https://github.com/catalyst-team/codestyle">Codestyle</a></li>
-            <li><a class="nav-dropdown-item" href="https://github.com/catalyst-team/neuro">Catalyst.Neuro</a></li>
-            <li><a class="nav-dropdown-item" href="https://github.com/catalyst-team/classification">Classification</a></li>
-            <li><a class="nav-dropdown-item" href="https://github.com/catalyst-team/detection">Detection</a></li>
-            <li><a class="nav-dropdown-item" href="https://github.com/catalyst-team/segmentation">Segmentation</a></li>
-            <li><a class="nav-dropdown-item" href="https://github.com/catalyst-team/gan">Catalyst.GAN</a></li>
-          </ul>
-        </div>
-
-        <div class="footer-links-col">
-          <ul>
-            <li class="list-title"><a href="https://catalyst-team.com/">Support</a></li>
-            <li><a href="https://github.com/catalyst-team/catalyst/issues" target="_blank">Github Issues</a></li>
-            <li><a href="https://github.com/catalyst-team/catalyst/blob/master/CONTRIBUTING.md" target="_blank">Contributing</a></li>
-            <li><a href="https://www.patreon.com/catalyst_team" target="_blank">Patreon</a></li>
-          </ul>
-        </div>
-
-        <div class="footer-links-col follow-us-col">
-          <div class="footer-social-icons">
-            <a href="https://t.me/catalyst_team" target="_blank" class="telegram"></a>
-            <a href="https://twitter.com/catalyst_core" target="_blank" class="twitter"></a>
-            <a href="https://join.slack.com/t/catalyst-team-core/shared_invite/zt-d9miirnn-z86oKDzFMKlMG4fgFdZafw" target="_blank" class="ods"></a>
-          </div>
-        </div>
-      </div>
-    </div>
-  </footer>
-
-
-  <!-- End Footer -->
-
-  <!-- Begin Mobile Menu -->
-
-  <div class="mobile-main-menu">
-    <div class="container-fluid">
-      <div class="container">
-        <div class="mobile-main-menu-header-container">
-          <a class="header-logo" href="https://catalyst-team.com/" aria-label="Catalyst"></a>
-          <a class="main-menu-close-button" href="#" data-behavior="close-mobile-menu"></a>
-        </div>
-      </div>
-    </div>
-
-    <div class="mobile-main-menu-links-container">
-      <div class="main-menu">
-        <ul>
-          <li>
-            <a href="">Get Started</a>
-          </li>
-
-          <li>
-            <a href="https://github.com/catalyst-team/catalyst">Github</a>
-          </li>
-        </ul>
-      </div>
-    </div>
-  </div>
-
-  <!-- End Mobile Menu -->
-
-  <script type="text/javascript" src="_static/js/vendor/anchor.min.js"></script>
-
-  <script type="text/javascript">
-    $(document).ready(function() {
-      mobileMenu.bind();
-      mobileTOC.bind();
-      catalystAnchors.bind();
-      sideMenus.bind();
-      scrollToAnchor.bind();
-      highlightNavigation.bind();
-      mainMenuDropdown.bind();
-
-      // Add class to links that have code blocks, since we cannot create links in code blocks
-      $("article.catalyst-article a span.pre").each(function(e) {
-        $(this).closest("a").addClass("has-code");
-      });
-    })
-  </script>
-</body>
-</html>

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 596
doc/_build/html/CBD.lib.interface.plotting.html


+ 4 - 4
doc/_build/html/CBD.lib.std.html

@@ -30,8 +30,8 @@
   <link rel="stylesheet" href="_static/style.css" type="text/css" />
     <link rel="index" title="Index" href="genindex.html" />
     <link rel="search" title="Search" href="search.html" />
-    <link rel="next" title="CBD.CBD module" href="CBD.CBD.html" />
-    <link rel="prev" title="CBD.lib.interface.plotting module" href="CBD.lib.interface.plotting.html" /> 
+    <link rel="next" title="CBD.lib.endpoints module" href="CBD.lib.endpoints.html" />
+    <link rel="prev" title="Standard CBD Library (BBL)" href="CBD.lib.html" /> 
 
   
   <script async src="https://www.googletagmanager.com/gtag/js?id=UA-167094275-1"></script>
@@ -817,10 +817,10 @@ The block is implemented according to the trapezoid rule.</p>
   
     <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
       
-        <a href="CBD.CBD.html" class="btn btn-neutral float-right" title="CBD.CBD module" accesskey="n" rel="next">Next <img src="_static/images/chevron-right-orange.svg" class="next-page"></a>
+        <a href="CBD.lib.endpoints.html" class="btn btn-neutral float-right" title="CBD.lib.endpoints module" accesskey="n" rel="next">Next <img src="_static/images/chevron-right-orange.svg" class="next-page"></a>
       
       
-        <a href="CBD.lib.interface.plotting.html" class="btn btn-neutral" title="CBD.lib.interface.plotting module" accesskey="p" rel="prev"><img src="_static/images/chevron-right-orange.svg" class="previous-page"> Previous</a>
+        <a href="CBD.lib.html" class="btn btn-neutral" title="Standard CBD Library (BBL)" accesskey="p" rel="prev"><img src="_static/images/chevron-right-orange.svg" class="previous-page"> Previous</a>
       
     </div>
   

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 21 - 15
doc/_build/html/CBD.realtime.plotting.html


+ 58 - 0
doc/_build/html/CBD.simulator.html

@@ -625,6 +625,64 @@ after the <a class="reference internal" href="#CBD.simulator.Simulator.run" titl
 </div>
 </dd></dl>
 
+<dl class="method">
+<dt id="CBD.simulator.Simulator.connect">
+<code class="descname">connect</code><span class="sig-paren">(</span><em>name: str</em>, <em>function</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/CBD/simulator.html#Simulator.connect"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#CBD.simulator.Simulator.connect" title="Permalink to this definition">¶</a></dt>
+<dd><p>Connect an event with an additional function.</p>
+<p>The functions will be called in the order they were connected to the
+events, with the associated arguments. The accepted signals are:</p>
+<ul class="simple">
+<li><code class="code docutils literal notranslate"><span class="pre">started</span></code>: Raised whenever the simulation setup has completed,
+but before the actual simulation begins.</li>
+<li><code class="code docutils literal notranslate"><span class="pre">finished</span></code>: Raised whenever the simulation finishes.</li>
+</ul>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>name</strong> (<em>str</em>) – The name of the signal to raise.</li>
+<li><strong>function</strong> – A function that will be called with the optional arguments
+whenever the event is raised.</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="CBD.simulator.Simulator.signal">
+<code class="descname">signal</code><span class="sig-paren">(</span><em>name</em>, <em>*args</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/CBD/simulator.html#Simulator.signal"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#CBD.simulator.Simulator.signal" title="Permalink to this definition">¶</a></dt>
+<dd><p>Raise a signal with a specific name and arguments.</p>
+<p>The accepted signals are:</p>
+<ul class="simple">
+<li><code class="code docutils literal notranslate"><span class="pre">started</span></code>: Raised whenever the simulation setup has completed,
+but before the actual simulation begins.</li>
+<li><code class="code docutils literal notranslate"><span class="pre">finished</span></code>: Raised whenever the simulation finishes.</li>
+</ul>
+<div class="admonition note">
+<p class="first admonition-title">Note</p>
+<p class="last">Normally, users do not need to call this function.</p>
+</div>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>name</strong> (<em>str</em>) – The name of the signal to raise.</li>
+<li><strong>*args</strong> – Additional arguments to pass to the connected events.</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+<div class="admonition seealso">
+<p class="first admonition-title">See also</p>
+<p class="last"><a class="reference internal" href="#CBD.simulator.Simulator.connect" title="CBD.simulator.Simulator.connect"><code class="xref py py-func docutils literal notranslate"><span class="pre">connect()</span></code></a></p>
+</div>
+</dd></dl>
+
 </dd></dl>
 
 </div>

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 80 - 57
doc/_build/html/_modules/CBD/lib/interface/endpoints.html


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 551
doc/_build/html/_modules/CBD/lib/interface/plotting.html


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 41 - 27
doc/_build/html/_modules/CBD/realtime/plotting.html


+ 53 - 1
doc/_build/html/_modules/CBD/simulator.html

@@ -367,6 +367,11 @@
 		<span class="bp">self</span><span class="o">.</span><span class="n">__duration_log</span> <span class="o">=</span> <span class="p">[]</span>
 		<span class="bp">self</span><span class="o">.</span><span class="n">__lasttime</span> <span class="o">=</span> <span class="kc">None</span>
 
+		<span class="bp">self</span><span class="o">.</span><span class="n">__events</span> <span class="o">=</span> <span class="p">{</span>
+			<span class="s2">&quot;started&quot;</span><span class="p">:</span> <span class="p">[],</span>
+			<span class="s2">&quot;finished&quot;</span><span class="p">:</span> <span class="p">[]</span>
+		<span class="p">}</span>
+		
 		<span class="c1"># TODO: make this variable, given more solver implementations</span>
 		<span class="bp">self</span><span class="o">.</span><span class="n">__solver</span> <span class="o">=</span> <span class="n">GaussianJordanLinearSolver</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">__logger</span><span class="p">)</span>
 
@@ -401,6 +406,7 @@
 			<span class="bp">self</span><span class="o">.</span><span class="n">__realtime_start_time</span> <span class="o">=</span> <span class="n">time</span><span class="o">.</span><span class="n">time</span><span class="p">()</span>
 			<span class="bp">self</span><span class="o">.</span><span class="n">__lasttime</span> <span class="o">=</span> <span class="o">-</span><span class="bp">self</span><span class="o">.</span><span class="n">getDeltaT</span><span class="p">()</span>     <span class="c1"># Schedule next event at time 0</span>
 
+		<span class="bp">self</span><span class="o">.</span><span class="n">signal</span><span class="p">(</span><span class="s2">&quot;started&quot;</span><span class="p">)</span>
 		<span class="bp">self</span><span class="o">.</span><span class="n">__runsim</span><span class="p">()</span></div>
 
 	<span class="k">def</span> <span class="nf">__finish</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
@@ -411,6 +417,7 @@
 		<span class="k">if</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">__progress</span><span class="p">:</span>
 			<span class="c1"># Whenever the progress bar is initialized, wait until it ends</span>
 			<span class="bp">self</span><span class="o">.</span><span class="n">__progress_finished</span> <span class="o">=</span> <span class="kc">True</span>
+		<span class="bp">self</span><span class="o">.</span><span class="n">signal</span><span class="p">(</span><span class="s2">&quot;finished&quot;</span><span class="p">)</span>
 
 	<span class="k">def</span> <span class="nf">__check</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
 		<span class="sd">&quot;&quot;&quot;</span>
@@ -772,7 +779,52 @@
 			<span class="n">pbar</span><span class="o">.</span><span class="n">update</span><span class="p">(</span><span class="n">end</span> <span class="o">-</span> <span class="n">last</span><span class="p">)</span>
 		<span class="n">pbar</span><span class="o">.</span><span class="n">close</span><span class="p">()</span>
 		<span class="c1"># TODO: prints immediately after break pbar...</span>
-		<span class="bp">self</span><span class="o">.</span><span class="n">__progress_finished</span> <span class="o">=</span> <span class="kc">True</span></div>
+		<span class="bp">self</span><span class="o">.</span><span class="n">__progress_finished</span> <span class="o">=</span> <span class="kc">True</span>
+
+<div class="viewcode-block" id="Simulator.connect"><a class="viewcode-back" href="../../CBD.simulator.html#CBD.simulator.Simulator.connect">[docs]</a>	<span class="k">def</span> <span class="nf">connect</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">name</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">function</span><span class="p">):</span>
+		<span class="sd">&quot;&quot;&quot;</span>
+<span class="sd">		Connect an event with an additional function.</span>
+
+<span class="sd">		The functions will be called in the order they were connected to the</span>
+<span class="sd">		events, with the associated arguments. The accepted signals are:</span>
+
+<span class="sd">		- :code:`started`: Raised whenever the simulation setup has completed,</span>
+<span class="sd">		  but before the actual simulation begins.</span>
+<span class="sd">		- :code:`finished`: Raised whenever the simulation finishes.</span>
+
+<span class="sd">		Args:</span>
+<span class="sd">			name (str):     The name of the signal to raise.</span>
+<span class="sd">			function:       A function that will be called with the optional arguments</span>
+<span class="sd">							whenever the event is raised.</span>
+<span class="sd">		&quot;&quot;&quot;</span>
+		<span class="k">if</span> <span class="n">name</span> <span class="ow">not</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">__events</span><span class="p">:</span>
+			<span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s2">&quot;Invalid signal &#39;</span><span class="si">%s</span><span class="s2">&#39; in Simulator.&quot;</span> <span class="o">%</span> <span class="n">name</span><span class="p">)</span>
+		<span class="bp">self</span><span class="o">.</span><span class="n">__events</span><span class="p">[</span><span class="n">name</span><span class="p">]</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">function</span><span class="p">)</span></div>
+
+<div class="viewcode-block" id="Simulator.signal"><a class="viewcode-back" href="../../CBD.simulator.html#CBD.simulator.Simulator.signal">[docs]</a>	<span class="k">def</span> <span class="nf">signal</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">name</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">):</span>
+		<span class="sd">&quot;&quot;&quot;</span>
+<span class="sd">		Raise a signal with a specific name and arguments.</span>
+
+<span class="sd">		The accepted signals are:</span>
+
+<span class="sd">		- :code:`started`: Raised whenever the simulation setup has completed,</span>
+<span class="sd">		  but before the actual simulation begins.</span>
+<span class="sd">		- :code:`finished`: Raised whenever the simulation finishes.</span>
+
+<span class="sd">		Note:</span>
+<span class="sd">			Normally, users do not need to call this function.</span>
+
+<span class="sd">		Args:</span>
+<span class="sd">			name (str):     The name of the signal to raise.</span>
+<span class="sd">			*args:          Additional arguments to pass to the connected events.</span>
+
+<span class="sd">		See Also:</span>
+<span class="sd">			:func:`connect`</span>
+<span class="sd">		&quot;&quot;&quot;</span>
+		<span class="k">if</span> <span class="n">name</span> <span class="ow">not</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">__events</span><span class="p">:</span>
+			<span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s2">&quot;Invalid signal &#39;</span><span class="si">%s</span><span class="s2">&#39; in Simulator.&quot;</span> <span class="o">%</span> <span class="n">name</span><span class="p">)</span>
+		<span class="k">for</span> <span class="n">evt</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">__events</span><span class="p">[</span><span class="n">name</span><span class="p">]:</span>
+			<span class="n">evt</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">)</span></div></div>
 </pre></div>
 
              </article>

+ 1 - 2
doc/_build/html/_modules/index.html

@@ -272,8 +272,7 @@
 <li><a href="CBD/CBD2LaTeX.html">CBD.CBD2LaTeX</a></li>
 <li><a href="CBD/CBDDraw.html">CBD.CBDDraw</a></li>
 <li><a href="CBD/depGraph.html">CBD.depGraph</a></li>
-<li><a href="CBD/lib/interface/endpoints.html">CBD.lib.interface.endpoints</a></li>
-<li><a href="CBD/lib/interface/plotting.html">CBD.lib.interface.plotting</a></li>
+<li><a href="CBD/lib/endpoints.html">CBD.lib.endpoints</a></li>
 <li><a href="CBD/lib/std.html">CBD.lib.std</a></li>
 <li><a href="CBD/naivelog.html">CBD.naivelog</a></li>
 <li><a href="CBD/realtime/accurate_time.html">CBD.realtime.accurate_time</a></li>

+ 7 - 0
doc/_build/html/_sources/CBD.lib.endpoints.rst.txt

@@ -0,0 +1,7 @@
+CBD.lib.endpoints module
+========================
+
+.. automodule:: CBD.lib.endpoints
+    :members:
+    :undoc-members:
+    :show-inheritance:

+ 0 - 7
doc/_build/html/_sources/CBD.lib.interface.endpoints.rst.txt

@@ -1,7 +0,0 @@
-CBD.lib.interface.endpoints module
-==================================
-
-.. automodule:: CBD.lib.interface.endpoints
-    :members:
-    :undoc-members:
-    :show-inheritance:

+ 0 - 7
doc/_build/html/_sources/CBD.lib.interface.plotting.rst.txt

@@ -1,7 +0,0 @@
-CBD.lib.interface.plotting module
-=================================
-
-.. automodule:: CBD.lib.interface.plotting
-    :members:
-    :undoc-members:
-    :show-inheritance:

+ 0 - 16
doc/_build/html/_sources/CBD.lib.interface.rst.txt

@@ -1,16 +0,0 @@
-CBD.lib.interface package
-=========================
-
-.. automodule:: CBD.lib.interface
-    :members:
-    :undoc-members:
-    :show-inheritance:
-
-Submodules
-----------
-
-.. toctree::
-
-   CBD.lib.interface.endpoints
-   CBD.lib.interface.plotting
-

+ 1 - 7
doc/_build/html/_sources/CBD.lib.rst.txt

@@ -6,17 +6,11 @@ Standard CBD Library (BBL)
     :undoc-members:
     :show-inheritance:
 
-Subpackages
------------
-
-.. toctree::
-
-    CBD.lib.interface
-
 Submodules
 ----------
 
 .. toctree::
 
    CBD.lib.std
+   CBD.lib.endpoints
 

+ 20 - 5
doc/_build/html/_sources/examples/LivePlot.rst.txt

@@ -7,8 +7,7 @@ system data (battery life, sensor information...) or output information (results
 Luckily, the CBD framework provides this functionality in a clean and efficient manner.
 
 .. attention::
-    In the future, `Seaborn`, `Jupyter` and `ggplot` will also be added and described. For now, only
-    `MatPlotLib` and `Bokeh` are possible.
+    In the future, `Seaborn` and `ggplot` will also be added and described. For now, only `MatPlotLib` and `Bokeh` are possible.
 
 To allow for "live" plotting of data, make use of the :class:`CBD.realtime.plotting.PlotManager` class,
 which is a wrapper for tracking multiple realtime plots. Internally, it will keep track of multiple
@@ -25,8 +24,8 @@ which is a wrapper for tracking multiple realtime plots. Internally, it will kee
     manager.register("myHandler", MyBlock('myBlock'), figure, ScatterPlot())
 
 Notice you also need a block that stores the data. For plotting a single signal, it's best to use the
-:class:`CBD.lib.interface.endpoints.SignalCollectorBlock`. Alternatively, to plot XY-pairs, the
-:class:`CBD.lib.interface.endpoints.PositionCollectorBlock` can be used.
+:class:`CBD.lib.endpoints.SignalCollectorBlock`. Alternatively, to plot XY-pairs, the
+:class:`CBD.lib.endpoints.PositionCollectorBlock` can be used.
 
 Example Model
 -------------
@@ -37,7 +36,7 @@ The output of this block is removed and changed to a :code:`SignalCollectorBlock
 
     from CBD.CBD import CBD
     from CBD.lib.std import TimeBlock, GenericBlock
-    from CBD.lib.interface.endpoints import SignalCollectorBlock
+    from CBD.lib.endpoints import SignalCollectorBlock
 
     class SinGen(CBD):
         def __init__(self, name="SinGen"):
@@ -93,6 +92,22 @@ builtin plotting window.
 .. figure:: ../_figures/sine-wave-mpl.gif
     :width: 400
 
+Jupyter Notebook
+^^^^^^^^^^^^^^^^
+These days, `Jupyter Notebooks <https://jupyter.org/>`_ are the most common way of modelling. Luckily,
+the :class:`CBD.realtime.plotting.PlotManager` can work with them without too much overhead. In fact, all
+that's required is setting the magic function :code:`%matplotlib` **before** creating the plot. That's it!
+
+However, a small caveat is the fact that a :code:`notebook` stays alive after the simulation finishes. This
+means the :code:`PlotManager` keeps polling for data. To stop this, connect a signal that terminates this
+polling to the simulator **before** starting the simulation:
+
+.. code-block:: python
+
+    sim.connect("terminated", manager.terminate)
+
+Also take a look at the :code:`examples/notebook` folder for more info.
+
 TkInter
 ^^^^^^^
 Now, as mentioned in :doc:`RealTime`, there is also a :code:`TkInter` platform to run the realtime

+ 1 - 1
doc/_build/html/_sources/examples/RealTime.rst.txt

@@ -29,7 +29,7 @@ To recap:
     from CBD.CBD import CBD
     from CBD.simulator import Simulator
     from CBD.lib.std import TimeBlock, GenericBlock
-    from CBD.lib.interface.endpoints import SignalCollectorBlock
+    from CBD.lib.endpoints import SignalCollectorBlock
 
     class SinGen(CBD):
         def __init__(self, name="SinGen"):

+ 18 - 5
doc/_build/html/examples/LivePlot.html

@@ -279,8 +279,7 @@ system data (battery life, sensor information…) or output information (results
 <p>Luckily, the CBD framework provides this functionality in a clean and efficient manner.</p>
 <div class="admonition attention">
 <p class="first admonition-title">Attention</p>
-<p class="last">In the future, <cite>Seaborn</cite>, <cite>Jupyter</cite> and <cite>ggplot</cite> will also be added and described. For now, only
-<cite>MatPlotLib</cite> and <cite>Bokeh</cite> are possible.</p>
+<p class="last">In the future, <cite>Seaborn</cite> and <cite>ggplot</cite> will also be added and described. For now, only <cite>MatPlotLib</cite> and <cite>Bokeh</cite> are possible.</p>
 </div>
 <p>To allow for “live” plotting of data, make use of the <a class="reference internal" href="../CBD.realtime.plotting.html#CBD.realtime.plotting.PlotManager" title="CBD.realtime.plotting.PlotManager"><code class="xref py py-class docutils literal notranslate"><span class="pre">CBD.realtime.plotting.PlotManager</span></code></a> class,
 which is a wrapper for tracking multiple realtime plots. Internally, it will keep track of multiple
@@ -295,15 +294,15 @@ which is a wrapper for tracking multiple realtime plots. Internally, it will kee
 </pre></div>
 </div>
 <p>Notice you also need a block that stores the data. For plotting a single signal, it’s best to use the
-<a class="reference internal" href="../CBD.lib.interface.endpoints.html#CBD.lib.interface.endpoints.SignalCollectorBlock" title="CBD.lib.interface.endpoints.SignalCollectorBlock"><code class="xref py py-class docutils literal notranslate"><span class="pre">CBD.lib.interface.endpoints.SignalCollectorBlock</span></code></a>. Alternatively, to plot XY-pairs, the
-<a class="reference internal" href="../CBD.lib.interface.endpoints.html#CBD.lib.interface.endpoints.PositionCollectorBlock" title="CBD.lib.interface.endpoints.PositionCollectorBlock"><code class="xref py py-class docutils literal notranslate"><span class="pre">CBD.lib.interface.endpoints.PositionCollectorBlock</span></code></a> can be used.</p>
+<a class="reference internal" href="../CBD.lib.endpoints.html#CBD.lib.endpoints.SignalCollectorBlock" title="CBD.lib.endpoints.SignalCollectorBlock"><code class="xref py py-class docutils literal notranslate"><span class="pre">CBD.lib.endpoints.SignalCollectorBlock</span></code></a>. Alternatively, to plot XY-pairs, the
+<a class="reference internal" href="../CBD.lib.endpoints.html#CBD.lib.endpoints.PositionCollectorBlock" title="CBD.lib.endpoints.PositionCollectorBlock"><code class="xref py py-class docutils literal notranslate"><span class="pre">CBD.lib.endpoints.PositionCollectorBlock</span></code></a> can be used.</p>
 <div class="section" id="example-model">
 <h2>Example Model<a class="headerlink" href="#example-model" title="Permalink to this headline">¶</a></h2>
 <p>The examples below show how you can display a live plot for the <a class="reference internal" href="SinGen.html"><span class="doc">Sine Generator</span></a>, plotted in realtime.
 The output of this block is removed and changed to a <code class="code docutils literal notranslate"><span class="pre">SignalCollectorBlock</span></code>:</p>
 <div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">CBD.CBD</span> <span class="kn">import</span> <span class="n">CBD</span>
 <span class="kn">from</span> <span class="nn">CBD.lib.std</span> <span class="kn">import</span> <span class="n">TimeBlock</span><span class="p">,</span> <span class="n">GenericBlock</span>
-<span class="kn">from</span> <span class="nn">CBD.lib.interface.endpoints</span> <span class="kn">import</span> <span class="n">SignalCollectorBlock</span>
+<span class="kn">from</span> <span class="nn">CBD.lib.endpoints</span> <span class="kn">import</span> <span class="n">SignalCollectorBlock</span>
 
 <span class="k">class</span> <span class="nc">SinGen</span><span class="p">(</span><span class="n">CBD</span><span class="p">):</span>
     <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="s2">&quot;SinGen&quot;</span><span class="p">):</span>
@@ -360,6 +359,19 @@ builtin plotting window.</p>
 <a class="reference internal image-reference" href="../_images/sine-wave-mpl.gif"><img alt="../_images/sine-wave-mpl.gif" src="../_images/sine-wave-mpl.gif" style="width: 400px;" /></a>
 </div>
 </div>
+<div class="section" id="jupyter-notebook">
+<h3>Jupyter Notebook<a class="headerlink" href="#jupyter-notebook" title="Permalink to this headline">¶</a></h3>
+<p>These days, <a class="reference external" href="https://jupyter.org/">Jupyter Notebooks</a> are the most common way of modelling. Luckily,
+the <a class="reference internal" href="../CBD.realtime.plotting.html#CBD.realtime.plotting.PlotManager" title="CBD.realtime.plotting.PlotManager"><code class="xref py py-class docutils literal notranslate"><span class="pre">CBD.realtime.plotting.PlotManager</span></code></a> can work with them without too much overhead. In fact, all
+that’s required is setting the magic function <code class="code docutils literal notranslate"><span class="pre">%matplotlib</span></code> <strong>before</strong> creating the plot. That’s it!</p>
+<p>However, a small caveat is the fact that a <code class="code docutils literal notranslate"><span class="pre">notebook</span></code> stays alive after the simulation finishes. This
+means the <code class="code docutils literal notranslate"><span class="pre">PlotManager</span></code> keeps polling for data. To stop this, connect a signal that terminates this
+polling to the simulator <strong>before</strong> starting the simulation:</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">sim</span><span class="o">.</span><span class="n">connect</span><span class="p">(</span><span class="s2">&quot;terminated&quot;</span><span class="p">,</span> <span class="n">manager</span><span class="o">.</span><span class="n">terminate</span><span class="p">)</span>
+</pre></div>
+</div>
+<p>Also take a look at the <code class="code docutils literal notranslate"><span class="pre">examples/notebook</span></code> folder for more info.</p>
+</div>
 <div class="section" id="tkinter">
 <h3>TkInter<a class="headerlink" href="#tkinter" title="Permalink to this headline">¶</a></h3>
 <p>Now, as mentioned in <a class="reference internal" href="RealTime.html"><span class="doc">Realtime Simulation</span></a>, there is also a <code class="code docutils literal notranslate"><span class="pre">TkInter</span></code> platform to run the realtime
@@ -502,6 +514,7 @@ for this problem.</p>
 <li><a class="reference internal" href="#example-model">Example Model</a></li>
 <li><a class="reference internal" href="#using-matplotlib">Using MatPlotLib</a><ul>
 <li><a class="reference internal" href="#default">Default</a></li>
+<li><a class="reference internal" href="#jupyter-notebook">Jupyter Notebook</a></li>
 <li><a class="reference internal" href="#tkinter">TkInter</a></li>
 </ul>
 </li>

+ 1 - 1
doc/_build/html/examples/RealTime.html

@@ -299,7 +299,7 @@ To recap:</p>
 <div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">CBD.CBD</span> <span class="kn">import</span> <span class="n">CBD</span>
 <span class="kn">from</span> <span class="nn">CBD.simulator</span> <span class="kn">import</span> <span class="n">Simulator</span>
 <span class="kn">from</span> <span class="nn">CBD.lib.std</span> <span class="kn">import</span> <span class="n">TimeBlock</span><span class="p">,</span> <span class="n">GenericBlock</span>
-<span class="kn">from</span> <span class="nn">CBD.lib.interface.endpoints</span> <span class="kn">import</span> <span class="n">SignalCollectorBlock</span>
+<span class="kn">from</span> <span class="nn">CBD.lib.endpoints</span> <span class="kn">import</span> <span class="n">SignalCollectorBlock</span>
 
 <span class="k">class</span> <span class="nc">SinGen</span><span class="p">(</span><span class="n">CBD</span><span class="p">):</span>
     <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="s2">&quot;SinGen&quot;</span><span class="p">):</span>

+ 47 - 64
doc/_build/html/genindex.html

@@ -294,7 +294,6 @@
  | <a href="#U"><strong>U</strong></a>
  | <a href="#V"><strong>V</strong></a>
  | <a href="#W"><strong>W</strong></a>
- | <a href="#X"><strong>X</strong></a>
  
 </div>
 <h2 id="A">A</h2>
@@ -307,18 +306,16 @@
       <li><a href="CBD.CBD.html#CBD.CBD.CBD.addConnection">addConnection() (CBD.CBD.CBD method)</a>
 </li>
       <li><a href="CBD.lib.std.html#CBD.lib.std.AdderBlock">AdderBlock (class in CBD.lib.std)</a>
-</li>
-      <li><a href="CBD.depGraph.html#CBD.depGraph.DepGraph.addMember">addMember() (CBD.depGraph.DepGraph method)</a>
 </li>
   </ul></td>
   <td style="width: 33%; vertical-align: top;"><ul>
+      <li><a href="CBD.depGraph.html#CBD.depGraph.DepGraph.addMember">addMember() (CBD.depGraph.DepGraph method)</a>
+</li>
       <li><a href="CBD.lib.std.html#CBD.lib.std.AddOneBlock">AddOneBlock (class in CBD.lib.std)</a>
 </li>
       <li><a href="CBD.realtime.plotting.html#CBD.realtime.plotting.PlotManager.all_opened">all_opened() (CBD.realtime.plotting.PlotManager method)</a>
 </li>
       <li><a href="CBD.lib.std.html#CBD.lib.std.AndBlock">AndBlock (class in CBD.lib.std)</a>
-</li>
-      <li><a href="CBD.lib.interface.plotting.html#CBD.lib.interface.plotting.PlotBlock.animate">animate() (CBD.lib.interface.plotting.PlotBlock method)</a>
 </li>
       <li><a href="CBD.CBD.html#CBD.CBD.BaseBlock.appendToSignal">appendToSignal() (CBD.CBD.BaseBlock method)</a>
 </li>
@@ -364,11 +361,7 @@
 </li>
       <li><a href="CBD.lib.html#module-CBD.lib">CBD.lib (module)</a>
 </li>
-      <li><a href="CBD.lib.interface.html#module-CBD.lib.interface">CBD.lib.interface (module)</a>
-</li>
-      <li><a href="CBD.lib.interface.endpoints.html#module-CBD.lib.interface.endpoints">CBD.lib.interface.endpoints (module)</a>
-</li>
-      <li><a href="CBD.lib.interface.plotting.html#module-CBD.lib.interface.plotting">CBD.lib.interface.plotting (module)</a>
+      <li><a href="CBD.lib.endpoints.html#module-CBD.lib.endpoints">CBD.lib.endpoints (module)</a>
 </li>
       <li><a href="CBD.lib.std.html#module-CBD.lib.std">CBD.lib.std (module)</a>
 </li>
@@ -402,15 +395,21 @@
       </ul></li>
       <li><a href="CBD.lib.std.html#CBD.lib.std.ClampBlock">ClampBlock (class in CBD.lib.std)</a>
 </li>
-      <li><a href="CBD.lib.interface.endpoints.html#CBD.lib.interface.endpoints.StatisticsCollectorBlock.clean">clean() (CBD.lib.interface.endpoints.StatisticsCollectorBlock method)</a>
+      <li><a href="CBD.lib.endpoints.html#CBD.lib.endpoints.CollectorBlock.clear">clear() (CBD.lib.endpoints.CollectorBlock method)</a>
+
+      <ul>
+        <li><a href="CBD.lib.endpoints.html#CBD.lib.endpoints.PositionCollectorBlock.clear">(CBD.lib.endpoints.PositionCollectorBlock method)</a>
+</li>
+        <li><a href="CBD.lib.endpoints.html#CBD.lib.endpoints.SignalCollectorBlock.clear">(CBD.lib.endpoints.SignalCollectorBlock method)</a>
+</li>
+        <li><a href="CBD.lib.endpoints.html#CBD.lib.endpoints.StatisticsCollectorBlock.clear">(CBD.lib.endpoints.StatisticsCollectorBlock method)</a>
 </li>
+      </ul></li>
       <li><a href="CBD.simulator.html#CBD.simulator.Clock">Clock (class in CBD.simulator)</a>
 </li>
       <li><a href="CBD.realtime.plotting.html#CBD.realtime.plotting.PlotHandler.close_event">close_event() (CBD.realtime.plotting.PlotHandler method)</a>
 </li>
-      <li><a href="CBD.realtime.plotting.html#CBD.realtime.plotting.PlotHandler.close_plot">close_plot() (CBD.realtime.plotting.PlotHandler method)</a>
-</li>
-      <li><a href="CBD.lib.interface.endpoints.html#CBD.lib.interface.endpoints.CollectorBlock">CollectorBlock (class in CBD.lib.interface.endpoints)</a>
+      <li><a href="CBD.lib.endpoints.html#CBD.lib.endpoints.CollectorBlock">CollectorBlock (class in CBD.lib.endpoints)</a>
 </li>
       <li><a href="CBD.CBD.html#CBD.CBD.BaseBlock.compute">compute() (CBD.CBD.BaseBlock method)</a>
 
@@ -425,19 +424,13 @@
 </li>
         <li><a href="CBD.CBD.html#CBD.CBD.WireBlock.compute">(CBD.CBD.WireBlock method)</a>
 </li>
-        <li><a href="CBD.lib.interface.endpoints.html#CBD.lib.interface.endpoints.CollectorBlock.compute">(CBD.lib.interface.endpoints.CollectorBlock method)</a>
-</li>
-        <li><a href="CBD.lib.interface.endpoints.html#CBD.lib.interface.endpoints.PositionCollectorBlock.compute">(CBD.lib.interface.endpoints.PositionCollectorBlock method)</a>
-</li>
-        <li><a href="CBD.lib.interface.endpoints.html#CBD.lib.interface.endpoints.SignalCollectorBlock.compute">(CBD.lib.interface.endpoints.SignalCollectorBlock method)</a>
+        <li><a href="CBD.lib.endpoints.html#CBD.lib.endpoints.CollectorBlock.compute">(CBD.lib.endpoints.CollectorBlock method)</a>
 </li>
-        <li><a href="CBD.lib.interface.endpoints.html#CBD.lib.interface.endpoints.StatisticsCollectorBlock.compute">(CBD.lib.interface.endpoints.StatisticsCollectorBlock method)</a>
+        <li><a href="CBD.lib.endpoints.html#CBD.lib.endpoints.PositionCollectorBlock.compute">(CBD.lib.endpoints.PositionCollectorBlock method)</a>
 </li>
-        <li><a href="CBD.lib.interface.plotting.html#CBD.lib.interface.plotting.PlotBlock.compute">(CBD.lib.interface.plotting.PlotBlock method)</a>
+        <li><a href="CBD.lib.endpoints.html#CBD.lib.endpoints.SignalCollectorBlock.compute">(CBD.lib.endpoints.SignalCollectorBlock method)</a>
 </li>
-        <li><a href="CBD.lib.interface.plotting.html#CBD.lib.interface.plotting.SignalPlotBlock.compute">(CBD.lib.interface.plotting.SignalPlotBlock method)</a>
-</li>
-        <li><a href="CBD.lib.interface.plotting.html#CBD.lib.interface.plotting.XYPlotBlock.compute">(CBD.lib.interface.plotting.XYPlotBlock method)</a>
+        <li><a href="CBD.lib.endpoints.html#CBD.lib.endpoints.StatisticsCollectorBlock.compute">(CBD.lib.endpoints.StatisticsCollectorBlock method)</a>
 </li>
         <li><a href="CBD.lib.std.html#CBD.lib.std.AbsBlock.compute">(CBD.lib.std.AbsBlock method)</a>
 </li>
@@ -488,6 +481,8 @@
 
       <ul>
         <li><a href="CBD.realtime.plotting.html#CBD.realtime.plotting.PlotManager.connect">(CBD.realtime.plotting.PlotManager method)</a>
+</li>
+        <li><a href="CBD.simulator.html#CBD.simulator.Simulator.connect">(CBD.simulator.Simulator method)</a>
 </li>
       </ul></li>
       <li><a href="CBD.lib.std.html#CBD.lib.std.ConstantBlock">ConstantBlock (class in CBD.lib.std)</a>
@@ -498,7 +493,7 @@
         <li><a href="CBD.solver.html#CBD.solver.Solver.constructInput">(CBD.solver.Solver method)</a>
 </li>
       </ul></li>
-      <li><a href="CBD.lib.interface.endpoints.html#CBD.lib.interface.endpoints.StatisticsCollectorBlock.count">count() (CBD.lib.interface.endpoints.StatisticsCollectorBlock method)</a>
+      <li><a href="CBD.lib.endpoints.html#CBD.lib.endpoints.StatisticsCollectorBlock.count">count() (CBD.lib.endpoints.StatisticsCollectorBlock method)</a>
 </li>
       <li><a href="CBD.realtime.plotting.html#CBD.realtime.plotting.LinePlot.create">create() (CBD.realtime.plotting.LinePlot method)</a>
 
@@ -518,10 +513,10 @@
 <h2 id="D">D</h2>
 <table style="width: 100%" class="indextable genindextable"><tr>
   <td style="width: 33%; vertical-align: top;"><ul>
-      <li><a href="CBD.lib.interface.endpoints.html#CBD.lib.interface.endpoints.PositionCollectorBlock.data_xy">data_xy (CBD.lib.interface.endpoints.PositionCollectorBlock attribute)</a>
+      <li><a href="CBD.lib.endpoints.html#CBD.lib.endpoints.PositionCollectorBlock.data_xy">data_xy (CBD.lib.endpoints.PositionCollectorBlock attribute)</a>
 
       <ul>
-        <li><a href="CBD.lib.interface.endpoints.html#CBD.lib.interface.endpoints.SignalCollectorBlock.data_xy">(CBD.lib.interface.endpoints.SignalCollectorBlock attribute)</a>
+        <li><a href="CBD.lib.endpoints.html#CBD.lib.endpoints.SignalCollectorBlock.data_xy">(CBD.lib.endpoints.SignalCollectorBlock attribute)</a>
 </li>
       </ul></li>
       <li><a href="CBD.naivelog.html#CBD.naivelog.DEBUG">DEBUG (in module CBD.naivelog)</a>
@@ -554,8 +549,6 @@
 <h2 id="E">E</h2>
 <table style="width: 100%" class="indextable genindextable"><tr>
   <td style="width: 33%; vertical-align: top;"><ul>
-      <li><a href="CBD.lib.interface.plotting.html#CBD.lib.interface.plotting.PlotBlock.end_animation">end_animation() (CBD.lib.interface.plotting.PlotBlock method)</a>
-</li>
       <li><a href="CBD.util.html#CBD.util.enum">enum() (in module CBD.util)</a>
 </li>
       <li><a href="CBD.lib.std.html#CBD.lib.std.EqualsBlock">EqualsBlock (class in CBD.lib.std)</a>
@@ -587,8 +580,6 @@
       <li><a href="CBD.realtime.plotting.html#CBD.realtime.plotting.follow">follow() (in module CBD.realtime.plotting)</a>
 </li>
       <li><a href="CBD.naivelog.html#CBD.naivelog.Logger.formatmsg">formatmsg() (CBD.naivelog.Logger method)</a>
-</li>
-      <li><a href="CBD.lib.interface.plotting.html#CBD.lib.interface.plotting.PlotBlock.full_domain">full_domain() (CBD.lib.interface.plotting.PlotBlock static method)</a>
 </li>
   </ul></td>
 </tr></table>
@@ -744,11 +735,9 @@
 </li>
       <li><a href="CBD.realtime.plotting.html#CBD.realtime.plotting.PlotKind.is_backend">is_backend() (CBD.realtime.plotting.PlotKind method)</a>
 </li>
-      <li><a href="CBD.lib.interface.plotting.html#CBD.lib.interface.plotting.PlotBlock.is_opened">is_opened() (CBD.lib.interface.plotting.PlotBlock method)</a>
+      <li><a href="CBD.realtime.plotting.html#CBD.realtime.plotting.PlotHandler.is_opened">is_opened() (CBD.realtime.plotting.PlotHandler method)</a>
 
       <ul>
-        <li><a href="CBD.realtime.plotting.html#CBD.realtime.plotting.PlotHandler.is_opened">(CBD.realtime.plotting.PlotHandler method)</a>
-</li>
         <li><a href="CBD.realtime.plotting.html#CBD.realtime.plotting.PlotManager.is_opened">(CBD.realtime.plotting.PlotManager method)</a>
 </li>
       </ul></li>
@@ -798,13 +787,13 @@
 </li>
       <li><a href="CBD.solver.html#CBD.solver.Matrix">Matrix (class in CBD.solver)</a>
 </li>
-      <li><a href="CBD.lib.interface.endpoints.html#CBD.lib.interface.endpoints.StatisticsCollectorBlock.max">max() (CBD.lib.interface.endpoints.StatisticsCollectorBlock method)</a>
+      <li><a href="CBD.lib.endpoints.html#CBD.lib.endpoints.StatisticsCollectorBlock.max">max() (CBD.lib.endpoints.StatisticsCollectorBlock method)</a>
 </li>
-      <li><a href="CBD.lib.interface.endpoints.html#CBD.lib.interface.endpoints.StatisticsCollectorBlock.mean">mean() (CBD.lib.interface.endpoints.StatisticsCollectorBlock method)</a>
+      <li><a href="CBD.lib.endpoints.html#CBD.lib.endpoints.StatisticsCollectorBlock.mean">mean() (CBD.lib.endpoints.StatisticsCollectorBlock method)</a>
 </li>
   </ul></td>
   <td style="width: 33%; vertical-align: top;"><ul>
-      <li><a href="CBD.lib.interface.endpoints.html#CBD.lib.interface.endpoints.StatisticsCollectorBlock.min">min() (CBD.lib.interface.endpoints.StatisticsCollectorBlock method)</a>
+      <li><a href="CBD.lib.endpoints.html#CBD.lib.endpoints.StatisticsCollectorBlock.min">min() (CBD.lib.endpoints.StatisticsCollectorBlock method)</a>
 </li>
       <li><a href="CBD.lib.std.html#CBD.lib.std.ModuloBlock">ModuloBlock (class in CBD.lib.std)</a>
 </li>
@@ -847,18 +836,16 @@
 <table style="width: 100%" class="indextable genindextable"><tr>
   <td style="width: 33%; vertical-align: top;"><ul>
       <li><a href="CBD.realtime.threadingBackend.html#CBD.realtime.threadingBackend.Platform">Platform (class in CBD.realtime.threadingBackend)</a>
-</li>
-      <li><a href="CBD.lib.interface.plotting.html#CBD.lib.interface.plotting.PlotBlock">PlotBlock (class in CBD.lib.interface.plotting)</a>
 </li>
       <li><a href="CBD.realtime.plotting.html#CBD.realtime.plotting.PlotHandler">PlotHandler (class in CBD.realtime.plotting)</a>
 </li>
       <li><a href="CBD.realtime.plotting.html#CBD.realtime.plotting.PlotKind">PlotKind (class in CBD.realtime.plotting)</a>
 </li>
-  </ul></td>
-  <td style="width: 33%; vertical-align: top;"><ul>
       <li><a href="CBD.realtime.plotting.html#CBD.realtime.plotting.PlotManager">PlotManager (class in CBD.realtime.plotting)</a>
 </li>
-      <li><a href="CBD.lib.interface.endpoints.html#CBD.lib.interface.endpoints.PositionCollectorBlock">PositionCollectorBlock (class in CBD.lib.interface.endpoints)</a>
+  </ul></td>
+  <td style="width: 33%; vertical-align: top;"><ul>
+      <li><a href="CBD.lib.endpoints.html#CBD.lib.endpoints.PositionCollectorBlock">PositionCollectorBlock (class in CBD.lib.endpoints)</a>
 </li>
       <li><a href="CBD.lib.std.html#CBD.lib.std.ProductBlock">ProductBlock (class in CBD.lib.std)</a>
 </li>
@@ -895,8 +882,6 @@
       <li><a href="CBD.realtime.plotting.html#CBD.realtime.plotting.ScatterPlot">ScatterPlot (class in CBD.realtime.plotting)</a>
 </li>
       <li><a href="CBD.CBD.html#CBD.CBD.SequenceBlock">SequenceBlock (class in CBD.CBD)</a>
-</li>
-      <li><a href="CBD.lib.interface.plotting.html#CBD.lib.interface.plotting.PlotBlock.set_animation">set_animation() (CBD.lib.interface.plotting.PlotBlock method)</a>
 </li>
       <li><a href="CBD.realtime.plotting.html#CBD.realtime.plotting.PlotHandler.set_data_getter">set_data_getter() (CBD.realtime.plotting.PlotHandler method)</a>
 </li>
@@ -941,10 +926,12 @@
       <li><a href="CBD.CBD.html#CBD.CBD.Signal">Signal (class in CBD.CBD)</a>
 </li>
       <li><a href="CBD.realtime.plotting.html#CBD.realtime.plotting.PlotHandler.signal">signal() (CBD.realtime.plotting.PlotHandler method)</a>
+
+      <ul>
+        <li><a href="CBD.simulator.html#CBD.simulator.Simulator.signal">(CBD.simulator.Simulator method)</a>
 </li>
-      <li><a href="CBD.lib.interface.endpoints.html#CBD.lib.interface.endpoints.SignalCollectorBlock">SignalCollectorBlock (class in CBD.lib.interface.endpoints)</a>
-</li>
-      <li><a href="CBD.lib.interface.plotting.html#CBD.lib.interface.plotting.SignalPlotBlock">SignalPlotBlock (class in CBD.lib.interface.plotting)</a>
+      </ul></li>
+      <li><a href="CBD.lib.endpoints.html#CBD.lib.endpoints.SignalCollectorBlock">SignalCollectorBlock (class in CBD.lib.endpoints)</a>
 </li>
       <li><a href="CBD.simulator.html#CBD.simulator.Simulator">Simulator (class in CBD.simulator)</a>
 </li>
@@ -958,11 +945,9 @@
       </ul></li>
       <li><a href="CBD.solver.html#CBD.solver.Solver">Solver (class in CBD.solver)</a>
 </li>
-      <li><a href="CBD.lib.interface.plotting.html#CBD.lib.interface.plotting.PlotBlock.start_animation">start_animation() (CBD.lib.interface.plotting.PlotBlock method)</a>
-</li>
-      <li><a href="CBD.lib.interface.endpoints.html#CBD.lib.interface.endpoints.StatisticsCollectorBlock">StatisticsCollectorBlock (class in CBD.lib.interface.endpoints)</a>
+      <li><a href="CBD.lib.endpoints.html#CBD.lib.endpoints.StatisticsCollectorBlock">StatisticsCollectorBlock (class in CBD.lib.endpoints)</a>
 </li>
-      <li><a href="CBD.lib.interface.endpoints.html#CBD.lib.interface.endpoints.StatisticsCollectorBlock.std">std() (CBD.lib.interface.endpoints.StatisticsCollectorBlock method)</a>
+      <li><a href="CBD.lib.endpoints.html#CBD.lib.endpoints.StatisticsCollectorBlock.std">std() (CBD.lib.endpoints.StatisticsCollectorBlock method)</a>
 </li>
       <li><a href="CBD.realtime.threadingBackend.html#CBD.realtime.threadingBackend.ThreadingBackend.step">step() (CBD.realtime.threadingBackend.ThreadingBackend method)</a>
 
@@ -976,9 +961,9 @@
 </li>
       <li><a href="CBD.naivelog.html#CBD.naivelog.strToLevel">strToLevel() (in module CBD.naivelog)</a>
 </li>
-      <li><a href="CBD.lib.interface.endpoints.html#CBD.lib.interface.endpoints.StatisticsCollectorBlock.sum">sum() (CBD.lib.interface.endpoints.StatisticsCollectorBlock method)</a>
+      <li><a href="CBD.lib.endpoints.html#CBD.lib.endpoints.StatisticsCollectorBlock.sum">sum() (CBD.lib.endpoints.StatisticsCollectorBlock method)</a>
 </li>
-      <li><a href="CBD.lib.interface.endpoints.html#CBD.lib.interface.endpoints.StatisticsCollectorBlock.sumOfSquares">sumOfSquares() (CBD.lib.interface.endpoints.StatisticsCollectorBlock method)</a>
+      <li><a href="CBD.lib.endpoints.html#CBD.lib.endpoints.StatisticsCollectorBlock.sumOfSquares">sumOfSquares() (CBD.lib.endpoints.StatisticsCollectorBlock method)</a>
 </li>
   </ul></td>
 </tr></table>
@@ -986,6 +971,12 @@
 <h2 id="T">T</h2>
 <table style="width: 100%" class="indextable genindextable"><tr>
   <td style="width: 33%; vertical-align: top;"><ul>
+      <li><a href="CBD.realtime.plotting.html#CBD.realtime.plotting.PlotHandler.terminate">terminate() (CBD.realtime.plotting.PlotHandler method)</a>
+
+      <ul>
+        <li><a href="CBD.realtime.plotting.html#CBD.realtime.plotting.PlotManager.terminate">(CBD.realtime.plotting.PlotManager method)</a>
+</li>
+      </ul></li>
       <li><a href="CBD.realtime.threadingBackend.html#CBD.realtime.threadingBackend.Platform.THREADING">THREADING (CBD.realtime.threadingBackend.Platform attribute)</a>
 </li>
       <li><a href="CBD.realtime.threadingBackend.html#CBD.realtime.threadingBackend.ThreadingBackend">ThreadingBackend (class in CBD.realtime.threadingBackend)</a>
@@ -993,11 +984,11 @@
       <li><a href="CBD.realtime.threadingGameLoop.html#CBD.realtime.threadingGameLoop.ThreadingGameLoop">ThreadingGameLoop (class in CBD.realtime.threadingGameLoop)</a>
 </li>
       <li><a href="CBD.realtime.threadingPython.html#CBD.realtime.threadingPython.ThreadingPython">ThreadingPython (class in CBD.realtime.threadingPython)</a>
-</li>
-      <li><a href="CBD.realtime.threadingTkInter.html#CBD.realtime.threadingTkInter.ThreadingTkInter">ThreadingTkInter (class in CBD.realtime.threadingTkInter)</a>
 </li>
   </ul></td>
   <td style="width: 33%; vertical-align: top;"><ul>
+      <li><a href="CBD.realtime.threadingTkInter.html#CBD.realtime.threadingTkInter.ThreadingTkInter">ThreadingTkInter (class in CBD.realtime.threadingTkInter)</a>
+</li>
       <li><a href="CBD.CBD.html#CBD.CBD.Signal.time">time (CBD.CBD.Signal attribute)</a>
 </li>
       <li><a href="CBD.realtime.accurate_time.html#CBD.realtime.accurate_time.time">time() (in module CBD.realtime.accurate_time)</a>
@@ -1048,7 +1039,7 @@
 </li>
   </ul></td>
   <td style="width: 33%; vertical-align: top;"><ul>
-      <li><a href="CBD.lib.interface.endpoints.html#CBD.lib.interface.endpoints.StatisticsCollectorBlock.variance">variance() (CBD.lib.interface.endpoints.StatisticsCollectorBlock method)</a>
+      <li><a href="CBD.lib.endpoints.html#CBD.lib.endpoints.StatisticsCollectorBlock.variance">variance() (CBD.lib.endpoints.StatisticsCollectorBlock method)</a>
 </li>
   </ul></td>
 </tr></table>
@@ -1077,14 +1068,6 @@
   </ul></td>
 </tr></table>
 
-<h2 id="X">X</h2>
-<table style="width: 100%" class="indextable genindextable"><tr>
-  <td style="width: 33%; vertical-align: top;"><ul>
-      <li><a href="CBD.lib.interface.plotting.html#CBD.lib.interface.plotting.XYPlotBlock">XYPlotBlock (class in CBD.lib.interface.plotting)</a>
-</li>
-  </ul></td>
-</tr></table>
-
 
 
              </article>

+ 0 - 1
doc/_build/html/modules.html

@@ -276,7 +276,6 @@
 <li class="toctree-l1"><a class="reference internal" href="CBD.html">CBD package</a><ul>
 <li class="toctree-l2"><a class="reference internal" href="CBD.html#subpackages">Subpackages</a><ul>
 <li class="toctree-l3"><a class="reference internal" href="CBD.lib.html">Standard CBD Library (BBL)</a><ul>
-<li class="toctree-l4"><a class="reference internal" href="CBD.lib.html#subpackages">Subpackages</a></li>
 <li class="toctree-l4"><a class="reference internal" href="CBD.lib.html#submodules">Submodules</a></li>
 </ul>
 </li>

BIN
doc/_build/html/objects.inv


+ 1 - 11
doc/_build/html/py-modindex.html

@@ -315,17 +315,7 @@
      <tr class="cg-1">
        <td></td>
        <td>&#160;&#160;&#160;
-       <a href="CBD.lib.interface.html#module-CBD.lib.interface"><code class="xref">CBD.lib.interface</code></a></td><td>
-       <em></em></td></tr>
-     <tr class="cg-1">
-       <td></td>
-       <td>&#160;&#160;&#160;
-       <a href="CBD.lib.interface.endpoints.html#module-CBD.lib.interface.endpoints"><code class="xref">CBD.lib.interface.endpoints</code></a></td><td>
-       <em></em></td></tr>
-     <tr class="cg-1">
-       <td></td>
-       <td>&#160;&#160;&#160;
-       <a href="CBD.lib.interface.plotting.html#module-CBD.lib.interface.plotting"><code class="xref">CBD.lib.interface.plotting</code></a></td><td>
+       <a href="CBD.lib.endpoints.html#module-CBD.lib.endpoints"><code class="xref">CBD.lib.endpoints</code></a></td><td>
        <em></em></td></tr>
      <tr class="cg-1">
        <td></td>

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1 - 1
doc/_build/html/searchindex.js


+ 2 - 2
doc/examples/LivePlot.rst

@@ -104,9 +104,9 @@ polling to the simulator **before** starting the simulation:
 
 .. code-block:: python
 
-	sim.connect("terminated_event", manager.terminate)
+    sim.connect("terminated", manager.terminate)
 
-Also take a look at the :ref:`../../examples/notebook` folder for more info.
+Also take a look at the :code:`examples/notebook` folder for more info.
 
 TkInter
 ^^^^^^^

+ 1 - 1
examples/EvenNumberGen/EvenNumberGen_experiment.py

@@ -15,7 +15,7 @@ cbd = LCG("LCG")
 
 manager = PlotManager()
 manager.register("gen", sinGen.findBlock('collector')[0], (fig, ax), ScatterPlot())
-manager.connect('gen', 'update_event', lambda d, axis=ax: axis.set_xlim(follow(d[0], 10.0, lower_bound=0.0)))
+manager.connect('gen', 'update', lambda d, axis=ax: axis.set_xlim(follow(d[0], 10.0, lower_bound=0.0)))
 
 # Run the Simulation
 sim = Simulator(cbd)

+ 2 - 2
examples/LCG/LCG_experiment.py

@@ -2,7 +2,7 @@
 # This file was automatically generated from drawio2cbd with the command:
 #   /home/red/git/DrawioConvert/__main__.py LCG.xml -av -F CBD -e LCG -t 30
 
-from CBD.lib.interface.plotting import SignalPlotBlock
+from CBD.lib.plotting import SignalPlotBlock
 from CBD.simulator import Simulator
 from LCG import *
 import matplotlib.pyplot as plt
@@ -15,7 +15,7 @@ cbd = LCG("LCG")
 
 manager = PlotManager()
 manager.register("lcg", sinGen.findBlock('collector')[0], (fig, ax), ScatterPlot())
-manager.connect('lcg', 'update_event', lambda d, axis=ax: axis.set_xlim(follow(d[0], 10.0, lower_bound=0.0)))
+manager.connect('lcg', 'update', lambda d, axis=ax: axis.set_xlim(follow(d[0], 10.0, lower_bound=0.0)))
 
 
 # Run the Simulation

+ 1 - 1
examples/SinGen/SinGen_experiment.py

@@ -30,7 +30,7 @@ canvas.get_tk_widget().grid(column=1, row=1)
 
 manager = PlotManager()
 manager.register("sin", cbd.findBlock("plot")[0], (fig, ax), LinePlot())
-manager.connect('sin', 'update_event', lambda d, axis=ax: axis.set_xlim(follow(d[0], 10.0, lower_bound=0.0)))
+manager.connect('sin', 'update', lambda d, axis=ax: axis.set_xlim(follow(d[0], 10.0, lower_bound=0.0)))
 
 # plt.show(block=False)
 

+ 1 - 1
examples/SinGen/bkh.py

@@ -33,7 +33,7 @@ def set_xlim(limits):
 	lower, upper = limits
 	fig.x_range.start = lower
 	fig.x_range.end = upper
-manager.connect('sin', 'update_event', lambda d: set_xlim(follow(d[0], 10.0, lower_bound=0.0)))
+manager.connect('sin', 'update', lambda d: set_xlim(follow(d[0], 10.0, lower_bound=0.0)))
 
 session = push_session(curdoc())
 session.show()

+ 1 - 1
examples/SinGen/mpl.py

@@ -28,7 +28,7 @@ ax.set_ylim((-1, 1))    # The sine wave never exceeds this range
 
 manager = PlotManager()
 manager.register("sin", sinGen.findBlock('collector')[0], (fig, ax), LinePlot(color='red'))
-manager.connect('sin', 'update_event', lambda d, axis=ax: axis.set_xlim(follow(d[0], 10.0, lower_bound=0.0)))
+manager.connect('sin', 'update', lambda d, axis=ax: axis.set_xlim(follow(d[0], 10.0, lower_bound=0.0)))
 
 sim = Simulator(sinGen)
 sim.setRealTime()

+ 1 - 1
examples/StateEventLocation/StateEventLocation.py

@@ -4,7 +4,7 @@
 
 from CBD.CBD import *
 from CBD.lib.std import *
-from CBD.lib.interface.plotting import SignalPlotBlock
+from CBD.lib.plotting import SignalPlotBlock
 
 DELTA_T = 0.1
 

+ 1 - 1
examples/StateEventLocation/StateEventLocation_experiment.py

@@ -2,7 +2,7 @@
 # This file was automatically generated from drawio2cbd with the command:
 #   /home/red/git/DrawioConvert/__main__.py StateEventLocation.xml -fav -F CBD -e Experiment -t 100 -E delta=0.1
 
-from CBD.lib.interface.plotting import SignalPlotBlock
+from CBD.lib.plotting import SignalPlotBlock
 from CBD.simulator import Simulator
 from StateEventLocation import *
 import matplotlib.pyplot as plt

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 5 - 4
examples/notebook/.ipynb_checkpoints/SinGen-checkpoint.ipynb


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 5 - 4
examples/notebook/SinGen.ipynb


+ 26 - 3
src/CBD/lib/endpoints.py

@@ -16,6 +16,14 @@ class CollectorBlock(BaseBlock):
 	def compute(self, curIteration):
 		raise NotImplementedError()
 
+	def clear(self):
+		"""
+		Clears the contents of the block. Must be called in-between
+		simulations if the obtainable statistics do not need to
+		interfere/retain information about previous simulations.
+		"""
+		raise NotImplementedError()
+
 
 class SignalCollectorBlock(CollectorBlock):
 	"""
@@ -29,8 +37,15 @@ class SignalCollectorBlock(CollectorBlock):
 		value = self.getInputSignal(curIteration, "IN1").value
 		self.data.append((time, value))
 
+	def clear(self):
+		self.data.clear()
+
 	@property
 	def data_xy(self):
+		"""
+		The collected data, as a pair of lists; i.e. the unzipped form of
+		:code:`xs, ys`.
+		"""
 		return [x for x, _ in self.data], [y for _, y in self.data]
 
 
@@ -46,8 +61,15 @@ class PositionCollectorBlock(CollectorBlock):
 		y = self.getInputSignal(curIteration, "Y").value
 		self.data.append((x, y))
 
+	def clear(self):
+		self.data.clear()
+
 	@property
 	def data_xy(self):
+		"""
+		The collected data, as a pair of lists; i.e. the unzipped form of
+		:code:`xs, ys`.
+		"""
 		return [x for x, _ in self.data], [y for _, y in self.data]
 
 
@@ -60,11 +82,12 @@ class StatisticsCollectorBlock(CollectorBlock):
 	When only statistical info is required and a lot of data needs to
 	be analyzed, this algorithm should be used!
 
-	Note: this block only works for NUMERICAL data.
+	Note:
+		This block only works for **NUMERICAL** data.
 	"""
 	def __init__(self, name):
 		CollectorBlock.__init__(self, name, ["IN1"], {})
-		self.clean()
+		self.clear()
 
 	def compute(self, curIteration):
 		data = self.getInputSignal(curIteration, "IN1").value
@@ -74,7 +97,7 @@ class StatisticsCollectorBlock(CollectorBlock):
 		self.data["min"] = min(self.data["min"], data)
 		self.data["max"] = max(self.data["max"], data)
 
-	def clean(self):
+	def clear(self):
 		"""
 		Resets the values of the statistics.
 		Should be called when the model is used in multiple

+ 22 - 28
src/CBD/realtime/plotting.py

@@ -1,5 +1,6 @@
 
 try:
+	import matplotlib.pyplot as plt
 	import matplotlib.animation as animation
 	_MPL_FOUND = True
 except ImportError:
@@ -13,7 +14,6 @@ except ImportError:
 
 # TODO: Bokeh (see TODOs), GGplot, Seaborn
 # Note: Seaborn is built on top of matplotlib
-# TODO: Jupyter?
 
 class Backend:
 	"""
@@ -120,8 +120,8 @@ class PlotHandler:
 		# obtaining information
 		self.__get_data = lambda obj: obj.data_xy
 		self.__events = {
-			"update_event": [],
-			"close_event": []
+			"update": [],
+			"closed": []
 		}
 
 		# backend info:
@@ -132,7 +132,7 @@ class PlotHandler:
 		elif backend == Backend.BOKEH:
 			curdoc().add_periodic_callback(lambda: self.update(), interval)
 			# TODO (is this even possible?):
-			curdoc().on_session_destroyed(lambda ctx: self.close_event())
+			curdoc().on_session_destroyed(lambda ctx: self.__close_event())
 
 	def signal(self, name, *args):
 		"""
@@ -140,9 +140,9 @@ class PlotHandler:
 
 		The accepted signals are:
 
-		- :code:`update_event(data)`: Raised whenever the plot updates. It takes the
+		- :code:`update(data)`: Raised whenever the plot updates. It takes the
 		  new plot data that has been polled.
-		- :code:`close_event`: Raised whenever the plot closes. No additional arguments
+		- :code:`closed`: Raised whenever the plot closes. No additional arguments
 		  are associated with this event.
 
 		Note:
@@ -170,9 +170,9 @@ class PlotHandler:
 		The functions will be called in the order they were connected to the
 		events, with the associated arguments. The accepted signals are:
 
-		- :code:`update_event(data)`: Raised whenever the plot updates. It takes the
+		- :code:`update(data)`: Raised whenever the plot updates. It takes the
 		  new plot data that has been polled.
-		- :code:`close_event`: Raised whenever the plot closes. No additional arguments
+		- :code:`closed`: Raised whenever the plot closes. No additional arguments
 		  are associated with this event.
 
 		Args:
@@ -213,7 +213,7 @@ class PlotHandler:
 		"""
 		return self.__ani
 
-	def close_plot(self):
+	def close_event(self):
 		"""
 		Closes the plot/figure associated with this handler.
 
@@ -221,29 +221,24 @@ class PlotHandler:
 			:func:`PlotHandler.close_event`
 		"""
 		if self.kind.is_backend(Backend.MPL):
-			# TODO: AttributeError: 'Figure' object has no attribute 'close'
-			self.figure[0].close()
+			plt.close(self.figure[0])
 		elif self.kind.is_backend(Backend.BOKEH):
 			# TODO
 			pass
-
-	def close_event(self):
-		"""
-		Closes the plots and raises the `close_event` signal.
-		"""
-		self.close_plot()
+		# Make sure we close the plot if the backend fails to do so
 		self.__close_event()
 
 	def __close_event(self):
 		"""
-		Raises the `close_event` signal.
+		Raises the `closed` signal.
 
 		Note:
 			This function is only used in the backend to prevent double
 			closing of the plots.
 		"""
-		self.__opened = False
-		self.signal('close_event')
+		if self.__opened:
+			self.__opened = False
+			self.signal('closed')
 
 	def is_opened(self):
 		"""
@@ -255,10 +250,9 @@ class PlotHandler:
 		"""
 		Updates the plot information.
 		"""
-		# TODO: automatically terminate at end of simulation
 		data = self.get_data()
 		self.kind.update(self.elm, *data)
-		self.signal('update_event', data)
+		self.signal('update', data)
 
 	def terminate(self):
 		"""
@@ -269,7 +263,7 @@ class PlotHandler:
 		elif self.kind.is_backend(Backend.BOKEH):
 			# TODO
 			pass
-		#self.close_event()
+		self.close_event()
 
 
 def follow(data, size, lower_bound=-float('inf'), upper_bound=float('inf'), perc_keep=0.5):
@@ -310,7 +304,7 @@ def follow(data, size, lower_bound=-float('inf'), upper_bound=float('inf'), perc
 
 			manager = PlotManager()
 			manager.register("sin", cbd.findBlock("plot")[0], (fig, ax), LinePlot())
-			manager.connect('sin', 'update_event', lambda d, a=ax: a.set_xlim(follow(d[0], 10.0, lower_bound=0.0)))
+			manager.connect('sin', 'update', lambda d, a=ax: a.set_xlim(follow(d[0], 10.0, lower_bound=0.0)))
 
 		- Follow a sine wave in the negative-x direction, always keeping a width of 10, in matplotlib.
 
@@ -318,7 +312,7 @@ def follow(data, size, lower_bound=-float('inf'), upper_bound=float('inf'), perc
 
 			manager = PlotManager()
 			manager.register("sin", cbd.findBlock("plot")[0], (fig, ax), LinePlot())
-			manager.connect('sin', 'update_event', lambda d, a=ax: a.set_xlim(follow(d[0], 10.0, upper_bound=0.0)))
+			manager.connect('sin', 'update', lambda d, a=ax: a.set_xlim(follow(d[0], 10.0, upper_bound=0.0)))
 
 		- Follow a positive sine-wave, but keep a 10% margin from the right edge of the plot, in matplotlib.
 
@@ -326,7 +320,7 @@ def follow(data, size, lower_bound=-float('inf'), upper_bound=float('inf'), perc
 
 			manager = PlotManager()
 			manager.register("sin", cbd.findBlock("plot")[0], (fig, ax), LinePlot())
-			manager.connect('sin', 'update_event', lambda d, a=ax: a.set_xlim(follow(d[0], 10.0, 0.0, perc_keep=0.9)))
+			manager.connect('sin', 'update', lambda d, a=ax: a.set_xlim(follow(d[0], 10.0, 0.0, perc_keep=0.9)))
 	"""
 	assert lower_bound < upper_bound, "Lower bound must be strictly smaller than the upper bound."
 	assert upper_bound - lower_bound >= size, "Invalid size: outside bounds."
@@ -611,7 +605,7 @@ def mpl():
 	manager = PlotManager()
 	manager.register("sin", __Block('sin'), (fig, ax), ScatterPlot())
 	manager.register("cos", __Block('cos'), (fig, ax), LinePlot(c='red'))
-	manager.connect('sin', 'update_event', lambda d, axis=ax: axis.set_xlim(PlotHandler.follow(d[0], 10.0, 0.0)))
+	manager.connect('sin', 'update', lambda d, axis=ax: axis.set_xlim(PlotHandler.follow(d[0], 10.0, 0.0)))
 
 	plt.show()
 
@@ -634,7 +628,7 @@ def bkh():
 		lower, upper = limits
 		fig.x_range.start = lower
 		fig.x_range.end = upper
-	manager.connect('sin', 'update_event', lambda d: set_xlim(PlotHandler.follow(d[0], 10.0, 0.0)))
+	manager.connect('sin', 'update', lambda d: set_xlim(PlotHandler.follow(d[0], 10.0, 0.0)))
 
 	session = push_session(curdoc())
 	session.show()

+ 12 - 6
src/CBD/simulator.py

@@ -96,8 +96,9 @@ class Simulator:
 		self.__lasttime = None
 
 		self.__events = {
-                        "finished_event": []
-                }
+			"started": [],
+			"finished": []
+		}
 		
 		# TODO: make this variable, given more solver implementations
 		self.__solver = GaussianJordanLinearSolver(self.__logger)
@@ -133,6 +134,7 @@ class Simulator:
 			self.__realtime_start_time = time.time()
 			self.__lasttime = -self.getDeltaT()     # Schedule next event at time 0
 
+		self.signal("started")
 		self.__runsim()
 
 	def __finish(self):
@@ -143,7 +145,7 @@ class Simulator:
 		if not self.__progress:
 			# Whenever the progress bar is initialized, wait until it ends
 			self.__progress_finished = True
-		self.signal("finished_event")
+		self.signal("finished")
 
 	def __check(self):
 		"""
@@ -514,12 +516,14 @@ class Simulator:
 		The functions will be called in the order they were connected to the
 		events, with the associated arguments. The accepted signals are:
 
-		- :code:`finished_event`: Raised whenever the simulation finishes.
+		- :code:`started`: Raised whenever the simulation setup has completed,
+		  but before the actual simulation begins.
+		- :code:`finished`: Raised whenever the simulation finishes.
 
 		Args:
 			name (str):     The name of the signal to raise.
 			function:       A function that will be called with the optional arguments
-					whenever the event is raised.
+							whenever the event is raised.
 		"""
 		if name not in self.__events:
 			raise ValueError("Invalid signal '%s' in Simulator." % name)
@@ -531,7 +535,9 @@ class Simulator:
 
 		The accepted signals are:
 
-		- :code:`finished_event`: Raised whenever the simulation finishes.
+		- :code:`started`: Raised whenever the simulation setup has completed,
+		  but before the actual simulation begins.
+		- :code:`finished`: Raised whenever the simulation finishes.
 
 		Note:
 			Normally, users do not need to call this function.

+ 2 - 1
whishlist.txt

@@ -39,6 +39,7 @@
 
 * Verbose simulation output?
   ---> Later, together with SysLog server and visualizer
+       (Maybe using XML/VCD/...)
        As part of generic "simulation library".
 
-* Plotting: seaborn, ggplot, jupyter
+* Plotting: seaborn, ggplot