There have been rather few changes to the API in this version, which has focused rather on improving the simulator interfaces and on an internal code-reorganization which aims to make PyNN easier to test, maintain and extend.
Principal API changes:
- Removed the 'string' connection methods from the Projection constructor.
- The method argument now must be a Connector object, not a string.
- Can now record synaptic conductances.
- Can now access weights and delays of individual connections one-at-a-time within a Projection through Connection objects.
- Added an interface for injecting arbitrary time-varying currents into cells.
- Added get_v() and get_gsyn() methods to the Population class, enabling membrane potential and synaptic conductances to be read directly into memory,rather than saved to file.
Improvements to simulator back-ends:
- Implemented an interface for the Brian simulator.
- Re-implementated the interface to NEURON, to use the new functionality in v7.0.
- Removed support for version 1 of NEST. The module for NEST v2 is now simply called pyNN.nest.
- The PCSIM implementation is now more complete, and more compatible with the other back-ends.
- Behind-the-scenes refactoring to implement the API in terms of a small number of low-level, simulator-specific operations. This reduces redundancy between simulator modules, and makes it easier to extend PyNN, since if new functionality uses the low-level operations, it only needs to be written once, not once for each simulator.
What is PyNN?
PyNN (pronounced 'pine' ) is a simulator-independent language for building neuronal network models.
In other words, you can write the code for a model once, using the PyNN API and the Python programming language, and then run it without modification on any simulator that PyNN supports (currently NEURON, NEST, PCSIM and Brian).
The API has two parts, a low-level, procedural API (functions create(), connect(), set(), record(), record_v()), and a high-level, object-oriented API (classes Population and Projection, which have methods like set(), record(), setWeights(), etc.)
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, allowing you to concentrate on the overall structure of your model.
The other thing that is required to write a model once and run it on multiple simulators is standard cell and synapse 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.
Even if you don't wish to run simulations on multiple simulators, you may benefit from writing your simulation code using PyNN's powerful, high-level interface. In this case, you can use any neuron or synapse model supported by your simulator, and are not restricted to the standard models.
PyNN is a work in progress, but is already being used for several large-scale simulation projects.
The code is released under the CeCILL licence.