def analytic_twopath(self,p,rate1,rate2):
'''
Population of neurons receive input from two pathways, the first path is gated-on
rate1 and rate2 are the input rate of each pathway
First we need to convert the input rate into conductance,
the dend_IO(exc, inh) function takes total excitatory and inhibitory
conductances as inputs
'''
# number of synapses
num_syn = 15
g_exc = p['g_exc']*num_syn
# gating variable
s1 = MCM.meansNMDA(rate1)
s2 = MCM.meansNMDA(rate2)
# Total conductance input
Exc1 = self.Exc1_raw*s1*g_exc # nS
Exc2 = self.Exc2_raw*s2*g_exc # nS
Exc = Exc1+Exc2
#frac_proj = 0.1 # fraction projection
N_proj = p['frac_proj']*self.params['n_pyr']
N_proj0 = np.floor(N_proj)
N_proj0 = min((N_proj0,self.params['n_pyr']-1))
N_proj0 = max((N_proj0,0))
DendV = dend_IO(Exc[:(N_proj0+1)*self.params['n_dend_each']],
self.Inh1[:(N_proj0+1)*self.params['n_dend_each']])
meanDendV = DendV.reshape(N_proj0+1,self.params['n_dend_each']).mean(axis=1)
SomaR = soma_fv(meanDendV)
# Make sure firing rate depend smoothly on frac_proj
rboth = (SomaR[:N_proj0].sum()+SomaR[N_proj0]*(N_proj-N_proj0))/N_proj
return rboth
评论列表
文章目录