In [1]:
from brian import *
Paramètres
In [2]:
tau_Ein = 3*msecond
g_Ein0 = 0.5*siemens*meter**-2
sigma_Ein = 2*siemens*meter**-2*second**(-1./2)
Equation input
In [3]:
eq_g_input = Equations('dg_Ein/dt = (g_Ein0 - g_Ein)/tau_Ein + sigma_Ein * xi : siemens*meter**-2')
eq_input = Equations('I_input = g_Ein*(V - 0*mvolt) : amp*meter**-2') + eq_g_input
In [24]:
eq_input
Out[24]:
Paramètres
In [4]:
V_E = 0*mvolt
V_act_E = 0*mvolt
g_E_low = 0.7*siemens*meter**-2
g_E_high = 3.5*siemens*meter**-2
sigma_E = 0.01*mvolt
alpha_E = 1*msecond**-1
beta_E = 1./3*msecond**-1
V_I = -70*mvolt
V_act_I = -66.4*mvolt
g_I = 10*siemens*meter**-2
sigma_I = 0.4*mvolt
alpha_I = 5*msecond**-1
beta_I = 1./10*msecond**-1
Fonction décrivant le courant synaptique granule <--> mitrales
In [5]:
def synapse_eq(g_syn, V_post, V_syn, alpha, beta, V_pre, V_act, sigma):
"""Return the synapse equation model"""
eq_i = 'I_syn = '+g_syn+'*s_syn*('+V_post+' - '+V_syn+') : amp*meter**-2'
eq_s = 'ds/dt = '+alpha+'*(1 - s)*T - '+beta+'*s : 1'
eq_T = 'T = 1/(1 + exp(-1*('+V_pre+' - '+V_act+')/'+sigma+')) : 1'
eq_s_syn = 's_syn : 1'
eq_syn = Equations(eq_i) + Equations(eq_s) + Equations(eq_T) + Equations(eq_s_syn)
return eq_syn
def synapseLIF_eq(g_syn, V_post, V_syn, alpha, beta, V_pre, V_act, sigma):
"""Return the synapse equation model"""
eq_i = 'I_syn = '+g_syn+'*s_syn*('+V_post+' - '+V_syn+') : amp*meter**-2'
eq_s = 'ds/dt = '+alpha+'*(1 - s)*T - '+beta+'*s : 1'
eq_T = 'T : 1'
eq_s_syn = 's_syn : 1'
eq_syn = Equations(eq_i) + Equations(eq_s) + Equations(eq_T) + Equations(eq_s_syn)
return eq_syn
Paramètres (g_L
et E_L
trouvés via le modèle Fourcaud et al. 2011)
In [6]:
N_mitral = 100
Cm = 0.01*farad*meter**-2
g_L = 0.87*siemens*meter**-2
E_L = -64.5*mvolt
V_r = E_L # TODO
V_t = -45*mvolt # TODO
t_refract = 1*msecond
Modèle de mitrale (LIF)
In [7]:
# eq_mitral = """dV/dt = (-g_L*(V - E_L) - I_syn + I_electrode)/Cm : mvolt
# I_electrode : amp*meter**-2""" # pour courbe fI
eq_mitral = 'dV/dt = (-g_L*(V - E_L) - I_syn - I_input)/Cm : mvolt'
eq_exc_current = synapseLIF_eq('g_I', 'V', 'V_I', 'alpha_E', 'beta_E', 'V', 'V_act_E', 'sigma_E')
In [8]:
eqs_model_mitrales = eq_mitral + eq_exc_current + eq_input
eqs_model_mitrales
Création du réseau de mitrales
In [9]:
pop_mitrales = NeuronGroup(N=N_mitral, model=eqs_model_mitrales, threshold=V_t, reset=V_r, refractory=t_refract)
pop_mitrales.V = E_L
Initialisation pour courbe fI
In [10]:
# pop_mitrales.I_Electrode = linspace(0.001*amp*meter**-2, 40*0.001*amp*meter**-2, N_mitral)
Paramètres
In [11]:
N_granule = 1
C_m = 0.01*farad*meter**-2
g_l = 0.83*siemens*meter**-2
E_l = -70*mvolt
g_SD = 1*siemens*meter**-2
g_DS = 300*siemens*meter**-2
Equations du modèle de granule
In [12]:
eq_soma = Equations('dV_S/dt = (-g_l*(V_S - E_l) + g_SD*(V_D - V_S))/C_m : mvolt')
eq_dendrites = Equations('dV_D/dt = (-g_l*(V_D - E_l) + g_DS*(V_S - V_D) - I_syn)/C_m : mvolt')
eq_inhib_current = synapse_eq('g_E_high', 'V_D', 'V_E', 'alpha_I', 'beta_I', 'V_D', 'V_act_I', 'sigma_I')
In [13]:
eqs_model_granule = eq_soma + eq_dendrites + eq_inhib_current
eqs_model_granule
Création du réseau de neurone
In [14]:
pop_granules = NeuronGroup(N_granule, model=eqs_model_granule, implicit=False)
pop_granules.V_D = E_l
pop_granules.V_S = E_l
In [15]:
connections = np.ones((N_mitral,N_granule))
@network_operation(when='start')
def graded_synapse():
#connections
pop_mitrales.state('T')[:]=0.
pop_mitrales.state('T')[pop_mitrales.get_refractory_indices()]=1.
pop_granules.s_syn = dot(pop_mitrales.s, connections)
pop_mitrales.s_syn = dot(pop_granules.s, np.transpose(connections))
@network_operation(when='after_groups')
def keep_reset():
pop_mitrales.state('V')[pop_mitrales.get_refractory_indices()]=V_r
Paramètres
In [16]:
defaultclock.dt = 0.05*msecond
t_simu = 5000*msecond
Monitoring
In [17]:
monit_granules = {}
monit_mitrales = {}
for pname in ('V_D', 's_syn', 's'):
monit_granules[pname] = StateMonitor(pop_granules, pname, record=True)
for pname in ('s', 'V'):
monit_mitrales[pname] = StateMonitor(pop_mitrales, pname, record=0)
monit_mitrales['spikes'] = SpikeMonitor(pop_mitrales, record=True)
Lancement simulation
In [18]:
run(t_simu, report='text')
Dynamique du potentiel membranaire de la granule
In [19]:
figure()
plot(monit_granules['V_D'].times/msecond, monit_granules['V_D'][0]/mvolt)
xlabel('time (ms)')
ylabel('membrane potential of granule : V_D (mvolt)')
Out[19]:
Spikes de la population de mitrales
In [20]:
figure()
plot(monit_mitrales['V'].times / msecond, monit_mitrales['V'][0]/mvolt)
xlabel('time (ms)')
ylabel('membrane potential of mitral : V (mvolt)')
Out[20]:
In [21]:
figure()
plot(monit_mitrales['s'].times / msecond, monit_mitrales['s'][0])
plot(monit_granules['s_syn'].times / msecond, monit_granules['s_syn'][0])
plot(monit_granules['s'].times / msecond, monit_granules['s'][0])
xlabel('time (ms)')
ylabel('s mitral & s_syn granule & s granule')
Out[21]:
In [22]:
print 'Spikes of', N_mitral, ' mitral:', monit_mitrales['spikes'].nspikes
raster_plot(newfigure=True)
In [23]:
show()