spynnaker.pyNN.models.current_sources package

Module contents

class spynnaker.pyNN.models.current_sources.ACSource(start=0.0, stop=0.0, amplitude=0.0, offset=0.0, frequency=0.0, phase=0.0)

Bases: AbstractCurrentSource

AC current source (i.e. sine wave) turned on at “start” and off at “stop”, given (y-)offset, amplitude, frequency and phase.

Parameters:
property current_source_id

The ID of the current source.

Return type:

int

property get_parameter_types

The parameter types for the current source.

Return type:

dict(str, Any)

property get_parameters

The parameters of the current source.

Return type:

dict(str, Any)

get_sdram_usage_in_bytes()[source]

The SDRAM usage in bytes of the current source.

Return type:

int

set_parameters(**parameters)[source]

Set the current source parameters.

Parameters:

parameters – the parameters to set

class spynnaker.pyNN.models.current_sources.AbstractCurrentSource

Bases: object

A simplified version of the PyNN class, since in most cases we work out the actual offset value on the SpiNNaker machine itself based on the parameters during the run.

property app_vertex

The application vertex associated with the current source.

Return type:

AbstractPopulationVertex

abstract property current_source_id

The ID of the current source.

Return type:

int

abstract property get_parameter_types

The parameter types for the current source.

Return type:

dict(str, Any)

abstract property get_parameters

The parameters of the current source.

Return type:

dict(str, Any)

abstract get_sdram_usage_in_bytes()[source]

The SDRAM usage in bytes of the current source.

Return type:

int

inject_into(cells)[source]

Inject this source into the specified population cells.

Parameters:

cells (PopulationBase) – The cells to inject the source into

property population

The population associated with the current source.

Return type:

Population

set_app_vertex(vertex)[source]

Set the application vertex associated with the current source.

Parameters:

vertex (AbstractPopulationVertex) – The population vertex

abstract set_parameters(**parameters)[source]

Set the current source parameters.

Parameters:

parameters – the parameters to set

set_population(population)[source]

Set the population associated with the current source.

Parameters:

population (Population) –

class spynnaker.pyNN.models.current_sources.CurrentSourceIDs(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

AC_SOURCE = 2
DC_SOURCE = 1
NOISY_CURRENT_SOURCE = 4
NO_SOURCE = 0
N_SOURCES = 4
STEP_CURRENT_SOURCE = 3
class spynnaker.pyNN.models.current_sources.DCSource(amplitude=0.0, start=0.0, stop=0.0)

Bases: AbstractCurrentSource

Current source with amplitude turned on at “start” and off at “stop”.

Parameters:
property current_source_id

The ID of the current source.

Return type:

int

property get_parameter_types

The parameter types for the current source.

Return type:

dict(str, Any)

property get_parameters

The parameters of the current source.

Return type:

dict(str, Any)

get_sdram_usage_in_bytes()[source]

The SDRAM usage in bytes of the current source.

Return type:

int

set_parameters(**parameters)[source]

Set the current source parameters.

Parameters:

parameters – the parameters to set

class spynnaker.pyNN.models.current_sources.NoisyCurrentSource(mean=0.0, stdev=0.0, start=0.0, stop=0.0, dt=1.0, rng=None)

Bases: AbstractCurrentSource

A noisy current source beginning at “start” and ending at “stop”, with noise simulated based on the given mean and standard deviation, and updating every dt (dt should default to the machine time step).

Parameters:
property current_source_id

The ID of the current source.

Return type:

int

property get_parameter_types

The parameter types for the current source.

Return type:

dict(str, Any)

property get_parameters

The parameters of the current source.

Return type:

dict(str, Any)

get_sdram_usage_in_bytes()[source]

The SDRAM usage in bytes of the current source.

Return type:

int

set_parameters(**parameters)[source]

Set the current source parameters.

Parameters:

parameters – the parameters to set

class spynnaker.pyNN.models.current_sources.StepCurrentSource(times=None, amplitudes=None)

Bases: AbstractCurrentSource

Current source where the amplitude changes based on a time array.

Parameters:
property current_source_id

The ID of the current source.

Return type:

int

property get_parameter_types

The parameter types for the current source.

Return type:

dict(str, Any)

property get_parameters

The parameters of the current source.

Return type:

dict(str, Any)

get_sdram_usage_in_bytes()[source]

The SDRAM usage in bytes of the current source.

Return type:

int

set_parameters(**parameters)[source]

Set the current source parameters.

Parameters:

parameters – the parameters to set