step_current_generator – Provide a piecewise constant DC input current¶
Description¶
The step_current_generator
provides a piecewise constant DC input to the
connected node(s). The amplitude of the current is changed at the
specified times. The unit of the current is pA.
If allow_offgrid_spikes
is set false, times will be rounded to the
nearest step if they are less than tic/2 from the step, otherwise NEST
reports an error. If true, times are rounded to the nearest step if
within tic/2 from the step, otherwise they are rounded up to the end
of the step.
Times of amplitude changes must be strictly increasing after conversion
to simulation time steps. The option allow_offgrid_times
may be
useful, for example, if you are using randomized times for current changes
which typically would not fall onto simulation time steps.
All stimulation devices share the parameters start
and stop
,
which control the stimulation period. The property origin
is a
global offset that shifts the stimulation period. All three values are
set as times in ms.
For spike-emitting devices, only spikes with times t that fulfill \(\mathrm{start} < t \leq \mathrm{stop}\) are emitted. Spikes that have timestamp of \(t = \mathrm{start}\) are not emitted.
For current-emitting devices, the current is activated and deactivated such that the current first affects the target dynamics during the update step \((\mathrm{start}, \mathrm{start}+h]\), that is, an effect can be recorded at the earliest at time \(\mathrm{start}+h\). The last interval during which the current affects the target’s dynamics is \((\textrm{stop}-h, \textrm{stop}]\).
The property stimulus_source
defaults to an empty string. It can
be set to the name of a stimulation backend, in which case it will
take its parameters from the configured backend instead of from the
internally stored values. More details on available backends and their
properties can be found in the guide to stimulating the network.
Parameters¶
- label
A string specifying an arbitrary textual label for the device. Stimulation backends might use the label to generate device specific identifiers like filenames and such. Default:
""
.- origin
A positive floating point number used as the reference time in ms for
start
andstop
. Default:0.0
.- start
A positive floating point number specifying the activation time in ms, relative to
origin
. Default:0.0
.- stimulus_source
A string specifying the name of the stimulation backend from which to get the data for updating the stimulus parameters of the device. By default, the device uses its internally stored parameters for updating the stimulus. Default:
""
.- stop
A floating point number specifying the deactivation time in ms, relative to
origin
. The value ofstop
must be greater than or equal tostart
. Default:infinity
.
- amplitude_times
Times at which current changes (list of times in ms)
- amplitude_values
Amplitudes of step current current (list of currents in pA)
- allow_offgrid_times
Boolean indicating if offgrid times should be used (default: False)
Set parameters from a stimulation backend¶
The parameters in this stimulation device can be updated with input coming from a stimulation backend. The data structure used for the update holds pairs of values in the form
[ (amplitude_times, amplitude_values), (amplitude_times, amplitude_values), … ].
Thus, the size of the data for the step_rate_generator needs to be even.
Sends¶
CurrentEvent
See also¶
ac_generator, dc_generator, noise_generator