本文整理汇总了Python中brian2.NeuronGroup.mu方法的典型用法代码示例。如果您正苦于以下问题:Python NeuronGroup.mu方法的具体用法?Python NeuronGroup.mu怎么用?Python NeuronGroup.mu使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类brian2.NeuronGroup
的用法示例。
在下文中一共展示了NeuronGroup.mu方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _build_model
# 需要导入模块: from brian2 import NeuronGroup [as 别名]
# 或者: from brian2.NeuronGroup import mu [as 别名]
def _build_model(self, traj, brian_list, network_dict):
"""Builds the neuron groups from `traj`.
Adds the neuron groups to `brian_list` and `network_dict`.
"""
model = traj.parameters.model
# Create the equations for both models
eqs_dict = self._build_model_eqs(traj)
# Create inhibitory neurons
eqs_i = eqs_dict['i']
neurons_i = NeuronGroup(N=model.N_i,
model = eqs_i,
threshold=model.V_th,
reset=model.reset_func,
refractory=model.refractory,
method='Euler')
# Create excitatory neurons
eqs_e = eqs_dict['e']
neurons_e = NeuronGroup(N=model.N_e,
model = eqs_e,
threshold=model.V_th,
reset=model.reset_func,
refractory=model.refractory,
method='Euler')
# Set the bias terms
neurons_e.mu =rand(model.N_e) * (model.mu_e_max - model.mu_e_min) + model.mu_e_min
neurons_i.mu =rand(model.N_i) * (model.mu_i_max - model.mu_i_min) + model.mu_i_min
# Set initial membrane potentials
neurons_e.V = rand(model.N_e)
neurons_i.V = rand(model.N_i)
# Add both groups to the `brian_list` and the `network_dict`
brian_list.append(neurons_i)
brian_list.append(neurons_e)
network_dict['neurons_e']=neurons_e
network_dict['neurons_i']=neurons_i