G = SpikeGeneratorGroup(16,[],[]*ms)
N = NeuronGroup(16,eqs, threshold='v>-.55', reset='v = -.7')
S = Synapses(G,N)
S.connect(i=[ii for ii in range(2,6)],j=[jj for jj in range(10,15)])
S.connect(condition='i>1 and i<6 and j>9 and j<15')
Hi Vigneswaran:
A statement of the form “S.connect(i=[0,1,2],j=[10,11,12]) will not give a all-to-all connection (i.e. a total of 9 synapses). Instead, it will create 3 synapses (0,10),(1,11) and (2,12). The problem I am trying to solve is to create an all-to-all connection (with probability p) between non-contiguous groups in G and N. Is that possible? If so, how?
Thanks.
--
http://www.facebook.com/briansimulator
https://twitter.com/briansimulator
Please cite Brian 2: Stimberg M, Brette R, Goodman DFM (2019). Brian 2, an intuitive and efficient neural simulator. eLife, doi: 10.7554/eLife.47314.
---
You received this message because you are subscribed to the Google Groups "Brian" group.
To unsubscribe from this group and stop receiving emails from it, send an email to briansupport...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/briansupport/bcc7fa0c-10dc-4f05-b4ac-b86b3a367ddfn%40googlegroups.com.
from brian2 import *
import cv2
from datetime import datetime
tau = 2*ms
eqs = '''
dv/dt = (-.6-v)/tau : 1 (unless refractory)
'''
def go():
N = NeuronGroup(100000,eqs,threshold='v=-.55',reset='v=-.7',refractory=2*ms)
Sg = SpikeGeneratorGroup(100000,[],[]*ms)
S = Synapses(Sg,N,model='w:1')
x = [i for i in range(10000) for j in range(10000)]
y = [j for i in range(10000) for j in range(10000)]
start = datetime.now()
#S.connect(i=x,j=y)
S.connect(condition='i < 10000 and j < 10000')
end = datetime.now()
elapsed = (end-start).microseconds/1e3
print("Time to connect = %.4f milliseconds" % elapsed)
Enter code here...