Changeset 78

Show
Ignore:
Timestamp:
05/24/07 14:58:23 (1 year ago)
Author:
apdavison
Message:

The documentation is now 'good enough' for release.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/0.3/common.py

    r77 r78  
     1# encoding: utf-8 
    12""" 
    23Defines the PyNN classes and functions, and hence the FACETS API. 
  • branches/0.3/doc/highlevelapi.txt

    r76 r78  
    353353======= 
    354354 
    355 There are several examples of networks built with the high-level API in the ``test`` directory
     355There are several examples of networks built with the high-level API in the ``test`` directory of the source distribution
  • branches/0.3/doc/installation.txt

    r28 r78  
    33============ 
    44 
    5 Installing Python 
    6 ================= 
     5Use of PyNN_ requires that you have Python and the numpy_ package installed, plus at least one of the supported simulators: NEURON, NEST or PCSIM. 
    76 
    8 We assume this is installed on your machine already. If not, we suggest you install it via the package manager of your Linux distribution [OS X instructions?]. If this is not possible, go to `<http://www.python.org>`_ and follow the instructions you find there. 
    97 
    108Installing NEURON 
     
    1311Download the sources for the latest release of NEURON, in ``.tar.gz`` format, from `<http://www.neuron.yale.edu/neuron/install/install.html>`_. Also download Interviews from the same location. 
    1412 
    15 Compile Interviews and NEURON according to the instructions given at `<http://www.neuron.yale.edu/neuron/install/compile_unix.html#fullinstall>`_ [what about OS X?], except that when you run ``configure``, add the options ``--with-nrnpython`` and ``--with-mpi`` (the latter assumes you have the MPICH library installed on your machine [should we give instructions?]), i.e.:: 
     13Compile Interviews and NEURON according to the instructions given at `<http://www.neuron.yale.edu/neuron/install/compile_unix.html#fullinstall>`_, except that when you run ``configure``, add the options ``--with-nrnpython`` and, optionally, ``--with-mpi`` (the latter assumes you have the MPICH library installed on your machine), i.e.:: 
    1614 
    1715    $ ./configure --prefix=`pwd` --with-nrnpython --with-mpi 
     
    2220 
    2321    $ nrniv -python 
    24     insert NEURON output here 
     22    NEURON -- Release 5.9.9 (1529) 2006-09-11 
     23    by John W. Moore, Michael Hines, and Ted Carnevale 
     24    Duke and Yale University -- Copyright 1984-2006 
     25 
    2526    >>> import hoc 
    2627    >>> import nrn    
     
    2930========================== 
    3031 
     32NEST can be downloaded from `<http://www.nest-initiative.org/?page=Software&subpage=Download>`_. 
     33Installation instructions are available from `<http://www.nest-initiative.uni-freiburg.de/helpdesk/synod2/doc/install.html>`_. 
     34 
     35Check out PyNEST from the following Subversion repository (contact the NEST developers for access):: 
     36 
     37    $ svn co svn+ssh://facets@www.nest-initiative.uni-freiburg.de/facets/trunk pynest 
     38    $ cd pynest 
     39     
     40Set the ``SLIHOME`` environment variable to your NEST source installation and ``SLIBUILD`` to your NEST build directory, e.g. (for bash):: 
     41 
     42    $ export SLIHOME=/usr/src/nest-1.0.13 
     43    $ export SLIBUILD=$SLIHOME/build 
     44     
     45Finally, build and install PyNEST:: 
     46 
     47    $ python setup.py install 
     48     
     49This will install it to your python ``site-packages`` directory, and may require root privileges. 
     50If you wish to install it elsewhere:: 
     51 
     52    $ python setup.py install --prefix=/where/to/install/pynest 
     53     
     54and then set the ``PYTHONPATH`` environment variable appropriately, e.g.:: 
     55     
     56    $ export PYTHONPATH=$PYTHONPATH:/where/to/install/pynest/lib/python2.4/site-packages/ 
     57 
     58Now try it out:: 
     59 
     60    $ cd ~  
     61    $ python  
     62    >>> import pynest  
     63    >>> pynest.sps([1,2,3])  
     64    >>> pynest.spp()  
     65    [1, 2, 3] 
     66 
     67 
     68Installing PCSIM 
     69================ 
     70 
     71PCSIM_ is available by svn as follows: 
     72 
     73    $ svn co https://pcsim.svn.sourceforge.net/svnroot/pcsim pcsim 
     74 
     75For compilation instructions, see the files in the ``HowTos`` directory. 
     76 
     77 
    3178Installing PyNN 
    3279=============== 
    3380 
    34 A link to download PyNN can be found on the `PyNN homepage`_. 
     81The easiest way to get PyNN is to download the latest source distribution from the `PyNN download page`_, then run the setup script, e.g.:: 
     82 
     83    $ tar xzf PyNN-0.3.0.tar.gz 
     84    $ cd PyNN-0.3.0 
     85    $ python setup.py install 
     86     
     87This will install it to your python ``site-packages`` directory, and may require root privileges. If you wish to install it elsewhere use the ``--prefix`` option, and set the ``PYTHONPATH`` environment variable accordingly (see above). 
     88 
     89Test it using something like the following:: 
     90 
     91    >>> from pyNN.nest import * 
     92    >>> setup() 
     93    >>> end() 
     94     
     95(This assumes you have PyNEST installed). 
     96 
     97If you wish to use NEURON, there is are some additional steps. 
     98 
     991. Copy the ``hoc`` directory of the source distribution to the pyNN installation directory, e.g.:: 
     100 
     101    $ cp hoc /usr/lib/python/site-packages/pyNN 
     102 
     1032. Move to this directory, and compile the mod files:: 
     104 
     105    $ cd /usr/lib/python/site-packages/pyNN/hoc 
     106    $ nrnivmodl 
     107    $ alias nrnpython='/usr/lib/python/site-packages/pyNN/hoc/i686/special -python' 
     108     
     109Again, you are likely to need root privileges. 
     110 
     111You should now be able to run PyNN with NEURON as the simulator:: 
     112 
     113    $ nrnpython 
     114    NEURON -- Release 5.9.9 (1529) 2006-09-11 
     115    by John W. Moore, Michael Hines, and Ted Carnevale 
     116    Duke and Yale University -- Copyright 1984-2006 
     117 
     118    loading membrane mechanisms from /usr/lib/python/site-packages/pyNN/hoc/i686/.libs/libnrnmech.so 
     119    Additional mechanisms from files 
     120     alphaisyn.mod alphasyn.mod expisyn.mod refrac.mod reset.mod stdwa_softlimits.mod 
     121     stdwa_songabbott.mod stdwa_symm.mod vecstim.mod 
     122    >>> from pyNN.neuron import * 
     123     
     124If your model relies on other NMODL mechanisms, copy the mod files from pyNN/hoc to the directory in which they are contained, run ``nrnivmodl`` again, and modify the ``nrnpython`` alias accordingly. 
    35125 
    36126 
    37  
    38 enter the ``hoc`` directory and run ``nrnivmodl`` 
    39  
    40 .. _`PyNN homepage`: http://neuralensemble.kip.uni-heidelberg.de/trac/PyNN 
    41  
     127.. _PyNN: http://neuralensemble.kip.uni-heidelberg.de/trac/PyNN 
     128.. _numpy: http://numpy.scipy.org/ 
     129.. _PCSIM: http://sourceforge.net/projects/pcsim/ 
     130.. _`PyNN download page`: https://neuralensemble.kip.uni-heidelberg.de/trac/PyNN/wiki/Download 
  • branches/0.3/doc/introduction.txt

    r28 r78  
    22Introduction 
    33============ 
     4 
     5PyNN (pronounced 'pine' ) is a Python package for simulator-independent specification of neuronal network models.  
     6 
     7In other words, you can write the code for a model once, using the PyNN API, and then run it without modification on any simulator that PyNN supports (currently NEURON_, NEST_ and PCSIM_).  
     8 
     9The API has two parts, a low-level, procedural API, similar to that in PyNEST (functions ``create()``, ``connect()``, ``set()``, ``record()``, ``record_v()``), and a [wiki:HighLevelAPI high-level, object-oriented API] (classes ``Population`` and ``Projection``, which have methods like ``set()``, ``record()``, ``setWeights()``, etc.).  
     10 
     11The low-level API is good for small networks, and perhaps gives more flexibility. The high-level API is good for hiding the details and the book-keeping. 
     12 
     13The other thing that is required to write a model once and run it on multiple simulators is standard cell models. PyNN translates standard cell-model names and parameter names into simulator-specific names, e.g. standard model ``IF_curr_alpha`` is ``iaf_neuron`` in NEST and ``StandardIF`` in NEURON, while ``SpikeSourcePoisson`` is a ``poisson_generator`` in NEST and a ``NetStim`` in NEURON. Only a few cell models have been implemented so far. 
     14 
     15Please note that PyNN is currently very experimental. The code is released under the CeCILL_ licence. 
     16  
     17.. _CeCILL: http://www.cecill.info/ 
     18.. _NEURON: http://www.neuron.yale.edu/neuron/ 
     19.. _NEST:   http://www.nest-initiative.org/?page=Software 
     20.. _PCSIM:  http://sourceforge.net/projects/pcsim/ 
  • branches/0.3/doc/lowlevelapi.txt

    r76 r78  
    202202======= 
    203203 
    204 We now give a full example of a PyNN simulation script:: 
    205  
    206     from pyNN.nest import * 
    207      
    208     <insert IF_curr_alpha.py here (with line numbers?)> 
    209      
    210 To run the script with NEURON, replace the first line with:: 
    211  
    212     from pyNN.neuron import * 
    213      
    214 and to run the script with PCSIM:: 
    215  
    216     from pyNN.pcsim import * 
    217      
     204There are several example scripts in the ``test`` directory of the source distribution. 
     205     
  • branches/0.3/doc/standardmodels.txt

    r48 r78  
    9696Name          Default value  Units   Description 
    9797============  =============  ======  ========================== 
    98 ``rate`       0.0            s^`-1`  Mean spike frequency 
     98``rate``      0.0            s^`-1`  Mean spike frequency 
    9999``start``     0.0            ms      Start time 
    100100``duration``  10^9           ms      Duration of spike sequence