Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The following people have contributed to PyNN. Their affiliations at the time of the contributions are shown below.

* Andrew Davison [1]
* Andrew Davison [1, 20]
* Pierre Yger [1, 9]
* Eilif Muller [7, 13]
* Jens Kremkow [5,6]
Expand All @@ -22,9 +22,14 @@ The following people have contributed to PyNN. Their affiliations at the time of
* Jannis Schücker [16]
* Maximilian Schmidt [16]
* Christian Roessert [13]
* Shailesh Appukuttan [1]
* Shailesh Appukuttan [1, 20]
* Elodie Legouée [1]
* Joffrey Gonin [1]
* Ankur Sinha [18]
* Håkon Mørk [19]
* Andrei Moise [20]
* Onur Ates [20]
* Rémy Cagnol [21]


1. Unité de Neuroscience, Information et Complexité, CNRS, Gif sur Yvette, France
Expand All @@ -44,3 +49,7 @@ The following people have contributed to PyNN. Their affiliations at the time of
15. PDC, KTH, Stockholm, Sweden
16. Institute of Neuroscience and Medicine (INM-6), Jülich Research Center, Jülich, Germany
17. Okinawa Institute of Science and Technology (OIST), Onna-son, Okinawa, Japan
18. Biocomputation group, University of Hertfordshire, Hatfield, United Kingdom.
19. Norwegian University of Life Sciences, Ås, Norway
20. Paris-Saclay Institute of Neuroscience, CNRS/Université Paris-Saclay, Gif sur Yvette, France
21. Faculty of Mathematics and Physics, Charles University, Prague, Czechia
46 changes: 46 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at pynn-maintainers@protonmail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
See http://neuralensemble.org/docs/PyNN/developers/contributing.html
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ include test/system/scenarios/*.py
include test/unittests/*.py
include examples/*.py
include doc/*.txt
include doc/*/*.txt
include LICENSE
include AUTHORS
include README.rst
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ your simulator, and are not restricted to the standard models.
- Bug reports: https://github.com/NeuralEnsemble/PyNN/issues


:copyright: Copyright 2006-2016 by the PyNN team, see AUTHORS.
:copyright: Copyright 2006-2020 by the PyNN team, see AUTHORS.
:license: CeCILL, see LICENSE for details.

.. image:: https://travis-ci.org/NeuralEnsemble/PyNN.png?branch=master
Expand Down
1 change: 0 additions & 1 deletion ci/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

set -e # stop execution in case of errors

sudo apt-get install -qq python-numpy python3-numpy python-scipy python3-scipy libgsl0-dev openmpi-bin libopenmpi-dev
pip install -r requirements.txt
pip install coverage coveralls
pip install nose-testconfig
Expand Down
5 changes: 5 additions & 0 deletions ci/install_brian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,8 @@ if [ "$TRAVIS_PYTHON_VERSION" == "2.7" ]; then
pip install sympy;
pip install brian;
fi
if [ "$TRAVIS_PYTHON_VERSION" == "3.7" ]; then
echo -e "\n========== Installing Brian 2 ==========\n"
pip install cython;
pip install brian2;
fi
22 changes: 12 additions & 10 deletions ci/install_nest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@

set -e # stop execution in case of errors

if [ "$TRAVIS_PYTHON_VERSION" == "2.7" ] || [ "$TRAVIS_PYTHON_VERSION" == "3.5" ]; then
if [ "$TRAVIS_PYTHON_VERSION" == "2.7" ] || [ "$TRAVIS_PYTHON_VERSION" == "3.7" ]; then
echo -e "\n========== Installing NEST ==========\n"
# Specify which version of NEST to install
#export NEST_VERSION="master"
export NEST_VERSION="2.14.0"
export NEST_VERSION="2.20.0"

pip install cython==0.23.4
pip install cython #==0.28.1

