Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move precise spike time offset from Event to Time class #2035

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from
7 changes: 0 additions & 7 deletions models/clopath_synapse.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,6 @@ synapses can only be connected to neuron models that are capable of doing this
archiving. So far, compatible models are ``aeif_psc_delta_clopath`` and
``hh_psc_alpha_clopath``.

.. warning::

This synaptic plasticity rule does not take
:ref:`precise spike timing <sim_precise_spike_times>` into
account. When calculating the weight update, the precise spike time part
of the timestamp is ignored.

See also [2]_, [3]_.

Parameters
Expand Down
8 changes: 4 additions & 4 deletions models/cont_delay_synapse.h
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ cont_delay_synapse< targetidentifierT >::send( Event& e, size_t t, const CommonS
e.set_receiver( *get_target( t ) );
e.set_weight( weight_ );
e.set_rport( get_rport() );
double orig_event_offset = e.get_offset();
double orig_event_offset = e.get_stamp().get_offset();
double total_offset = orig_event_offset + delay_offset_;
// As far as i have seen, offsets are outside of tics regime provided
// by the Time-class to allow more precise spike-times, hence comparing
Expand All @@ -231,16 +231,16 @@ cont_delay_synapse< targetidentifierT >::send( Event& e, size_t t, const CommonS
if ( total_offset < Time::get_resolution().get_ms() )
{
e.set_delay_steps( get_delay_steps() );
e.set_offset( total_offset );
e.get_stamp().set_offset( total_offset );
}
else
{
e.set_delay_steps( get_delay_steps() - 1 );
e.set_offset( total_offset - Time::get_resolution().get_ms() );
e.get_stamp().set_offset( total_offset - Time::get_resolution().get_ms() );
}
e();
// reset offset to original value
e.set_offset( orig_event_offset );
e.get_stamp().set_offset( orig_event_offset );

return true;
}
Expand Down
7 changes: 0 additions & 7 deletions models/eprop_synapse_bsshslm_2020.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,6 @@ For more information on the optimizers, see the documentation of the weight opti

Details on the event-based NEST implementation of e-prop can be found in [2]_.

.. warning::

This synaptic plasticity rule does not take
:ref:`precise spike timing <sim_precise_spike_times>` into
account. When calculating the weight update, the precise spike time part
of the timestamp is ignored.

Parameters
++++++++++

Expand Down
7 changes: 0 additions & 7 deletions models/ht_synapse.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,6 @@ Synaptic dynamics are given by
For implementation details see:
`HillTononi_model <../model_details/HillTononiModels.ipynb>`_

.. warning::

This synaptic plasticity rule does not take
:ref:`precise spike timing <sim_precise_spike_times>` into
account. When calculating the weight update, the precise spike time part
of the timestamp is ignored.

Parameters
++++++++++

Expand Down
4 changes: 2 additions & 2 deletions models/iaf_bw_2001.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ nest::iaf_bw_2001::update( Time const& origin, const long from, const long to )
S_.s_NMDA_pre += s_NMDA_delta;

SpikeEvent se;
se.set_offset( s_NMDA_delta );
se.get_stamp().set_offset( s_NMDA_delta );
kernel().event_delivery_manager.send( *this, se, lag );
}

Expand Down Expand Up @@ -509,7 +509,7 @@ nest::iaf_bw_2001::handle( SpikeEvent& e )
}
else
{
B_.spikes_[ rport - 1 ].add_value( steps, e.get_weight() * e.get_multiplicity() * e.get_offset() );
B_.spikes_[ rport - 1 ].add_value( steps, e.get_weight() * e.get_multiplicity() * e.get_stamp().get_offset() );
}
}

Expand Down
2 changes: 1 addition & 1 deletion models/iaf_chxk_2008.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ nest::iaf_chxk_2008::update( Time const& origin, const long from, const long to
set_spiketime( Time::step( origin.get_steps() + lag + 1 ) );

SpikeEvent se;
se.set_offset( dt );
se.get_stamp().set_offset( dt );
kernel().event_delivery_manager.send( *this, se, lag );
}

Expand Down
6 changes: 3 additions & 3 deletions models/iaf_psc_alpha_ps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ nest::iaf_psc_alpha_ps::handle( SpikeEvent& e )

