Current sources

class DCSource(**parameters)[source]

Bases: NeuronCurrentSource, DCSource

Source producing a single pulse of current of constant amplitude.

Arguments:
start:

onset time of pulse in ms

stop:

end of pulse in ms

amplitude:

pulse amplitude in nA

inject_into(cells, location=None)

Inject the current from this source into the supplied group of cells.

cells may be a Population, PopulationView, Assembly or a list of ID objects.

get_parameters()

Return a dict of all current source parameters.

set_parameters(copy=True, **parameters)

Set current source parameters, given as a sequence of parameter=value arguments.

class ACSource(**parameters)[source]

Bases: NeuronCurrentSource, ACSource

Source producing a single pulse of current of constant amplitude.

Arguments:
start:

onset time of pulse in ms

stop:

end of pulse in ms

amplitude:

sine amplitude in nA

offset:

sine offset in nA

frequency:

frequency in Hz

phase:

phase in degrees

inject_into(cells, location=None)

Inject the current from this source into the supplied group of cells.

cells may be a Population, PopulationView, Assembly or a list of ID objects.

get_parameters()

Return a dict of all current source parameters.

set_parameters(copy=True, **parameters)

Set current source parameters, given as a sequence of parameter=value arguments.

class StepCurrentSource(**parameters)[source]

Bases: NeuronCurrentSource, StepCurrentSource

A step-wise time-varying current source.

Arguments:
times:

list/array of times at which the injected current changes.

amplitudes:

list/array of current amplitudes to be injected at the times specified in times.

The injected current will be zero up until the first time in times. The current will continue at the final value in amplitudes until the end of the simulation.

inject_into(cells, location=None)

Inject the current from this source into the supplied group of cells.

cells may be a Population, PopulationView, Assembly or a list of ID objects.

get_parameters()

Return a dict of all current source parameters.

set_parameters(copy=True, **parameters)

Set current source parameters, given as a sequence of parameter=value arguments.

class NoisyCurrentSource(**parameters)[source]

Bases: NeuronCurrentSource, NoisyCurrentSource

A Gaussian “white” noise current source. The current amplitude changes at fixed intervals, with the new value drawn from a Gaussian distribution.

Required arguments:
mean:

mean current amplitude in nA

stdev:

standard deviation of the current amplitude in nA

Optional arguments:
dt:

interval between updates of the current amplitude. Must be a multiple of the simulation time step. If not specified, the simulation time step will be used.

start:

onset of the current injection in ms. If not specified, the current will begin at the start of the simulation.

stop:

end of the current injection in ms. If not specified, the current will continue until the end of the simulation.

rng:

an RNG object from the pyNN.random module. For speed, this should be a NativeRNG instance (uses the simulator’s internal random number generator). For reproducibility across simulators, use one of the other RNG types. If not specified, a NumpyRNG is used.

inject_into(cells, location=None)

Inject the current from this source into the supplied group of cells.

cells may be a Population, PopulationView, Assembly or a list of ID objects.

get_parameters()

Return a dict of all current source parameters.

set_parameters(copy=True, **parameters)

Set current source parameters, given as a sequence of parameter=value arguments.