Last active
October 13, 2015 23:33
-
-
Save astoeckel/9448859c6af9b7b1bd2b to your computer and use it in GitHub Desktop.
Spikey Bug: No spikes in for symmetric neuron populations
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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