Brian2 学习笔记(2)-NeuronGroup class

NeuronGroup

模型

神经元的定义是整个模拟的核心,神经元模型就是一组(一个或多个)方程(要求为差分方程形式)。模型方程描述的语法如下:

NeuronGroup class

(Shortest importfrom brian2 import NeuronGroup)

class brian2.groups.neurongroup. NeuronGroup ( Nmodelmethod=('exact''euler''heun')method_options=Nonethreshold=Nonereset=Nonerefractory=Falseevents=Nonenamespace=Nonedtype=Nonedt=Noneclock=Noneorder=0name='neurongroup*'codeobj_class=None ) [source]

Bases: brian2.groups.group.Groupbrian2.core.spikesource.SpikeSource

A group of neurons.

Parameters:

N : int

本组模拟中神经元的个数.

model : (str, Equations)

The differential equations defining the group.

本组神经元的定义公式


使用例子:

method : (str, function), optional(可选择项)

The numerical integration method. Either a string with the name of a registered method (e.g. “euler”) or a function that receives an Equationsobject and returns the corresponding abstract code. If no method is specified, a suitable method will be chosen automatically.


数值积分的方式,有:1.欧拉方法(euler),2. Heun方法(Heun),3.exact方法(exact)

threshold : str, optional

The condition which produces spikes. Should be a single line boolean expression.


使用例子:

reset : str, optional

The (possibly multi-line) string with the code to execute on reset.


使用例子:

refractory : {str, Quantity}, optional

Either the length of the refractory period (e.g. 2*ms), a string expression that evaluates to the length of the refractory period after each spike (e.g. '(1 + rand())*ms'), or a string expression evaluating to a boolean value, given the condition under which the neuron stays refractory after a spike (e.g. 'v > -20*mV')


使用例子:

events : dict, optional

User-defined events in addition to the “spike” event defined by thethreshold. Has to be a mapping of strings (the event name) to strings (the condition) that will be checked.

namespace: dict, optional :

A dictionary mapping identifier names to objects. If not given, the namespace will be filled in at the time of the call of Network.run(), with either the values from the namespace argument of the Network.run()method or from the local context, if no such argument is given.

dtype : (dtypedict), optional

The numpy.dtype that will be used to store the values, or a dictionary specifying the type for variable names. If a value is not provided for a variable (or no value is provided at all), the preference setting core.default_float_dtype is used.


使用例子:

codeobj_class : class, optional

The CodeObject class to run code with.


使用例子:

dt : Quantity, optional

The time step to be used for the simulation. Cannot be combined with the clock argument.


使用例子:

clock : Clock, optional

The update clock to be used. If neither a clock, nor the dt argument is specified, the defaultclock will be used.


使用例子:

order : int, optional

The priority of of this group for operations occurring at the same time step and in the same scheduling slot. Defaults to 0.


使用例子:

name : str, optional

A unique name for the group, otherwise use neurongroup_0, etc.


使用例子:

  • 0
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值