spynnaker.pyNN.models.abstract_models package

Submodules

spynnaker.pyNN.models.abstract_models.abstract_accepts_incoming_synapses module

class spynnaker.pyNN.models.abstract_models.abstract_accepts_incoming_synapses.AbstractAcceptsIncomingSynapses[source]

Bases: object

Indicates an object that can be a post-vertex in a PyNN projection.

add_pre_run_connection_holder(connection_holder, projection_edge, synapse_information)[source]

Add a connection holder to the vertex to be filled in when the connections are actually generated.

clear_connection_cache()[source]

Clear the connection data stored in the vertex so far.

get_connections_from_machine(transceiver, placement, edge, graph_mapper, routing_infos, synapse_information, machine_time_step, using_extra_monitor_cores, placements=None, monitor_api=None, monitor_placement=None, monitor_cores=None, handle_time_out_configuration=True, fixed_routes=None)[source]

Get the connections from the machine post-run.

get_maximum_delay_supported_in_ms(machine_time_step)[source]

Get the maximum delay supported by this vertex.

get_synapse_id_by_target

Get the ID of a synapse given the name.

Parameters:target (str) – The name of the synapse
Return type:int
set_synapse_dynamics(synapse_dynamics)[source]

Set the synapse dynamics of this vertex.

spynnaker.pyNN.models.abstract_models.abstract_contains_units module

class spynnaker.pyNN.models.abstract_models.abstract_contains_units.AbstractContainsUnits[source]

Bases: object

get_units(variable)[source]

Get units for a given variable

Parameters:variable – the variable to find units from
Returns:the units as a string.

spynnaker.pyNN.models.abstract_models.abstract_filterable_edge module

class spynnaker.pyNN.models.abstract_models.abstract_filterable_edge.AbstractFilterableEdge[source]

Bases: object

An edge that can be filtered

filter_edge(graph_mapper)[source]

Determine if this edge should be filtered out

Parameters:graph_mapper – the mapper between graphs
Returns:True if the edge should be filtered
Return type:bool

spynnaker.pyNN.models.abstract_models.abstract_population_initializable module

class spynnaker.pyNN.models.abstract_models.abstract_population_initializable.AbstractPopulationInitializable[source]

Bases: object

Indicates that this object has properties that can be initialised by a PyNN Population

get_initial_value(variable, selector=None)[source]

Gets the value for any variable whose in initialize_parameters.keys

Should return the current value not the default one.

Must support the variable as listed in initialize_parameters.keys, ideally also with _init removed or added.

Parameters:
  • variable (str) – variable name with our without _init
  • selector – a description of the subrange to accept. Or None for all. See: _selector_to_ids in SpiNNUtils.spinn_utilities.ranged.abstract_sized.py
Returns:

A list or an Object which act like a list

get_initial_values(selector=None)[source]

A dict containing the initial values of the state variables.

Parameters:selector – a description of the subrange to accept. Or None for all. See: _selector_to_ids in SpiNNUtils.spinn_utilities.ranged.abstract_sized.py
initial_values

A dict containing the initial values of the state variables.

initialize(variable, value)[source]

Set the initial value of one of the state variables of the neurons in this population.

initialize_parameters

List the parameters that are initializable.

If “foo” is initializable there should be a setter initialize_foo and a getter property foo_init

Returns:list of property names
set_initial_value(variable, value, selector=None)[source]

Sets the value for any variable whose in initialize_parameters.keys

Must support the variable as listed in initialize_parameters.keys, ideally also with _init removed or added

Parameters:
  • variable (str) – variable name with our without _init
  • value – New value for the variable
  • selector – a description of the subrange to accept. Or None for all. See: _selector_to_ids in SpiNNUtils.spinn_utilities.ranged.abstract_sized.py
Returns:

A list or an Object which act like a list

spynnaker.pyNN.models.abstract_models.abstract_population_settable module

class spynnaker.pyNN.models.abstract_models.abstract_population_settable.AbstractPopulationSettable[source]

Bases: spynnaker.pyNN.models.abstract_models.abstract_settable.AbstractSettable

Indicates that some properties of this object can be accessed from the PyNN population set and get methods.

get_value_by_selector(selector, key)[source]

Gets the value for a particular key but only for the selected subset.

Parameters:
  • selector – See RangedList.get_value_by_selector as this is just a pass through method
  • key – the name of the parameter to change
  • value – the new value of the parameter to assign
n_atoms

” See ApplicationVertex.n_atoms

set_value_by_selector(selector, key, value)[source]

Sets the value for a particular key but only for the selected subset.

Parameters:
  • selector – See RangedList.set_value_by_selector as this is just a pass through method
  • key – the name of the parameter to change
  • value – the new value of the parameter to assign

spynnaker.pyNN.models.abstract_models.abstract_read_parameters_before_set module

class spynnaker.pyNN.models.abstract_models.abstract_read_parameters_before_set.AbstractReadParametersBeforeSet[source]

Bases: object

A vertex whose parameters must be read before any can be set

read_parameters_from_machine(transceiver, placement, vertex_slice)[source]

Read the parameters from the machine before any are changed

Parameters:
  • transceiver – the SpinnMan interface
  • placement – the placement of a vertex
  • vertex_slice – the slice of atoms for this vertex

spynnaker.pyNN.models.abstract_models.abstract_settable module

class spynnaker.pyNN.models.abstract_models.abstract_settable.AbstractSettable[source]

Bases: object

Indicates that some properties of this object can be accessed from the PyNN population set and get methods

get_value(key)[source]

