Each element/entity of the simple model we will implement, will be simulated by a corresponding object in PCSIM . The following table shows the correspondence between the elements of the model and the class of the object used to simulate the element
element of model | class of PCSIM object |
---|---|
input spike train | SpikingInputNeuron |
dynamic synapse | DynamicSpikingSynapse |
LIF neuron | LifNeuron |
>>> input = SpikingInputNeuron() >>> synapse = DynamicSpikingSynapse()) >>> neuron = LifNeuron()
The code above generates models with the detault parameters. For simple models like the LifNeuron it is convinient to set its parameter directly when defining the model.3.1
>>> inp_model = SpikingInputNeuron( [ 0.01, 0.02, 0.03, 0.05, 0.1, 0.15 ] ) >>> nrn_model = LifNeuron( Cm=2e-10, Rm=1e8, Vthresh=-50e-3, Inoise=0.8e-9 ) >>> syn_model = DynamicSpikingSynapse( W=2e-8, tau=5e-3, delay=1e-3 )
It is important to note that the three created instances do not have any relation to the network net at the moment. In order to create object instances within the network we have to call net.create:
>>> inp_handle = net.create( inp_model ) >>> nrn_handle = net.create( nrn_model )
The effect of the create method is that a object instance are created from the object model3.2. passed as arument to create. The value returned from create is a handle or id to the actual object instance which is managed by the network.