From 286ff4631ed3662986eb99c8cc912be152ae0aed Mon Sep 17 00:00:00 2001 From: "Olivier J.N. Bertrand" <olivier.bertrand@uni-bielefeld.de> Date: Thu, 4 Jan 2018 00:45:29 +0100 Subject: [PATCH] Improve the doc and change its template as in readthedoc --- doc/source/analysing.rst | 14 -------------- doc/source/comparing.rst | 27 ++++++++++++++++++++------- doc/source/computing.rst | 11 ----------- doc/source/conf.py | 4 ++-- doc/source/gettingstarted.rst | 23 +++++++++++++++++++++++ doc/source/index.rst | 21 ++++++++++++++++----- navipy/comparing/__init__.py | 1 + setup.py | 2 +- 8 files changed, 63 insertions(+), 40 deletions(-) delete mode 100644 doc/source/analysing.rst delete mode 100644 doc/source/computing.rst diff --git a/doc/source/analysing.rst b/doc/source/analysing.rst deleted file mode 100644 index e8147d2..0000000 --- a/doc/source/analysing.rst +++ /dev/null @@ -1,14 +0,0 @@ -Analysing -========= - -Finding catchment areas ------------------------ - -Attractor type --------------- - -Does my agent go home? ----------------------- - -Catchment area around a or few goals ------------------------------------- diff --git a/doc/source/comparing.rst b/doc/source/comparing.rst index 1eebda9..7d9a4ad 100644 --- a/doc/source/comparing.rst +++ b/doc/source/comparing.rst @@ -1,14 +1,27 @@ Comparing ========= -Talk about memory +.. automodule:: navipy.comparing -Image difference (IDF) ----------------------- +Place code +---------- + +Image diff +~~~~~~~~~~ +.. autofunction:: navipy.comparing.simple_imagediff -Rotational image difference (rIDF) ----------------------------------- +Euclidian image diff +~~~~~~~~~~~~~~~~~~~~ +.. autofunction:: navipy.comparing.imagediff -Familiarity network (Infomax) ------------------------------ +Rotational image difference function +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.. autofunction:: navipy.comparing.rot_imagediff +Differential optic flow +~~~~~~~~~~~~~~~~~~~~~~~ +.. autofunction:: navipy.comparing.diff_optic_flow + + +Memory in networks +------------------ diff --git a/doc/source/computing.rst b/doc/source/computing.rst deleted file mode 100644 index 05619e1..0000000 --- a/doc/source/computing.rst +++ /dev/null @@ -1,11 +0,0 @@ -Computing -========= - -From rotational image differences ---------------------------------- - -From average place-code vector ------------------------------- - -From familiarity network ------------------------- diff --git a/doc/source/conf.py b/doc/source/conf.py index 8a2e022..33bcd90 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -42,7 +42,7 @@ extensions = ['matplotlib.sphinxext.only_directives', 'sphinx.ext.coverage', 'sphinx.ext.mathjax', 'sphinx.ext.viewcode', - 'sphinx.ext.githubpages'] + 'sphinx.ext.graphviz'] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -94,7 +94,7 @@ todo_include_todos = True # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # -html_theme = 'alabaster' +html_theme = 'sphinx_rtd_theme' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the diff --git a/doc/source/gettingstarted.rst b/doc/source/gettingstarted.rst index a13831d..5a07d02 100644 --- a/doc/source/gettingstarted.rst +++ b/doc/source/gettingstarted.rst @@ -1,2 +1,25 @@ Getting started =============== + +Installing navipy +----------------- + +.. code-block:: bash + + python setup.py install + +Testing navipy +-------------- + +.. code-block:: bash + + python -m unittest discover navipy + + +The core modules +---------------- + +* Rendering +* Processing +* Comparing +* Moving diff --git a/doc/source/index.rst b/doc/source/index.rst index a034d2d..d4217a2 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -3,19 +3,30 @@ You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. -Welcome to Navigation Toolbox's documentation! -============================================== +About navipy +============ +Navipy is a package providing method to simulate a navigating agent in realistic environment. Navipy make use of the blender rendering engine and its python API. Therefore any environment that can be realised with blender, can be used by navipy. Blender rendering may however be too slow to test different model of navigation or the different parameters of a given model. To speed up the simulation, the scene at relevant location in the environment can be stored in a database. Then, instead of rendering the scene again, it is simply loaded from the database. The agent can, thus, jump from relevant location to the next (i.e. move on a grid) without the need to use the blender API. Moreover, certain models of navigation do not depend on the history of the agent, but instead associate a moving direction to the current agent location. With such model, a graph can be created from the moving direction at each location on a grid of relevant places. The graph make use of the package networkx, thus attracting points or loop can be found, the possible connection from one point on the grid to another can be assessed, the number of independent sub graph can be calculated, etc. + +Goals +===== +The navigation toolbox aims to bring in an intuitive python toolbox different methods to model the visual navigation of a virtual agent. + +* Keep the interface simple +* Allow complex environments and realistic world scenario +* Implement the most popular model of insect navigation +* Avoid re-rendering by using grid constrained motion. + +Content +======= .. toctree:: :maxdepth: 1 - + gettingstarted rendering processing comparing - computing moving - analysing database diff --git a/navipy/comparing/__init__.py b/navipy/comparing/__init__.py index 703cb55..a871b80 100644 --- a/navipy/comparing/__init__.py +++ b/navipy/comparing/__init__.py @@ -75,6 +75,7 @@ the current and memorised place code. Current opinion in neurobiology ..note: assume that the image is periodic along the x axis (the left-right axis) + """ if not is_ibpc(current): # and not is_obpc(current): raise TypeError('The current and memory place code\ diff --git a/setup.py b/setup.py index 05847f7..8a43804 100644 --- a/setup.py +++ b/setup.py @@ -29,7 +29,7 @@ setup_dict = {'name': 'navipy', 'description': 'Insect Navigation Toolbox', 'packages': create_package_list("navipy"), 'requires': ['numpy', 'pandas', 'matplotlib', 'scipy'], - 'install_requires': ["numpy", 'pandas', 'matplotlib', 'scipy'], + 'install_requires': ["numpy", 'pandas', 'matplotlib', 'scipy', 'sphinx_rtd_theme', 'pydot'], 'package_data': {'navipy': ['resources/database.db']}, 'include_package_data': True, } -- GitLab