Implementing Alpha Synapses

128 views
Skip to first unread message

jamest212

unread,
Jul 26, 2009, 7:44:18 PM7/26/09
to Brian
Hello,

I am trying to figure out how to use the alpha_synapse subclass, and
have been trying to implement it in a very simple model of a couple of
Poisson spiking neurons, sending input in to a third neuron, with the
connection being modeled by an Alpha synapse.

Here is what I am doing:

######

from brian import *
from brian.library.synapses import *

taue = 5*ms
gl = 20*nS
El = -60*mV
Vt = -50*mV
Vr = -60*mV

eqs = MembraneEquation(C=200*pF)
eqs += Current('I=gl*(El-vm):amp')
eqs += alpha_conductance(input='ge',E=Ee, tau=taue)

input = PoissonGroup(2,rates=50*Hz)
G = NeuronGroup(N=1, model = eqs, threshold=Vt, reset = Vr)

C = Connection(input,G,'ge')

Mvm = StateMonitor(G,'vm',record=True)
Mge = StateMonitor(G,'ge',record=True)

run(100*ms)

figure()
subplot(211)
plot(Mvm,times,Mv[0])
subplot(212)
plot(Mge.times,Mge[0])
show()

#############

When I observe the states of vm and ge, vm stays at rest, and for
obvious reasons: ge never moves. If I am making some foolish error
here, I would be grateful if someone were to point it out.

I was not sure from the documentation how to assign the "max value" to
the synapse conductance (I did read that it is normalized to a max of
1).

If I try to assign a "weight" in the connection, it seems to just
treat the conductances as exponential conductances.

I hope I am not overlooking something obvious in the documentation.

Thank you very much,

James Trousdale

Romain Brette

unread,
Jul 27, 2009, 3:09:35 AM7/27/09
to brians...@googlegroups.com
Hi James,

You need to create the synaptic connections explicitly, otherwise the
weights are 0. For example:
C[0,0]=20*nS
C[1,0]=10*nS
(My personal advice, however, would be to use explicit equations.)

Best,
Romain

jamest212 a écrit :

jamest212

unread,
Jul 27, 2009, 5:33:58 PM7/27/09
to Brian
Romain,

Thanks for the prompt response.

Adding your suggesting to my code caused the behavior to be as an
exponential synapse.

This is the same thing that happened when I originally tried to assign
a weight when assigning the connection.

However, using the alpha_synapse function gave the desired result.

In my code, am I misusing the alpha_conductance function, or
misinterpreting the result?

Note: there are a couple of minor typos in the code I posted.

In any event, it is working now as I wanted it to.

Thanks for your work on Brian, I am very excited to continue exploring
it.

James

Romain Brette

unread,
Jul 28, 2009, 4:01:06 AM7/28/09
to brians...@googlegroups.com
Hi James,

In fact it's normal that it looks like an exponential synapse, because
you are monitoring the input variable ge, whereas the current is
ge_current. The alpha synapse is implemented by two equations:
dx/dt = (y-x)/tau
dy/dt = -y/tau
and input spikes trigger y->y+w (here y is ge). But the output is x (and
the current is x*(E-vm) for the alpha conductance). So you can see here
that y(t) is exponential and x(t) is alpha.

Romain

jamest212 a écrit :

jamest212

unread,
Jul 28, 2009, 10:31:56 AM7/28/09
to Brian

Romain,

My mistake. Thanks for the explanation, I was not understanding the
usage of the command.

James
Reply all
Reply to author
Forward
0 new messages