Get a property

set_value(key, value)[source]

Set a property

Parameters:
  • key – the name of the parameter to change
  • value – the new value of the parameter to assign

spynnaker.pyNN.models.abstract_models.abstract_weight_updatable module

class spynnaker.pyNN.models.abstract_models.abstract_weight_updatable.AbstractWeightUpdatable[source]

Bases: object

An object the weight of which can be updated

update_weight(graph_mapper)[source]

Update the weight

Module contents

class spynnaker.pyNN.models.abstract_models.AbstractAcceptsIncomingSynapses[source]

Bases: object

Indicates an object that can be a post-vertex in a PyNN projection.

add_pre_run_connection_holder(connection_holder, projection_edge, synapse_information)[source]

Add a connection holder to the vertex to be filled in when the connections are actually generated.

clear_connection_cache()[source]

Clear the connection data stored in the vertex so far.

get_connections_from_machine(transceiver, placement, edge, graph_mapper, routing_infos, synapse_information, machine_time_step, using_extra_monitor_cores, placements=None, monitor_api=None, monitor_placement=None, monitor_cores=None, handle_time_out_configuration=True, fixed_routes=None)[source]

Get the connections from the machine post-run.

get_maximum_delay_supported_in_ms(machine_time_step)[source]

Get the maximum delay supported by this vertex.

get_synapse_id_by_target

Get the ID of a synapse given the name.

Parameters:target (str) – The name of the synapse
Return type:int
set_synapse_dynamics(synapse_dynamics)[source]

Set the synapse dynamics of this vertex.

class spynnaker.pyNN.models.abstract_models.AbstractContainsUnits[source]

Bases: object

get_units(variable)[source]

Get units for a given variable

Parameters:variable – the variable to find units from
Returns:the units as a string.
class spynnaker.pyNN.models.abstract_models.AbstractFilterableEdge[source]

Bases: object

An edge that can be filtered

filter_edge(graph_mapper)[source]

Determine if this edge should be filtered out

Parameters:graph_mapper – the mapper between graphs
Returns:True if the edge should be filtered
Return type:bool
class spynnaker.pyNN.models.abstract_models.AbstractPopulationInitializable[source]

Bases: object

Indicates that this object has properties that can be initialised by a PyNN Population

get_initial_value(variable, selector=None)[source]

Gets the value for any variable whose in initialize_parameters.keys

Should return the current value not the default one.

Must support the variable as listed in initialize_parameters.keys, ideally also with _init removed or added.

Parameters:
  • variable (str) – variable name with our without _init
  • selector – a description of the subrange to accept. Or None for all. See: _selector_to_ids in SpiNNUtils.spinn_utilities.ranged.abstract_sized.py
Returns:

A list or an Object which act like a list

get_initial_values(selector=None)[source]

A dict containing the initial values of the state variables.

Parameters:selector – a description of the subrange to accept. Or None for all. See: _selector_to_ids in SpiNNUtils.spinn_utilities.ranged.abstract_sized.py
initial_values

A dict containing the initial values of the state variables.

initialize(variable, value)[source]

Set the initial value of one of the state variables of the neurons in this population.

initialize_parameters

List the parameters that are initializable.

If “foo” is initializable there should be a setter initialize_foo and a getter property foo_init

Returns:list of property names
set_initial_value(variable, value, selector=None)[source]

Sets the value for any variable whose in initialize_parameters.keys

Must support the variable as listed in initialize_parameters.keys, ideally also with _init removed or added

Parameters:
  • variable (str) – variable name with our without _init
  • value – New value for the variable
  • selector – a description of the subrange to accept. Or None for all. See: _selector_to_ids in SpiNNUtils.spinn_utilities.ranged.abstract_sized.py
Returns:

A list or an Object which act like a list

class spynnaker.pyNN.models.abstract_models.AbstractPopulationSettable[source]

Bases: spynnaker.pyNN.models.abstract_models.abstract_settable.AbstractSettable

Indicates that some properties of this object can be accessed from the PyNN population set and get methods.

get_value_by_selector(selector, key)[source]

Gets the value for a particular key but only for the selected subset.

Parameters:
  • selector – See RangedList.get_value_by_selector as this is just a pass through method
  • key – the name of the parameter to change
  • value – the new value of the parameter to assign
n_atoms

” See ApplicationVertex.n_atoms

set_value_by_selector(selector, key, value)[source]

Sets the value for a particular key but only for the selected subset.

Parameters:
  • selector – See RangedList.set_value_by_selector as this is just a pass through method
  • key – the name of the parameter to change
  • value – the new value of the parameter to assign
class spynnaker.pyNN.models.abstract_models.AbstractReadParametersBeforeSet[source]

Bases: object

A vertex whose parameters must be read before any can be set

read_parameters_from_machine(transceiver, placement, vertex_slice)[source]

Read the parameters from the machine before any are changed

Parameters:
  • transceiver – the SpinnMan interface
  • placement – the placement of a vertex
  • vertex_slice – the slice of atoms for this vertex
class spynnaker.pyNN.models.abstract_models.AbstractSettable[source]

Bases: object

Indicates that some properties of this object can be accessed from the PyNN population set and get methods

get_value(key)[source]

Get a property

set_value(key, value)[source]

Set a property

Parameters:
  • key – the name of the parameter to change
  • value – the new value of the parameter to assign
class spynnaker.pyNN.models.abstract_models.AbstractWeightUpdatable[source]

Bases: object

An object the weight of which can be updated

update_weight(graph_mapper)[source]

Update the weight