synaptic connections with conditions

11 views
Skip to first unread message

David King

unread,
Aug 18, 2020, 5:29:41 PM8/18/20
to Brian
I'm trying to build synapses between an excitatory neuron group and an inhibitory neuron group in the following ways: 

 -  connection from excitatory neurons to a certain number of  inhibitory neurons, i.e. E_to_I connection.  
-  then build connection from the inhibitory neurons to all excitatory neurons, i.e. I_to_E,  except to those that already has E_to_I connection to the same inhibitory neurons. 

One can create loops to identify and pre and post neuron ID from the E_to_I connections and remove those from the I_to_E connection.  I'm wondering if there is a simpler way of doing it. 

Thanks 
--Wei

Felix Kern

unread,
Aug 19, 2020, 3:14:24 AM8/19/20
to Brian
I don't think there's an intrinsic way to filter for existing connections from a different Synapse object. The most parsimonious way to do this, I think, would be to use the synapse.connect(i=..,j=..) syntax. Unless your populations are huge, it should be possible to build a connectivity matrix of the E_to_I connection, then use the inverse of that for the I_to_E. Something like this, assuming a pre-built E-to-I connectivity matrix `mat`:

i,j = zip(*np.argwhere(mat))
E_to_I.connect(i=i, j=j)
i,j = zip(*np.argwhere(mat.T==0))
I_to_E.connect(i=i, j=j)

Hope that helps!
Reply all
Reply to author
Forward
0 new messages