Skip to content

Commit 52626d8

Browse files
author
Andrew Davison
committed
Documentation update
[skip ci]
1 parent bbbc62e commit 52626d8

6 files changed

Lines changed: 67 additions & 27 deletions

File tree

AUTHORS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ The following people have contributed to PyNN. Their affiliations at the time of
2525
* Shailesh Appukuttan [1]
2626
* Elodie Legouée [1]
2727
* Joffrey Gonin [1]
28+
* Ankur Sinha [18]
2829

2930

3031
1. Unité de Neuroscience, Information et Complexité, CNRS, Gif sur Yvette, France
@@ -44,3 +45,4 @@ The following people have contributed to PyNN. Their affiliations at the time of
4445
15. PDC, KTH, Stockholm, Sweden
4546
16. Institute of Neuroscience and Medicine (INM-6), Jülich Research Center, Jülich, Germany
4647
17. Okinawa Institute of Science and Technology (OIST), Onna-son, Okinawa, Japan
48+
18. Biocomputation group, University of Hertfordshire, Hatfield, United Kingdom.

doc/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ class MockNESTModule(mock.Mock):
8080
# The short X.Y version.
8181
version = '0.9'
8282
# The full version, including alpha/beta/rc tags.
83-
release = '0.9.2'
83+
release = '0.9.3'
8484

8585
# The language for content autogenerated by Sphinx. Refer to documentation
8686
# for a list of supported languages.

doc/download.txt

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ Downloads
55
Source distributions
66
--------------------
77

8-
The `latest stable version of PyNN`_ (0.8.1) may be downloaded from the
9-
`Python Package Index`_ or from the `INCF Software Centre`_. This is recommended for
8+
The `latest stable version of PyNN`_ (0.9.3) may be downloaded from the
9+
`Python Package Index`_. This is recommended for
1010
anyone using PyNN for the first time.
1111

1212
If you need support for a previous version of the API, the packages can be downloaded from
@@ -24,23 +24,6 @@ Older versions:
2424
* `0.7.0 <https://pypi.python.org/pypi/PyNN/0.7.0>`_
2525
* `0.6.0 <https://pypi.python.org/pypi/PyNN/0.6.0>`_
2626
* `0.5.0 <https://pypi.python.org/pypi/PyNN/0.5.0>`_
27-
* `0.4.1 <http://neuralensemble.org/trac/PyNN/attachment/wiki/Download/PyNN-0.4.1.tar.gz>`_
28-
* `0.4.0 <http://neuralensemble.org/trac/PyNN/attachment/wiki/Download/PyNN-0.4.0.tar.gz>`_
29-
* `0.3.0 <http://neuralensemble.org/trac/PyNN/attachment/wiki/Download/PyNN-0.3.0.tar.gz>`_
30-
31-
32-
Linux packages
33-
--------------
34-
35-
* `Debian 7.0 (Wheezy)`_ (0.7.4)
36-
* `Debian 8.0 (Jessie)`_ (0.7.4)
37-
* `Debian unstable (Sid)`_ (0.7.4)
38-
* `Ubuntu 12.04 (Precise)`_ (0.7.0)
39-
* `Ubuntu 14.04 (Trusty)`_ (0.7.4)
40-
* `Ubuntu 15.04 (Vivid)`_ (0.7.4)
41-
42-
(many thanks to the NeuroDebian_ guys for packaging PyNN for Debian.
43-
More up-to-date packages are often available from the NeuroDebian repository.)
4427

4528

4629
Latest source code from GitHub

doc/installation.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,11 @@ The easiest way to get PyNN is to use pip_::
2828

2929
$ pip install pyNN
3030

31-
If you are running Debian or Ubuntu, there are :doc:`binary packages <download>`
32-
available. If you would prefer to install manually, :doc:`download the latest
31+
If you would prefer to install manually, :doc:`download the latest
3332
source distribution <download>`, then run the setup script, e.g.::
3433

35-
$ tar xzf PyNN-0.9.2.tar.gz
36-
$ cd PyNN-0.9.2
34+
$ tar xzf PyNN-0.9.3.tar.gz
35+
$ cd PyNN-0.9.3
3736
$ python setup.py install
3837

3938
This will install it to your Python :file:`site-packages` directory, and may

doc/parameters.txt

Lines changed: 58 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,10 +147,65 @@ the same time:
147147

148148
.. todo:: in the above, give current source examples, and Projection examples
149149

150-
Time series parameters
151-
======================
150+
Time series and array-valued parameters
151+
=======================================
152+
153+
For certain neuron models (:class:`SpikeSourceArray`, :class:`GIF_cond_exp`)
154+
and current sources, the individual parameter values are not single numbers
155+
(with physical units), but arrays, e.g.:
156+
157+
.. code-block:: python
158+
159+
celltype = SpikeSourceArray(np.array([5.0, 15.0, 45.0, 99.0]))
160+
161+
to set the same spike times for the entire population.
162+
To set different spike times for each cell in the population requires an array of arrays.
163+
To avoid ambiguities in this situation, the inner arrays should be wrapped by the
164+
:class:`Sequence` class, e.g.:
165+
166+
.. code-block:: python
167+
168+
celltype = SpikeSourceArray([Sequence([5.0, 15.0, 45.0, 99.0]),
169+
Sequence([2.0, 5.3, 18.9]),
170+
Sequence([17.8, 88.2, 100.1])
171+
])
172+
173+
Such an array-of-Sequences can also be provided by a generator function, e.g.:
174+
175+
.. code-block:: python
176+
177+
number = int(2 * simtime * input_rate / 1000.0)
178+
179+
def generate_spike_times(i):
180+
gen = lambda: Sequence(numpy.add.accumulate(numpy.random.exponential(1000.0 / input_rate, size=number)))
181+
if hasattr(i, "__len__"):
182+
return [gen() for j in i]
183+
else:
184+
return gen()
185+
186+
celltype = SpikeSourceArray(spike_times=generate_spike_times)
187+
188+
189+
As a generalization of :class:`Sequence`, some models require array-valued parameters,
190+
expressed as tuples or :class:`ArrayParameter` instances, e.g.:
191+
192+
.. code-block:: python
193+
194+
cell_type = GIF_cond_exp(
195+
...
196+
# this parameter has the same value in all neurons in the population
197+
tau_gamma=(1.0, 10.0, 100.0), # Time constants for spike-frequency adaptation in ms.
198+
# the following parameter has different values for each neuron
199+
a_eta=[(0.1, 0.1, 0.1), # Post-spike increments for spike-triggered current in nA
200+
(0.0, 0.0, 0.0),
201+
(0.0, 0.0, 0.0),
202+
(0.0, 0.0, 0.0)]
203+
...)
152204

153-
.. todo:: discuss spike trains, current sources, Sequence class
205+
.. note:: The reason for defining :class:`Sequence` and :class:`ArrayParameter`
206+
rather than just using a plain NumPy array is to avoid the ambiguity of
207+
"is a given array a single parameter value (e.g. a spike train for one cell)
208+
or an array of parameter values (e.g. one number per cell)?".
154209

155210

156211
Setting initial values

doc/release_notes.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Release notes
66
.. toctree::
77
:maxdepth: 1
88

9+
releases/0.9.3.txt
910
releases/0.9.2.txt
1011
releases/0.9.1.txt
1112
releases/0.9.0.txt

0 commit comments

Comments
 (0)