B_.events_.add_spike( e.get_rel_delivery_steps( nest::kernel().simulation_manager.get_slice_origin() ),
Tdeliver,
e.get_offset(),
e.get_stamp().get_offset(),
e.get_weight() * e.get_multiplicity() );
}

Expand Down Expand Up @@ -547,7 +547,7 @@ nest::iaf_psc_alpha_ps::emit_spike_( Time const& origin, const long lag, const d
// send spike
set_spiketime( Time::step( S_.last_spike_step_ ), S_.last_spike_offset_ );
SpikeEvent se;
se.set_offset( S_.last_spike_offset_ );
se.get_stamp().set_offset( S_.last_spike_offset_ );
kernel().event_delivery_manager.send( *this, se, lag );

return;
Expand All @@ -569,7 +569,7 @@ nest::iaf_psc_alpha_ps::emit_instant_spike_( Time const& origin, const long lag,
// send spike
set_spiketime( Time::step( S_.last_spike_step_ ), S_.last_spike_offset_ );
SpikeEvent se;
se.set_offset( S_.last_spike_offset_ );
se.get_stamp().set_offset( S_.last_spike_offset_ );
kernel().event_delivery_manager.send( *this, se, lag );

return;
Expand Down
6 changes: 3 additions & 3 deletions models/iaf_psc_delta_ps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ nest::iaf_psc_delta_ps::emit_spike_( Time const& origin, const long lag, const d
// send spike
set_spiketime( Time::step( S_.last_spike_step_ ), S_.last_spike_offset_ );
SpikeEvent se;
se.set_offset( S_.last_spike_offset_ );
se.get_stamp().set_offset( S_.last_spike_offset_ );
kernel().event_delivery_manager.send( *this, se, lag );
}

Expand All @@ -500,7 +500,7 @@ nest::iaf_psc_delta_ps::emit_instant_spike_( Time const& origin, const long lag,
// send spike
set_spiketime( Time::step( S_.last_spike_step_ ), S_.last_spike_offset_ );
SpikeEvent se;
se.set_offset( S_.last_spike_offset_ );
se.get_stamp().set_offset( S_.last_spike_offset_ );
kernel().event_delivery_manager.send( *this, se, lag );
}

Expand All @@ -516,7 +516,7 @@ iaf_psc_delta_ps::handle( SpikeEvent& e )
const long Tdeliver = e.get_stamp().get_steps() + e.get_delay_steps() - 1;
B_.events_.add_spike( e.get_rel_delivery_steps( kernel().simulation_manager.get_slice_origin() ),
Tdeliver,
e.get_offset(),
e.get_stamp().get_offset(),
e.get_weight() * e.get_multiplicity() );
}

Expand Down
6 changes: 3 additions & 3 deletions models/iaf_psc_exp_ps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ nest::iaf_psc_exp_ps::handle( SpikeEvent& e )

B_.events_.add_spike( e.get_rel_delivery_steps( nest::kernel().simulation_manager.get_slice_origin() ),
Tdeliver,
e.get_offset(),
e.get_stamp().get_offset(),
e.get_weight() * e.get_multiplicity() );
}

Expand Down Expand Up @@ -516,7 +516,7 @@ nest::iaf_psc_exp_ps::emit_spike_( const Time& origin, const long lag, const dou
set_spiketime( Time::step( S_.last_spike_step_ ), S_.last_spike_offset_ );
SpikeEvent se;

se.set_offset( S_.last_spike_offset_ );
se.get_stamp().set_offset( S_.last_spike_offset_ );
kernel().event_delivery_manager.send( *this, se, lag );
}

Expand All @@ -537,7 +537,7 @@ nest::iaf_psc_exp_ps::emit_instant_spike_( const Time& origin, const long lag, c
set_spiketime( Time::step( S_.last_spike_step_ ), S_.last_spike_offset_ );
SpikeEvent se;

se.set_offset( S_.last_spike_offset_ );
se.get_stamp().set_offset( S_.last_spike_offset_ );
kernel().event_delivery_manager.send( *this, se, lag );
}

Expand Down
6 changes: 3 additions & 3 deletions models/iaf_psc_exp_ps_lossless.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ nest::iaf_psc_exp_ps_lossless::handle( SpikeEvent& e )

B_.events_.add_spike( e.get_rel_delivery_steps( nest::kernel().simulation_manager.get_slice_origin() ),
Tdeliver,
e.get_offset(),
e.get_stamp().get_offset(),
e.get_weight() * e.get_multiplicity() );
}

Expand Down Expand Up @@ -559,7 +559,7 @@ nest::iaf_psc_exp_ps_lossless::emit_spike_( const Time& origin, const long lag,
set_spiketime( Time::step( S_.last_spike_step_ ), S_.last_spike_offset_ );
SpikeEvent se;

se.set_offset( S_.last_spike_offset_ );
se.get_stamp().set_offset( S_.last_spike_offset_ );
kernel().event_delivery_manager.send( *this, se, lag );
}

Expand All @@ -580,7 +580,7 @@ nest::iaf_psc_exp_ps_lossless::emit_instant_spike_( const Time& origin, const lo
set_spiketime( Time::step( S_.last_spike_step_ ), S_.last_spike_offset_ );
SpikeEvent se;

se.set_offset( S_.last_spike_offset_ );
se.get_stamp().set_offset( S_.last_spike_offset_ );
kernel().event_delivery_manager.send( *this, se, lag );
}

Expand Down
4 changes: 2 additions & 2 deletions models/iaf_tum_2000.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ nest::iaf_tum_2000::update( const Time& origin, const long from, const long to )

// send spike with datafield
SpikeEvent se;
se.set_offset( delta_y_tsp );
se.get_stamp().set_offset( delta_y_tsp );
kernel().event_delivery_manager.send( *this, se, lag );
}

Expand Down Expand Up @@ -458,7 +458,7 @@ nest::iaf_tum_2000::handle( SpikeEvent& e )

if ( e.get_rport() == 1 )
{
s *= e.get_offset();
s *= e.get_stamp().get_offset();
}

// separate buffer channels for excitatory and inhibitory inputs
Expand Down
7 changes: 0 additions & 7 deletions models/jonke_synapse.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,6 @@ and
This makes it possible to implement update rules which approximate the
rule stated in [1]_, and for examples, the rules given in [2]_ and [3]_.

.. warning::

This synaptic plasticity rule does not take
:ref:`precise spike timing <sim_precise_spike_times>` into
account. When calculating the weight update, the precise spike time part
of the timestamp is ignored.

Parameters
++++++++++

Expand Down
4 changes: 2 additions & 2 deletions models/parrot_neuron_ps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ parrot_neuron_ps::update( Time const& origin, long const from, long const to )
// send spike
SpikeEvent se;
se.set_multiplicity( multiplicity );
se.set_offset( ev_offset );
se.get_stamp().set_offset( ev_offset );
kernel().event_delivery_manager.send( *this, se, lag );

