testsuite::test_iaf_psc_exp_ps_lossless - sli script for overall test of iaf_psc_exp_ps_lossless model
(test_iaf_psc_exp_ps_lossless) run -> compares response to current step with reference data and tests lossless spike detection  

test_iaf_psc_exp_ps_lossless.sli is an overall test of the iaf_psc_exp_ps_lossless model connected
to some useful devices.

The first part of this test is exactly the same as test_iaf_psc_exp_ps,
demonstrating the numerical equivalency of both models in usual conditions.
The only difference between the models, which is tested in the second part,
is the detection of double threshold crossings during a simulation step
(so the membrane potential is again below V_th at the end of the step)
by the lossless model.

A DC current is injected into the neuron using a current generator
device. The membrane potential as well as the spiking activity are
recorded by corresponding devices.

It can be observed how the current charges the membrane, a spike
is emitted, the neuron becomes absolute refractory, and finally
starts to recover.

The timing of the various events on the simulation grid is of
particular interest and crucial for the consistency of the
simulation scheme.

Although 0.1 cannot be represented in the IEEE double data type, it
is safe to simulate with a resolution (computation step size) of 0.1
ms because by default nest is built with a timebase enabling exact
representation of 0.1 ms.

The expected output is documented and briefly commented at the end of
the script. The textual output of the voltmeter documented in this file
can be regenerated by setting adding /to_screen true to the SetStatus
call of vm below.

Other test programs discuss the various aspects of this script in detail,
see the SeeAlso key below.

The second part tests wether the lossless spike detection algorithm [1] is
working correctly.

The algorithm checks whether a spike is emitted on the basis of the neurons position
in state space. There are 4 regions in state space (see [1]): NS1, NS2, S1 and S2.
S1 corresponds to threshold crossings that would also be detected by the lossy
implementation /iaf_psc_exp_ps. S2 corresponds to crossings that would be missed.
The lossless model detects both.

The test brings 3 neurons into the state space regions NS2, S1 and S2,
which is done by keeping their membrane potential close to threshold and then
sending a single spike to them, which, received via different synaptic weights,
sets the synaptic current such that the neurons are in the respective region.
The existence and precise times of the resulting spikes are compared to reference data.

If you need to reproduce the reference data, ask the authors of [1] for the script
regions_algorithm.py which they used to generate Fig. 6. Here you can adjust the
parameters as whished and obtain the respective regions.

[1] Krishnan J, Porta Mana P, Helias M, Diesmann M and Di Napoli E
(2018) Perfect Detection of Spikes in the Linear Sub-threshold
Dynamics of Point Neurons. Front. Neuroinform. 11:75.
doi: 10.3389/fninf.2017.00075

Author: Jeyashree Krishnan, 2017, and Christian Keup, 2018
SeeAlso: Source: