Hi,
Weights are properties of connections (synapses), so you'd set these (e.g. in your
Python script) using something like:
nest.Connect(spikegenerator, neuron, syn_spec={'weight': 1e3})
This value is then stored in the C++ synapse instance, for example in the static synapse:
https://github.com/nest/nest-simulator/blob/2869b6364ccd85edf69246deb12c03c…
The neuron obtains the weight from a SpikeEvent from its incoming connection by calling
get_weight() on the event here, as you pointed out:
https://github.com/nest/nest-simulator/blob/2869b6364ccd85edf69246deb12c03c…
The other multiplicative factor, multiplicity, is there to support the possibility for
more than one spike to occur at the exact same time; typically this will just be equal to
1.
Your understanding of the handle(SpikeEvent&) function is correct; for more
documentation about how the buffer works, see the API comments in
`nestkernel/ring_buffer.h`.
The iaf neuron with alpha synapse is typically theoretically described as a differential
equation, but for this particular neuron+synapse combination, there is an easy analytic
solution of the differential equation. This means that we don't need a numerical
integrator (like GSL provides), but that we can compute the solution directly, which is
more efficient and precise. See the references at the bottom of the iaf_psc_alpha model
documentation (in the .h file), especially
https://doi.org/10.1007/s004220050570
With kind regards,
Charl
On Wed, Dec 30, 2020, at 13:26, enguang zhou wrote:
> Dear Charl,
> Thank for your answer. And I am also confused about the code on lines
> 345-346, at
>
https://github.com/nest/nest-simulator/blob/2869b6364ccd85edf69246deb12c03c….
> The line 345 says 'V_.weighted_spikes_ex_ = B_.ex_spikes_.get_value(
> lag );', and does that means V_weighted_spikes_ex_ is the weight I set?
>
> Except the last question, I also want to confirm whether I understand
> right to those code on lines 380-395(showed below), which is a handle
> invoked by spike event. First, the get_weight() will get the weight I
> set, multiplied by something(I don't know what it is, If you can
> answer that will be better ). Second the 's' variable will be stored in
> buffer by add_value() . Third when execute the code on 345 line(showed
> above) of update(), the get_value() will read out the 's' stored by
> add_value(). Fourth, does there a differential equation describing the
> membrane potential for the iaf_psc_alpha model? I know there are
> several neurons have differential equation such as gif_cond_exp
> neuron, this is at ,
>
>
https://nest-simulator.readthedocs.io/en/nest-2.20.1/models/neurons.html?hi…
>
> iaf_psc_alpha::handle( SpikeEvent& e )
> {
> assert( e.get_delay_steps() > 0 );
>
> const double s = e.get_weight() * e.get_multiplicity();
>
> if ( e.get_weight() > 0.0 )
> {
> B_.ex_spikes_.add_value( e.get_rel_delivery_steps(
> kernel().simulation_manager.get_slice_origin() ), s );
> }
> else
> {
> B_.in_spikes_.add_value( e.get_rel_delivery_steps(
> kernel().simulation_manager.get_slice_origin() ), s );
> }
> }
> Thank you again and expect answers from you and anyone else.
> Best regards,
> Enguang
> _______________________________________________
> NEST Users mailing list -- users(a)nest-simulator.org
> To unsubscribe send an email to users-leave(a)nest-simulator.org
>