Skip to content

Instantly share code, notes, and snippets.

@astoeckel
Last active October 13, 2015 23:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save astoeckel/9448859c6af9b7b1bd2b to your computer and use it in GitHub Desktop.
Save astoeckel/9448859c6af9b7b1bd2b to your computer and use it in GitHub Desktop.
Spikey Bug: No spikes in for symmetric neuron populations
#!/usr/bin/env python
'''
Spikey Bug: Neuron Populations
'''
import pyNN.hardware.spikey as pynn
pynn.setup()
params = {
"v_thresh": -55.0,
"v_rest": -60.0,
"v_reset": -70.0
}
w = 0.016
# Create three neuron populations
source = pynn.Population(1, pynn.SpikeSourceArray, {'spike_times': [100.0, 200.0, 300.0]})
#neuron1 = pynn.Population(1, pynn.IF_facets_hardware1, params) # (1)
neuron1 = pynn.Population(2, pynn.IF_facets_hardware1, params) # (2)
neuron1.record()
neuron2 = pynn.Population(1, pynn.IF_facets_hardware1, params)
neuron2.record()
neuron3 = pynn.Population(1, pynn.IF_facets_hardware1, params)
neuron3.record()
# Connect source to neuron1 and neuron2
pynn.Projection(source, neuron1,
pynn.FixedProbabilityConnector(p_connect=1.0, weights=w),
target='excitatory')
pynn.Projection(source, neuron2,
pynn.FixedProbabilityConnector(p_connect=1.0, weights=w),
target='excitatory')
pynn.Projection(source, neuron3,
pynn.FixedProbabilityConnector(p_connect=1.0, weights=w),
target='excitatory')
pynn.run(1000.0)
# Print all spikes
print "Pop 1:"
print neuron1.getSpikes()
print "Pop 2:"
print neuron2.getSpikes()
print "Pop 3:"
print neuron3.getSpikes()
pynn.end()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment