neuralensemble / pynn Goto Github PK
View Code? Open in Web Editor NEWA Python package for simulator-independent specification of neuronal network models.
License: Other
A Python package for simulator-independent specification of neuronal network models.
License: Other
A general refactoring of connection book-keeping in nest2
is needed. We are storing too much information in the Projection
class that is also stored within NEST. It might be slightly slower to have to look it up when needed, but there should be a large decrease in memory required.
Currently, we store 1D arrays _sources
, _targets
, and _targetPorts
, so 3xNxM
values, assuming all-to-all connectivity between a Population
of size N
and one of size M
. If we assume that cell ids in a Population
are consecutive (this is the case, but should be more strictly checked), then it is not necessary to store anything except the first id in a Population
- we simply filter the connection dicts returned by nest.GetConnections()
and keep only the connections that have target ids within the post-synaptic population. This might be complicated somewhat when running a distributed simulation.
Need to create some performance benchmarks to check that the performance hit of the lookups is not too great.
Opened: 2008-02-19 11:13:36
Last modified: 2010-02-03 13:18:32
Component: nest
Priority: minor
Owner: apdavison
Reporter: apdavison
I added the Population method getSpikes to the nest2 backend for Monte-Carlo type simulations
where one can load the spikes from one of many simulations right away and delete the file.
Implementation for the other PyNN backends is pending, and the subject of this ticket.
Opened: 2008-01-23 18:00:13
Last modified: 2008-03-20 10:47:17
Component: common
Priority: minor
Owner: apdavison
Reporter: emuller
i.e. returning suitable error messages if a file is read-only, etc.
If the user tries to write to a non-writable file, the temporary file should not be deleted and a Warning
should be raised, giving the location of the temporary file, so that the user can attempt to recover the data.
Opened: 2008-03-19 17:25:01
Last modified: 2011-01-04 17:05:28
Component: common
Priority: minor
Owner: apdavison
Reporter: apdavison
Opened: 2008-03-17 16:36:21
Last modified: 2008-03-17 18:10:26
Component: oldneuron
Priority: major
Owner: apdavison
Reporter: apdavison
It would be nice to have the Izhikevich model as a standard model. Need to find NEST, PCSIM and NEURON implementations (try ModelDB for the latter), then standardise parameter names.
Opened: 2007-04-24 13:28:01
Last modified: 2012-12-22 20:27:51
Component: unspecified
Priority: minor
Owner: somebody
Reporter: apdavison
also add a ChangeLog
Opened: 2008-03-19 17:11:34
Last modified: 2008-06-06 09:36:02
Component: unspecified
Priority: blocker
Owner: apdavison
Reporter: apdavison
A test model that uses STDP is needed.
Opened: 2007-04-24 13:55:45
Last modified: 2008-03-18 14:39:46
Component: unspecified
Priority: major
Owner: somebody
Reporter: apdavison
At !CodeJam, some work was done on unifying the output formats (for spikes, membrane potential) of the nest
and neuron2
modules. This needs to be throughly tested, and the same done for the pcsim
module.
Opened: 2007-04-24 13:51:00
Last modified: 2007-05-16 13:54:21
Component: unspecified
Priority: critical
Owner: somebody
Reporter: apdavison
The current implementation for NEURON of the IF_curr_alpha, IF_cond_exp, etc models is flexible but inefficient. It should be replaced by ARTIFICIAL_CELL-type implementations. One possibility is to adapt Michael Hines' code from the Vogels-Abbott benchmarks.
Opened: 2007-04-24 13:30:37
Last modified: 2010-12-10 11:00:09
Component: nmodl
Priority: minor
Owner: apdavison
Reporter: apdavison
The current STDP API only works for NEURON, not for NEST v2, and probably not for PCSIM. STDP should probably be set-up on creation of a Projection, although it should be possible to change parameters later.
Opened: 2007-10-05 17:18:28
Last modified: 2008-03-18 14:42:19
Component: unspecified
Priority: major
Owner: apdavison
Reporter: apdavison
What was pynest
in NEST v1 is nest
in NEST v2.
The problem is that import nest
within nest2.py imports pyNN.nest
rather than nest
, since the import mechanism looks within the package first.
Two possible solutions:
from __future__ import absolute_import
).pyNN.nest
to pyNN.nest1
or something similar.I don't really like either solution, but overall I prefer (1). Comments?
Opened: 2007-07-19 11:43:13
Last modified: 2007-10-05 16:24:20
Component: nest
Priority: major
Owner: apdavison
Reporter: apdavison
It would be nice to be able to inject a time varying current into any standard cell in a simulator-independent way. This could be done in two ways:
(1) Create a new standard cell, CurrentSource
, and extend connect()
, Projection
to allow non-synaptic connections
(2) Create an Electrode
class, then either
(a) allow the i_offset
parameter of each standard cell to be an Electrode
object rather than a float.
(b) create an `inject()` function in the low-level API and/or an `inject()` method for the `ID` object.
I don't much like (1), since it does not fit with the general principle of spike-based communication, although if we allow gap-junction connections in future, it would fit better.
Concerning (2), if we add RC-circuit properties to the Electrode
class, it could also be used to extend record_v()
.
(2b) would probably be simpler to implement than (2a)
Opened: 2008-01-08 11:25:44
Last modified: 2009-06-04 14:54:13
Component: common
Priority: minor
Owner: apdavison
Reporter: apdavison
Currently, the positions of neurons in space can only be specified by iterating over the whole population in Python, and using the setPosition()
method of the ID
class.
We should add a new method or methods to the Population
class that allows the positions to be specified from a numpy array or using some algorithm, e.g., 'random positioning within a cylindrical volume', 'hexagonal close packed with separation x', etc.
Might be worth looking at [http://www.neuroconstruct.org/ neuroConstruct] to see how Padraig Gleeson does it.
Opened: 2007-05-16 19:35:22
Last modified: 2010-03-19 08:07:51
Component: common
Priority: major
Owner: apdavison
Reporter: apdavison
More documentation is needed. We should start with a user's guide, in HTML (wiki) and PDF formats.
Opened: 2007-04-24 13:21:23
Last modified: 2007-05-24 17:22:06
Component: unspecified
Priority: major
Owner: apdavison
Reporter: apdavison
To allow easy specification of neuronal diversity, we should allow specification of int/float parameters using a pyNN.random.RandomDistribution
object. The value for an individual cell/connection would be picked from this distribution.
Opened: 2007-04-24 13:15:54
Last modified: 2010-12-09 20:59:03
Component: unspecified
Priority: major
Owner: Pierre
Reporter: apdavison
I might be completely wrong, but in Population() constructor, we create several cells of same type, so why doesn't it use the create() function of the Low Level API ?
Opened: 2007-05-22 13:07:25
Last modified: 2008-11-22 11:38:04
Component: common
Priority: minor
Owner: apdavison
Reporter: debeissat
On Friday 01 June 2007 13:05, Jens Kremkow wrote:
Hi,
I guess it was implicitly assumed that the
spike_times
that one gives
to aSpikeSourceArray
object are sorted, but I made the mistake and
gave an unsorted array, which I got from a random generator, and
wondered why some spikes were missing. So make sure that your spike
times are sorted.Cheers,
Jens
Please vote:
(A) the SpikeSourceArray
should automatically sort the spike_times
array (which could be computationally intensive)
(B) we should leave things as they are, but add a note to the documentation stating that the array must be already sorted.
Opened: 2007-06-04 09:46:59
Last modified: 2007-10-05 16:36:53
Component: common
Priority: minor
Owner: apdavison
Reporter: apdavison
Currently, the algorithm to use for connecting two Population
s is specified as a string argument, method
in the Projection.__init__()
method. Each string corresponds to a private method of the Projection
class. To make it easier to add new connection algorithms, method
should probably be a class, which inherits from an abstract ConnectionMethod
class. (Take a look at how this is done in PCSIM).
Opened: 2007-04-24 13:11:30
Last modified: 2008-01-08 10:48:54
Component: unspecified
Priority: major
Owner: apdavison
Reporter: apdavison
Currently, a standard model combines both a membrane mechanism and a synaptic mechanism. If there are n of the former and m of the latter, we have to create n x m
standard models (even more if there could be more than one synapse type per neuron). It would be cleaner to have standard membrane models and standard synaptic models that could be combined in user code to build arbitrary models. Only n + m
models then have to be created/maintained.
Opened: 2007-04-24 11:38:37
Last modified: 2010-11-04 11:00:25
Component: unspecified
Priority: major
Owner: somebody
Reporter: apdavison
(found by dr-joe)
line
--> 529 os.system("cat %s > %s" % nest_filename, user_filename)
generates :
TypeError: not enough arguments for format string
workaround :
--> 529 system_line = 'cat %s >> %s' % (nest_filename, user_filename)
--> 530 os.system(system_line)
to reproduce:
[perrinet@master0 ~]$ ipython
Python 2.5 (r25:51908, Apr 5 2007, 14:58:28)
Type "copyright", "credits" or "license" for more information.
IPython 0.8.2.svn.r2750 -- An enhanced Interactive Python.
In [1]: import pyNN.nest2 as sim
-- N E S T --
Neural Simulation Tool
Copyright 1995-2007 The NEST Initiative
Version 1.9-6564 Nov 30 2007 17:35:01
This program is provided to you AS IS and comes with NO WARRANTY.
See the file LICENSE for details.
Type 'nest.sysinfo()' to see details on the system configuration.
Type 'nest.authors()' for information about the makers of NEST.
In [2]: n = sim.Population(1,'poisson_generator',{'rate':2000.})
In [3]: n.record()
In [4]: sim.run(10000)
Out[4]: 10000.0
In [7]: n.meanSpikeCount()
Out[7]: 20040.0
TypeError Traceback (most recent call last)
/home/perrinet/ in ()
/home/perrinet/python/site-packages/pyNN/nest2/init.py in printSpikes(self, filename, gather, compatible_output)
851 """
852 _print(filename, gather=gather, compatible_output=compatible_output,
--> 853 population=self, variable="spikes")
854
855 def getSpikes(self):
/home/perrinet/python/site-packages/pyNN/nest2/init.py in _print(user_filename, gather, compatible_output, population, variable)
527 population, get_time_step())
528 else:
--> 529 os.system("cat %s > %s" % nest_filename, user_filename)
530
531 os.remove(nest_filename)
TypeError: not enough arguments for format string
In [10]:
Opened: 2008-03-14 18:27:20
Last modified: 2008-03-19 17:22:47
Component: nest
Priority: major
Owner: apdavison
Reporter: LaurentPerrinet
This means modifying the tests/runtests.py
script
Opened: 2007-04-24 13:45:12
Last modified: 2007-05-16 13:34:44
Component: pcsim
Priority: critical
Owner: apdavison
Reporter: apdavison
One of the design goals of PyNN is to minimise the number of required dependencies. At the moment, numpy
is supposed to be the only dependency. Therefore, use of pytables
in the pcsim
module should be made optional if possible.
Opened: 2007-04-24 13:48:34
Last modified: 2007-05-11 14:00:32
Component: pcsim
Priority: major
Owner: somebody
Reporter: apdavison
Opened: 2007-06-20 16:17:05
Last modified: 2009-03-27 16:50:10
Component: pcsim
Priority: major
Owner: pierre
Reporter: apdavison
One of the design goals of PyNN is to minimise the number of required dependencies. At the moment, numpy
is supposed to be the only dependency. Therefore, use of pytables
in the pcsim
module should be made optional if possible.
Opened: 2007-04-24 13:48:34
Last modified: 2007-05-11 14:00:32
Component: pcsim
Priority: major
Owner: somebody
Reporter: apdavison
Extend checkAPI.py
to check file formats, return values and default arguments as well as input argument type.
Opened: 2007-04-24 13:37:27
Last modified: 2007-05-24 13:28:45
Component: unspecified
Priority: major
Owner: apdavison
Reporter: apdavison
The facetsml
module does not work yet. Getting to the stage of producing valid NeuroML, even for a very simple network, would be a good start.
Opened: 2007-04-24 13:42:42
Last modified: 2009-01-07 23:09:59
Component: unspecified
Priority: minor
Owner: [email protected]
Reporter: apdavison
Keywords: facetsML neuroML xml
Simulations cannot run When an MPI-enabled NEURON version is used to compile the MODL files. HOC claims that mindelay is 0 or less than dt, although min and max delays are properly set in setup()
.
This behaviour has been observed with NEURON version 6.2.994. Find attached the console log of an example (problem.log) and the log from debug=True
(neuron.log).
Opened: 2008-03-12 18:32:21
Last modified: 2008-03-14 17:37:45
Component: oldneuron
Priority: major
Owner: apdavison
Reporter: mschmucker
Need to check that the API is consistent for all the simulator modules (including output formats/return values as well as input arguments - need to extend checkAPI.py
), check all the tests run, then release version 0.3.0.
Opened: 2007-04-24 13:35:12
Last modified: 2007-05-24 13:26:54
Component: unspecified
Priority: blocker
Owner: apdavison
Reporter: apdavison
The ID
class is supposed to have a get()
method, which gets the values of cell parameters. For this, we will need to implement reverse translation in the common.StandardCellType
class.
Opened: 2007-05-15 14:14:03
Last modified: 2008-03-20 19:16:22
Component: common
Priority: major
Owner: apdavison
Reporter: apdavison
Cell parameters can be accessed using the ID class, e.g. cell1.tau_m
.
It might also be nice to access variables, such as the membrane potential, as cell1.v
, etc.
Opened: 2007-11-14 15:18:42
Last modified: 2010-11-04 11:05:52
Component: common
Priority: minor
Owner: apdavison
Reporter: apdavison
Formats should be those used in [http://neuralensemble.kip.uni-heidelberg.de/trac/NeuroTools NeuroTools].
My preference would be to allow printX() functions/methods to accept an open file-like object instead of a filename, so the file could be opened in user code and passed as an argument.
The alternative is to explicitly support [http://hdf.ncsa.uiuc.edu/HDF5/ HDF5] in PyNN by importing !NeuroTools or [http://www.pytables.org/ PyTables]. I would prefer to avoid this to minimise the number of dependencies PyNN has. It should at least be a soft dependency (i.e., if you have !PyTables, you can have HDF5, if not, you can only have ASCII).
Opened: 2007-05-16 13:48:19
Last modified: 2009-09-23 15:26:42
Component: common
Priority: major
Owner: somebody
Reporter: apdavison
e.g.
{{{
>>> nest.list_standard_models()
[IF_curr_exp, ...]
}}}
i.e., should return a list of classes that are available in that simulator.
Opened: 2007-10-04 15:24:02
Last modified: 2007-10-05 17:08:56
Component: common
Priority: minor
Owner: apdavison
Reporter: apdavison
The current setup.py
script does not install the hoc directory, nor compile its contents.
Opened: 2007-04-24 13:32:15
Last modified: 2008-03-19 17:06:35
Component: nmodl
Priority: major
Owner: apdavison
Reporter: apdavison
The neuron
module was really designed to have setup()
and end()
run only once per script. It is currently possible to call setup()
more than once, but only to change the timestep. The network time is not reinitialised to zero, for example. Calling end()
destroys the ParallelContext
instance and it is not recreated when calling setup()
a second time.
It would be desirable to be able to reinitialise the network, so a redesign with this in mind is needed.
I am not sure whether these issues also apply to the nest2
and pcsim
modules.
Opened: 2008-03-13 10:35:34
Last modified: 2010-01-26 17:17:02
Component: all
Priority: major
Owner: None
Reporter: apdavison
Would be cool to have a Population.getitem that takes a list/array of coordinates and returns their addrs.
Could be speed up the connect routines, so far, for each synapse the routine has to ask the id of a given coordinate in a loop.
Opened: 2007-05-04 13:34:51
Last modified: 2009-06-04 14:47:29
Component: common
Priority: minor
Owner: apdavison
Reporter: JensKremkow
Opened: 2008-03-19 17:11:57
Last modified: 2008-03-19 19:15:54
Component: unspecified
Priority: major
Owner: apdavison
Reporter: apdavison
see r141. The nest2
module has a Connection
class, which we could implement for the other modules as well.
Opened: 2008-01-08 10:40:08
Last modified: 2010-01-26 17:07:24
Component: common
Priority: major
Owner: apdavison
Reporter: apdavison
As a test of the adequacy of the connection/projection API, a test model that contains multi-compartmental neurons and multiple synaptic locations within the cells. An olfactory bulb model would be a particularly challenging example, as the bulb has both axo-dendritic and dendro-dendritic synapses
Opened: 2007-04-24 13:54:29
Last modified: 2011-01-04 17:02:41
Component: unspecified
Priority: major
Owner: apdavison
Reporter: apdavison
The spike times passed to a SpikeSourceArray
can have arbitrary positive values. If a simulation has a shorter duration than the maximum spike time in the array, there will be unused values. In nest2
, only the spikes that actually occurred during the simulation are written by printSpikes()
, whereas in neuron
, all the spikes, including unused ones, are written.
The neuron
behaviour should be changed to match the nest2
one.
Opened: 2008-03-17 11:46:08
Last modified: 2008-03-17 11:55:42
Component: oldneuron
Priority: minor
Owner: apdavison
Reporter: apdavison
The API docs are autogenerated by the wikidoc.py script. This should be extended to output the Trac wiki format, then the API documentation moved to the !NeuralEnsemble wiki
Opened: 2007-04-24 13:23:39
Last modified: 2007-05-15 15:39:45
Component: unspecified
Priority: major
Owner: apdavison
Reporter: apdavison
Model parameters should have dimensions, units, minimum and maximum allowable values, as well as a value. Currently, units are determined by convention, but it might reduce errors if units, etc, could be specified directly (it would also make it easier to auto-generate GUIs, etc). One possibility is the traits
package: http://code.enthought.com/traits/
Opened: 2007-04-24 13:19:56
Last modified: 2011-10-03 13:53:54
Component: unspecified
Priority: major
Owner: somebody
Reporter: apdavison
Problem:
Membrane potential indicates some spikes, but "spikes.dat" is empty.
To reproduce execute:
==== SNIP ====
from pyNN.neuron import *
setup()
n = create(IF_facets_hardware1, n=1)
s = create(SpikeSourcePoisson,{'rate':10.},n=10)
connect(s,n,weight=0.002)
record(n,'spikes.dat')
record_v(n,'membrane.dat')
run(1000)
end()
==== SNIP ====
Opened: 2008-01-13 12:27:54
Last modified: 2008-02-15 14:06:47
Component: oldneuron
Priority: major
Owner: apdavison
Reporter: mueller
see ticket:22
Opened: 2007-10-05 16:32:30
Last modified: 2008-02-02 17:07:39
Component: common
Priority: major
Owner: apdavison
Reporter: apdavison
The adapting I&F neuron should be a standard model. This exists in NEST, and I think it exists in PCSIM, so NEURON and Brian versions are needed.
Opened: 2007-04-24 13:25:50
Last modified: 2011-01-04 17:09:49
Component: nmodl
Priority: minor
Owner: apdavison
Reporter: apdavison
I recorded my whole network twice, because I stupidly run my recording part of my network twice. PyNN connected thereby the same spike_detector twice to a neuron, which then printed each spikes twice, which gave my some hard time. PyNN should maybe check if a neuron is already recorded before recording it twice.
Opened: 2007-11-29 16:34:07
Last modified: 2008-03-21 09:40:13
Component: common
Priority: minor
Owner: apdavison
Reporter: JensKremkow
Some simulators allow writing variables other than spike times and membrane potential to file. To support these, we should have a single function and a single Population method for writing variables to file.
Also, python tends to use write(), rather than print(), for this kind of thing.
This should be done in a separate branch until we've made a release with the current API.
Opened: 2007-04-24 11:32:13
Last modified: 2010-12-10 10:20:37
Component: unspecified
Priority: minor
Owner: apdavison
Reporter: apdavison
It would be useful to have some benchmarks which would allow the performance of the different modules to be tracked over time.
Opened: 2007-04-24 13:57:19
Last modified: 2010-12-10 11:00:22
Component: unspecified
Priority: minor
Owner: somebody
Reporter: apdavison
pcsim
are not d_expression
and allow_self_connections
.EuclideanDistanceRandomConnections
only implements C*exp(-d/lambda)
or something like this, not arbitrary expressions.Opened: 2007-06-05 14:53:22
Last modified: 2009-06-04 10:52:58
Component: pcsim
Priority: major
Owner: apdavison
Reporter: apdavison
In PyNN it's called AdaptiveExponentialIF_alpha
but I think we should change the name to
ExponentialIF_cond_alpha_adaptive
or better
ExpIF_cond_alpha_CubaSFA_SubthrAdap
Since neuron types are really:
ExpIF, IF, QuadIF (Izhikevich-type), HH, etc...
and cond_alpha, curr_exp, cond_exp are synapse types
_CubaSFA_SubthrAdap
CubaSFA describes the current based adaptation mechanisms
SubthrAdap decsripes the sub-threshold adaptation
CobaSFA then describes conductance based adaptation mechanisms
as in IF_cond_exp_sfa_rr
should be IF_cond_exp_CobaSFA_CobaSFA
since the sfa and rr mechanisms are the same actually, just different time constants. That model has no sub-threshold adaptation. (Romain reported in his paper it was not strictly necessary to get a good fit to data).
Mechanims such as CobaSFA, CobaSFA, SubthrAdap, CubaSFA strictly speaking should not be part of the neuron model, but should be something like NeuronDynamics which can be added to a Neuron. For NEST, at Neuron creation time, otherwise Raise error. But NEURON, and I recall CSIM, support adding such mechanisms after the fact ...
Synapses too ... cond_exp, curr_alpha ... etc.
ok this got longer than I expected ... so I better post it as a ticket...
So, may I change the name of AdaptiveExponentialIF_alpha to
ExpIF_cond_alpha_CubaSFA_SubthrAdap
and IF_cond_exp_sfa_rr to
IF_cond_exp_CobaSFA1_CobaSFA2
or something?
Opened: 2008-01-25 16:07:12
Last modified: 2008-02-02 18:46:21
Component: common
Priority: minor
Owner: emuller
Reporter: emuller
File references are not completely cleared between simulations with pyNN.neuron and recording single cells, for example using NeuroTools.benchmark.
In more detail, stale file references seem to hang around in vfilelist
and spikefilelist
(defined in neuron.init.py). Upon calling end()
NEURON is told to write to those files, which are already closed.
I have attached a code sample that should reproduce this behaviour. Inspecting vfilelist
and spikefilelist
during the execution reveals the entries that cause an error during the second run of the benchmark.
Opened: 2008-03-12 18:14:39
Last modified: 2008-03-13 11:55:43
Component: oldneuron
Priority: major
Owner: apdavison
Reporter: mschmucker
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.