for ( unsigned long i = 0; i < multiplicity; ++i )
Expand Down Expand Up @@ -121,7 +121,7 @@ parrot_neuron_ps::handle( SpikeEvent& e )
// parrot ignores weight of incoming connection, store multiplicity
B_.events_.add_spike( e.get_rel_delivery_steps( nest::kernel().simulation_manager.get_slice_origin() ),
Tdeliver,
e.get_offset(),
e.get_stamp().get_offset(),
static_cast< double >( e.get_multiplicity() ) );
}
}
Expand Down
2 changes: 1 addition & 1 deletion models/poisson_generator_ps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ nest::poisson_generator_ps::event_hook( DSSpikeEvent& e )
while ( nextspk.first <= V_.t_max_active_ )
{
e.set_stamp( nextspk.first );
e.set_offset( nextspk.second );
e.get_stamp().set_offset( nextspk.second );
e.get_receiver().handle( e );

// Draw time of next spike
Expand Down
7 changes: 0 additions & 7 deletions models/quantal_stp_synapse.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,6 @@ equations is taken from Maass and Markram 2002 [3]_.
The connection weight is interpreted as the maximal weight that can
be obtained if all n release sites are activated.

.. warning::

This synaptic plasticity rule does not take
:ref:`precise spike timing <sim_precise_spike_times>` into
account. When calculating the weight update, the precise spike time part
of the timestamp is ignored.

Parameters
++++++++++

Expand Down
2 changes: 1 addition & 1 deletion models/spike_generator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ nest::spike_generator::update( Time const& sliceT0, const long from, const long

if ( P_.precise_times_ )
{
se->set_offset( P_.spike_offsets_[ S_.position_ ] );
se->get_stamp().set_offset( P_.spike_offsets_[ S_.position_ ] );
}

if ( not P_.spike_multiplicities_.empty() )
Expand Down
2 changes: 1 addition & 1 deletion models/spike_train_injector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ spike_train_injector::update( Time const& sliceT0, const long from, const long t

if ( P_.precise_times_ )
{
se.set_offset( P_.spike_offsets_[ S_.position_ ] );
se.get_stamp().set_offset( P_.spike_offsets_[ S_.position_ ] );
}

if ( not P_.spike_multiplicities_.empty() )
Expand Down
7 changes: 0 additions & 7 deletions models/stdp_dopamine_synapse.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,6 @@ of neurons. The spikes emitted by the pool of dopamine neurons are
delivered to the synapse via the assigned volume transmitter. The
dopaminergic dynamics is calculated in the synapse itself.

.. warning::

This synaptic plasticity rule does not take
:ref:`precise spike timing <sim_precise_spike_times>` into
account. When calculating the weight update, the precise spike time part
of the timestamp is ignored.

Parameters
++++++++++

Expand Down
7 changes: 0 additions & 7 deletions models/stdp_facetshw_synapse_hom.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,6 @@ The modified spike pairing scheme requires the calculation of ``tau_minus_``
within this synapse and not at the neuron site via ``Kplus_`` like in
``stdp_synapse_hom``.

.. warning::

This synaptic plasticity rule does not take
:ref:`precise spike timing <sim_precise_spike_times>` into
account. When calculating the weight update, the precise spike time part
of the timestamp is ignored.

The synapse IDs are assigned to each synapse in an ascending order (0,1,2,
...) according their first presynaptic activity and is used to group synapses
that are updated at once. It is possible to avoid activity dependent synapse
Expand Down
7 changes: 0 additions & 7 deletions models/stdp_nn_pre_centered_synapse.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,6 @@ occurrence, and is reset to 0 on a post-spike occurrence. The postsynaptic
trace (implemented on the postsynaptic neuron side) decays with the time
constant ``tau_minus`` and increases to 1 on a post-spike occurrence.

.. warning::

This synaptic plasticity rule does not take
:ref:`precise spike timing <sim_precise_spike_times>` into
account. When calculating the weight update, the precise spike time part
of the timestamp is ignored.

Parameters
++++++++++

Expand Down
7 changes: 0 additions & 7 deletions models/stdp_nn_restr_synapse.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,6 @@ eligibility trace [1]_ (implemented on the postsynaptic neuron side). It
decays exponentially with the time constant ``tau_minus`` and increases to 1 on
a post-spike occurrence (instead of increasing by 1 as in ``stdp_synapse``).

.. warning::

This synaptic plasticity rule does not take
:ref:`precise spike timing <sim_precise_spike_times>` into
account. When calculating the weight update, the precise spike time part
of the timestamp is ignored.

Parameters
++++++++++

Expand Down
7 changes: 0 additions & 7 deletions models/stdp_nn_symm_synapse.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,6 @@ occurrence. The postsynaptic trace (implemented on the postsynaptic neuron
side) decays with the time constant ``tau_minus`` and increases to 1 on a
post-spike occurrence.

.. warning::

This synaptic plasticity rule does not take
:ref:`precise spike timing <sim_precise_spike_times>` into
account. When calculating the weight update, the precise spike time part
of the timestamp is ignored.

Parameters
++++++++++

Expand Down
7 changes: 0 additions & 7 deletions models/stdp_pl_synapse_hom.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,6 @@ Parameters
The parameters can only be set by SetDefaults and apply to all synapses of
the model.

.. warning::

This synaptic plasticity rule does not take
:ref:`precise spike timing <sim_precise_spike_times>` into
account. When calculating the weight update, the precise spike time part
of the timestamp is ignored.

References
++++++++++

Expand Down
7 changes: 0 additions & 7 deletions models/stdp_synapse.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,6 @@ Description
dependent plasticity (as defined in [1]_). Here the weight dependence
exponent can be set separately for potentiation and depression.

.. warning::

This synaptic plasticity rule does not take
:ref:`precise spike timing <sim_precise_spike_times>` into
account. When calculating the weight update, the precise spike time part
of the timestamp is ignored.

See also [2]_, [3]_, [4]_.

Parameters
Expand Down
Loading
Loading