if [ "$NEST_VERSION" = "master" ]; then
export NEST="nest-simulator-$NEST_VERSION"
wget https://github.com/nest/nest-simulator/archive/$NEST_VERSION.tar.gz -O $HOME/$NEST.tar.gz;
else
export NEST="nest-$NEST_VERSION"
wget https://github.com/nest/nest-simulator/releases/download/v$NEST_VERSION/nest-$NEST_VERSION.tar.gz -O $HOME/$NEST.tar.gz
export NEST="nest-simulator-$NEST_VERSION"
wget https://github.com/nest/nest-simulator/archive/v$NEST_VERSION.tar.gz -O $HOME/$NEST.tar.gz;
fi

pushd $HOME;
Expand All @@ -26,11 +26,13 @@ if [ "$TRAVIS_PYTHON_VERSION" == "2.7" ] || [ "$TRAVIS_PYTHON_VERSION" == "3.5"
mkdir -p $HOME/build/$NEST
pushd $HOME/build/$NEST
export VENV=`python -c "import sys; print(sys.prefix)"`;
ln -s /opt/python/2.7.14/lib/libpython2.7.so $VENV/lib/libpython2.7.so;
ln -s /opt/python/3.5.4/lib/libpython3.5m.so $VENV/lib/libpython3.5.so;
export PYTHON_INCLUDE_DIR=$VENV/include/python${TRAVIS_PYTHON_VERSION}
if [ "$TRAVIS_PYTHON_VERSION" == "3.5" ]; then
export PYTHON_INCLUDE_DIR=${PYTHON_INCLUDE_DIR}m;
if [ "$TRAVIS_PYTHON_VERSION" == "2.7" ]; then
ln -s /opt/python/2.7/lib/libpython2.7.so $VENV/lib/libpython2.7.so;
export PYTHON_INCLUDE_DIR=$VENV/include/python${TRAVIS_PYTHON_VERSION}
fi
if [ "$TRAVIS_PYTHON_VERSION" == "3.7" ]; then
ln -s /opt/python/3.7/lib/libpython3.7m.so $VENV/lib/libpython3.7.so;
export PYTHON_INCLUDE_DIR=$VENV/include/python${TRAVIS_PYTHON_VERSION}m
fi
cython --version;
cmake --version;
Expand Down
6 changes: 3 additions & 3 deletions ci/install_neuron.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

set -e # stop execution in case of errors

if [ "$TRAVIS_PYTHON_VERSION" == "2.7" ]; then
if [ "$TRAVIS_PYTHON_VERSION" == "3.7" ]; then
echo -e "\n========== Installing NEURON ==========\n"
export NRN_VERSION="nrn-7.5"
export NRN_VERSION="nrn-7.7"
if [ ! -f "$HOME/$NRN_VERSION/configure" ]; then
wget http://www.neuron.yale.edu/ftp/neuron/versions/v7.5/$NRN_VERSION.tar.gz -O $HOME/$NRN_VERSION.tar.gz;
wget http://www.neuron.yale.edu/ftp/neuron/versions/v7.7/$NRN_VERSION.tar.gz -O $HOME/$NRN_VERSION.tar.gz;
pushd $HOME;
tar xzf $NRN_VERSION.tar.gz;
popd;
Expand Down
9 changes: 4 additions & 5 deletions ci/test_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@

set -e # stop execution in case of errors

if [ "$TRAVIS_PYTHON_VERSION" == "2.7" ] || [ "$TRAVIS_PYTHON_VERSION" == "3.5" ]; then
nosetests --with-coverage --cover-package=pyNN -e backends -v test/unittests;
nosetests --with-coverage --cover-package=pyNN -v test/system;
if [ "$TRAVIS_PYTHON_VERSION" == "2.7" ] || [ "$TRAVIS_PYTHON_VERSION" == "3.7" ]; then
python setup.py nosetests --with-coverage --cover-package=pyNN -v --tests=test;
else
nosetests -e backends test/unittests;
fi
python setup.py nosetests -e backends -v --tests=test/unittests;
fi
11 changes: 3 additions & 8 deletions doc/backends/NEST.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,12 @@ or the conventional grid-constrained scheme

setup(spike_precision='on_grid')

where `'on_grid'` is the default.
where `'off_grid'` is the default.

.. todo:: consider changing the default to off_grid, since PyNN's defaults are
supposed to prefer accuracy/comparability over performance.

As of NEST 2.0.0, the following PyNN standard models have an off-grid
implementation: :class:`IF_curr_alpha` (in preparation), :class:`IF_curr_exp`,
The following PyNN standard models have an off-grid
implementation: :class:`IF_curr_exp`, :class:`SpikeSourcePoisson`
:class:`EIF_cond_alpha_isfa_ista`.

.. todo:: check the accuracy of the above list before release

.. todo:: add a list of native NEST models with off-grid capability

Here is an example showing how to specify the option in a PyNN script
Expand Down
54 changes: 7 additions & 47 deletions doc/backends/NEURON.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ If using *cvode*, there are two more optional parameters:

.. testcode:: cvode

setup(cvode=True,
setup(use_cvode=True,
rtol=0.001, # specify relative error tolerance
atol=1e-4) # specify absolute error tolerance

Expand Down Expand Up @@ -137,55 +137,15 @@ If your model relies on other NMODL mechanisms, call the
:func:`~pyNN.neuron.load_mechanisms` function with the path to the directory
containing the :file:`.mod` files.

It is also possible to use NEURON "ARTIFICIAL_CELL" models, such as :class:`IntFire1`,
:class:`IntFire2` and :class:`IntFire4`:

Using native synaptic plasticity models
=======================================

A native NEURON synaptic plasticity model should be implemented in NMODL using the "weight adjuster"
approach. The mechanism should be a ``POINT_PROCESS`` which defines a ``POINTER wsyn``.
This mechanism will receive ``NetCon``s from both the presynaptic and postsynaptic neurons
(at least for the common case where the mechanism depends on post-synaptic spike times
but not on state variables of the postsynaptic cell such as the membrane potential.
The latter scenario is possible, but is not documented here.)
The ``wsyn`` pointer will be connected to the weight variable of the post-synaptic response mechanism.
See the :file:`pyNN/neuron/nmodl` directory for some examples of such mechanisms.

Call the :func:`~pyNN.neuron.load_mechanisms` function with the path to the directory
containing the :file:`.mod` file.

For each synaptic plasticity model you must also define a synapse type class:

.. codeblock:: python

from pyNN.neuron import NativeSynapseType
from pyNN.neuron.simulator import Connection

class MySTDP(NativeSynapseType):
default_parameters = {
"weight": 0.0, "delay": None,
"tauLTP": 20.0, "tauLTD": 20.0,
"aLTP": 0.01, "aLTD": 0.012,
"wmin": 0, "wmax": 0.0000001,
"dendritic_delay_fraction": 1.0
}
model = "MySTDPMechanism" # this is the POINT_PROCESS name
connection_type = Connection
presynaptic_type = None
postsynaptic_variable = "spikes"

The parameters "weight", "delay" and "dendritic_delay_fraction" are obligatory,
and will be handled by PyNN. All other parameters will be passed on to the NMODL mechanism.

It is now straightforward to use this synapse type in PyNN:

.. codeblock:: python
.. testcode:: nativemodel

from pyNN.neuron import setup, run, Population, Projection, AllToAllConnector, StaticSynapse
from pyNN.neuron import setup, Population, IntFire1
setup()
p1 = Population(10, sim.IF_cond_exp())
syn = MySTDP(weight=0.01, delay=0.5, wmax=0.02)
prj = Projection(p1, p1, AllToAllConnector(), syn, receptor_type='excitatory')
run(100.0)
p1 = Population(10, IntFire1(tau=10.0, refrac=2.5))
p1.record('m')


.. _`CVode documentation`: http://www.neuron.yale.edu/neuron/static/docs/help/neuron/neuron/classes/cvode.html
Expand Down
4 changes: 2 additions & 2 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class MockNESTModule(mock.Mock):
# General information about the project.
project = u'PyNN'
authors = u'the PyNN community'
copyright = u'2006-2017, ' + authors
copyright = u'2006-2020, ' + authors

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand All @@ -80,7 +80,7 @@ class MockNESTModule(mock.Mock):
# The short X.Y version.
version = '0.9'
# The full version, including alpha/beta/rc tags.
release = '0.9.2'
release = '0.9.6'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
17 changes: 11 additions & 6 deletions doc/connections.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,14 @@ The simplest, and default synapse type in PyNN has constant synaptic weight:
.. testcode::

syn = StaticSynapse(weight=0.04, delay=0.5)

.. note:: weights are in microsiemens or nanoamps, depending on whether the
post-synaptic mechanism implements a change in conductance or current,
and delays are in milliseconds (see :doc:`units`).
and delays are in milliseconds (see :doc:`units`). Weights should always
be positive, *except* for the case of inhibitory (see `receptor_type`
argument below), current-based synapses, for which they should be negative.
Inhibitory, conductance-based synapses have positive weights, because
it is the reversal potential which makes it inhibitory.

It is also possible to add variability to synaptic weights and delays by
specifying a :class:`RandomDistribution` object as the parameter value:
Expand Down Expand Up @@ -110,7 +114,7 @@ timing-dependence components, e.g.:
timing_dependence=SpikePairRule(tau_plus=20.0, tau_minus=20.0,
A_plus=0.01, A_minus=0.012),
weight_dependence=AdditiveWeightDependence(w_min=0, w_max=0.04))

Note that not all simulators will support all possible combinations of synaptic
plasticity components.

Expand Down Expand Up @@ -312,8 +316,8 @@ Reading connection patterns to/from a file

Connection patterns can be read in from a text file. The file should contain
a header specifying which parameter is in which column, e.g.::
# columns = ["i", "j", "weight", "delay", "U", "tau_rec"]

# columns = ["i", "j", "weight", "delay", "U", "tau_rec"]

and then the connection data should be in columns separated by spaces. The
connections are read using:
Expand Down Expand Up @@ -373,7 +377,8 @@ level of the simulator. To create a :class:`Projection` we must specify:
Optionally, we can also specify:

* the name of the post-synaptic mechanism (e.g. ‘excitatory’, ‘NMDA’)
(by default, this is 'excitatory');
(if not specified, PyNN picks a default depending on the weight
parameter of the synapse type);
* a label (autogenerated if not specified);
* a :class:`Space` object, which determines how distances should be
calculated for distance-dependent wiring schemes or parameter values.
Expand Down
18 changes: 15 additions & 3 deletions doc/contributors.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
========================
Contributors and licence
========================
=================================
Contributors, licence and funding
=================================

.. include:: ../AUTHORS

Expand All @@ -17,6 +17,18 @@ software in computational neuroscience, such as NEURON (GPL) and Brian (CeCILL).

If you are interested in using PyNN, but the choice of licence is a problem for you, please contact us to discuss dual-licensing.


.. centered:: LICENSE AGREEMENT

.. include:: ../LICENSE


Funding
=======

Development of PyNN has been partially funded by the European Union Sixth Framework Program (FP6) under
grant agreement FETPI-015879 (FACETS), by the European Union Seventh Framework Program (FP7/2007­-2013)
under grant agreements no. 269921 (BrainScaleS) and no. 604102 (HBP),
and by the European Union’s Horizon 2020 Framework Programme for
Research and Innovation under the Specific Grant Agreements No. 720270 (Human Brain Project SGA1)
and No. 785907 (Human Brain Project SGA2).
Loading