Changeset 78
- Timestamp:
- 05/24/07 14:58:23 (1 year ago)
- Files:
-
- branches/0.3/common.py (modified) (1 diff)
- branches/0.3/doc/highlevelapi.txt (modified) (1 diff)
- branches/0.3/doc/installation.txt (modified) (4 diffs)
- branches/0.3/doc/introduction.txt (modified) (1 diff)
- branches/0.3/doc/lowlevelapi.txt (modified) (1 diff)
- branches/0.3/doc/standardmodels.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/0.3/common.py
r77 r78 1 # encoding: utf-8 1 2 """ 2 3 Defines the PyNN classes and functions, and hence the FACETS API. branches/0.3/doc/highlevelapi.txt
r76 r78 353 353 ======= 354 354 355 There are several examples of networks built with the high-level API in the ``test`` directory .355 There 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 3 3 ============ 4 4 5 Installing Python 6 ================= 5 Use of PyNN_ requires that you have Python and the numpy_ package installed, plus at least one of the supported simulators: NEURON, NEST or PCSIM. 7 6 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.9 7 10 8 Installing NEURON … … 13 11 Download 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. 14 12 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.::13 Compile 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.:: 16 14 17 15 $ ./configure --prefix=`pwd` --with-nrnpython --with-mpi … … 22 20 23 21 $ 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 25 26 >>> import hoc 26 27 >>> import nrn … … 29 30 ========================== 30 31 32 NEST can be downloaded from `<http://www.nest-initiative.org/?page=Software&subpage=Download>`_. 33 Installation instructions are available from `<http://www.nest-initiative.uni-freiburg.de/helpdesk/synod2/doc/install.html>`_. 34 35 Check 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 40 Set 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 45 Finally, build and install PyNEST:: 46 47 $ python setup.py install 48 49 This will install it to your python ``site-packages`` directory, and may require root privileges. 50 If you wish to install it elsewhere:: 51 52 $ python setup.py install --prefix=/where/to/install/pynest 53 54 and then set the ``PYTHONPATH`` environment variable appropriately, e.g.:: 55 56 $ export PYTHONPATH=$PYTHONPATH:/where/to/install/pynest/lib/python2.4/site-packages/ 57 58 Now 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 68 Installing PCSIM 69 ================ 70 71 PCSIM_ is available by svn as follows: 72 73 $ svn co https://pcsim.svn.sourceforge.net/svnroot/pcsim pcsim 74 75 For compilation instructions, see the files in the ``HowTos`` directory. 76 77 31 78 Installing PyNN 32 79 =============== 33 80 34 A link to download PyNN can be found on the `PyNN homepage`_. 81 The 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 87 This 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 89 Test 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 97 If you wish to use NEURON, there is are some additional steps. 98 99 1. 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 103 2. 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 109 Again, you are likely to need root privileges. 110 111 You 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 124 If 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. 35 125 36 126 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 2 2 Introduction 3 3 ============ 4 5 PyNN (pronounced 'pine' ) is a Python package for simulator-independent specification of neuronal network models. 6 7 In 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 9 The 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 11 The 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 13 The 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 15 Please 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 202 202 ======= 203 203 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 204 There are several example scripts in the ``test`` directory of the source distribution. 205 branches/0.3/doc/standardmodels.txt
r48 r78 96 96 Name Default value Units Description 97 97 ============ ============= ====== ========================== 98 ``rate` 0.0 s^`-1` Mean spike frequency98 ``rate`` 0.0 s^`-1` Mean spike frequency 99 99 ``start`` 0.0 ms Start time 100 100 ``duration`` 10^9 ms Duration of spike sequence

