spynnaker.pyNN.models.neuron.implementations package

Module contents

class spynnaker.pyNN.models.neuron.implementations.AbstractNeuronImpl

Bases: object

An abstraction of a whole neuron model including all parts.

abstract add_parameters(parameters)[source]

Add the initial values of the parameters to the parameter holder.

Parameters:

parameters (RangeDictionary) – A holder of the parameters

abstract add_state_variables(state_variables)[source]

Add the initial values of the state variables to the state variables holder.

Parameters:

state_variables (RangeDictionary) – A holder of the state variables

abstract property binary_name

The name of the binary executable of this implementation.

Return type:

str

abstract get_global_weight_scale()[source]

Get the weight scaling required by this model.

Return type:

int

abstract get_n_synapse_types()[source]

Get the number of synapse types supported by the model.

Return type:

int

abstract get_recordable_data_types()[source]

Get the data type of the variables that can be recorded.

Returns:

dictionary of name of variable to data type of variable

Return type:

dict(str,DataType)

abstract get_recordable_units(variable)[source]

Get the units of the given variable that can be recorded.

Parameters:

variable (str) – The name of the variable

abstract get_recordable_variable_index(variable)[source]

Get the index of the variable in the list of variables that can be recorded.

Parameters:

variable (str) – The name of the variable

Return type:

int

abstract get_recordable_variables()[source]

Get the names of the variables that can be recorded in this model.

Return type:

list(str)

abstract get_synapse_id_by_target(target)[source]

Get the ID of a synapse given the name.

Parameters:

target (str) – The name of the synapse

Return type:

int

abstract get_synapse_targets()[source]

Get the target names of the synapse type.

Return type:

list(str)

abstract get_units(variable)[source]

Get the units of the given variable.

Parameters:

variable (str) – The name of the variable

Return type:

str

abstract property is_conductance_based

Whether the model uses conductance.

Return type:

bool

abstract is_recordable(variable)[source]

Determine if the given variable can be recorded.

Parameters:

variable (str) – The name of the variable

Return type:

bool

abstract property model_name

The name of the model.

Return type:

str

abstract property structs

A list of structures used by the implementation.

Return type:

list(Struct)

class spynnaker.pyNN.models.neuron.implementations.AbstractStandardNeuronComponent(structs, units)

Bases: object

Represents a component of a standard neural model.

Parameters:
  • structs (list(Struct)) – The structures of the component

  • units (dict) – The units to use for each parameter

abstract add_parameters(parameters)[source]

Add the initial values of the parameters to the parameter holder.

Parameters:

parameters (RangeDictionary) – A holder of the parameters

abstract add_state_variables(state_variables)[source]

Add the initial values of the state variables to the state variables holder.

Parameters:

state_variables (RangeDictionary) – A holder of the state variables

get_units(variable)[source]

Get the units of the given variable.

Parameters:

variable (str) – The name of the variable

has_variable(variable)[source]

Determine if this component has a variable by the given name.

Parameters:

variable (str) – The name of the variable

Return type:

bool

property structs

The structures of the component. If there are multiple structures, the order is how they will appear in memory; where there are structures that repeat per neuron the repeats will appear adjacent e.g. for non-repeating structure g, followed by repeating structures s1 and s2 with 3 neurons the layout will be: [g, s1, s1, s1, s2, s2, s2].

Return type:

list(Struct)

class spynnaker.pyNN.models.neuron.implementations.NeuronImplStandard(model_name, binary, neuron_model, input_type, synapse_type, threshold_type, additional_input_type=None)

Bases: AbstractNeuronImpl

The standard componentised neuron implementation.

Parameters:
add_parameters(parameters)[source]

Add the initial values of the parameters to the parameter holder.

Parameters:

parameters (RangeDictionary) – A holder of the parameters

add_state_variables(state_variables)[source]

Add the initial values of the state variables to the state variables holder.

Parameters:

state_variables (RangeDictionary) – A holder of the state variables

property binary_name

The name of the binary executable of this implementation.

Return type:

str

get_global_weight_scale()[source]

Get the weight scaling required by this model.

Return type:

int

get_n_synapse_types()[source]

Get the number of synapse types supported by the model.

Return type:

int

get_recordable_data_types()[source]

Get the data type of the variables that can be recorded.

Returns:

dictionary of name of variable to data type of variable

Return type:

dict(str,DataType)

get_recordable_units(variable)[source]

Get the units of the given variable that can be recorded.

Parameters:

variable (str) – The name of the variable

get_recordable_variable_index(variable)[source]

Get the index of the variable in the list of variables that can be recorded.

Parameters:

variable (str) – The name of the variable

Return type:

int

get_recordable_variables()[source]

Get the names of the variables that can be recorded in this model.

Return type:

list(str)

get_synapse_id_by_target(target)[source]

Get the ID of a synapse given the name.

Parameters:

target (str) – The name of the synapse

Return type:

int

get_synapse_targets()[source]

Get the target names of the synapse type.

Return type:

list(str)

get_units(variable)[source]

Get the units of the given variable.

Parameters:

variable (str) – The name of the variable

Return type:

str

property is_conductance_based

Whether the model uses conductance.

Return type:

bool

is_recordable(variable)[source]

Determine if the given variable can be recorded.

Parameters:

variable (str) – The name of the variable

Return type:

bool

property model_name

The name of the model.

Return type:

str

property n_steps_per_timestep
property structs

A list of structures used by the implementation.

Return type:

list(Struct)

class spynnaker.pyNN.models.neuron.implementations.RangedDictVertexSlice(ranged_dict, vertex_slice)

Bases: object

A slice of a ranged dict to be used to update values.

Parameters: