NeuralEnsemble/PyNN — pull request #251 by tclose (2013-07-26 04:45:58+00:00)
Title: Combined changes for Gap Junctions and Index-based connectors

Hi Andrew,

I got in a bit of a mess with my previous pull requests, and so have just merged all the changes I have been making into this single pull request. Next time I will be a bit wiser and put each change in its own separate branch. However, if it is a little confusing what each change is doing, or you only want to merge a few of my change sets I can try to split them into separate branches.

So the basic run down of the changes I have made is:
* Fixed bug in nest._convergent_connect when using non-standard receptors and wrote `test_ticket240()` test function in `test/system/test_nest.py`
* Fixed bug in `src/recording/__init__.py`, where the required MPI flags were not imported along with the MPI object in `get_mpi_comm()`
* Debugged `CloneConnector` and wrote unit test for it in `test/unittests/test_connectors.py`
* Implemented gap junctions for NEURON
* Added ability for connections in neuron to have "presynaptic components", which as the name suggests attach to the presynaptic cell of the connection
* Overloaded `allow_self_connections` option to `Projection.__init__()` to also allow `'NoMutual'` option on top of `True` or `False`. I needed this because gap junctions are always mutual so without this option the same gap junctions will be made twice for gap junctions interconnecting a single population. NB: This feels a little hacky and is messes with the user interface but I couldn't think of a better way to do this (suggestions welcome:).
* Wrote test function `test_electrical_synapse()` in `test/system/test_neuron.py`
* Implemented Index-based connector which takes an index-based expression (actually a class that derives `connectors.IndexBasedExpression`) and gives access to the parent `Projection` class allowing arbitrary probabilities of connection to be determined from the functions of cell position and any other members of the Projection and/or Population objects.
* Also implemented similar index-based expressions for weight and delay parameters
* Wrote unit test class `TestIndexBasedProbabilityConnector` in `test/unittests/test_connectors.py`, which tests index-based weights and delays as well as index-based connection probabilities

I think that is the lot, although I could have missed one or two things.

Cheers,

Tom