spynnaker.pyNN.models.neural_projections package

Subpackages

Module contents

class spynnaker.pyNN.models.neural_projections.DelayAfferentApplicationEdge(pre_vertex: PopulationApplicationVertex, delay_vertex: DelayExtensionVertex, label: str | None = None)

Bases: ApplicationEdge

Edge between a Population vertex and a delay vertex.

Parameters:
class spynnaker.pyNN.models.neural_projections.DelayedApplicationEdge(pre_vertex: DelayExtensionVertex, post_vertex: PopulationVertex, synapse_information: SynapseInformation | Iterable[SynapseInformation], undelayed_edge: ProjectionApplicationEdge, label: str | None = None)

Bases: ApplicationEdge

The Edge from a delay vertex to a Population vertex.

Parameters:
add_synapse_information(synapse_information: SynapseInformation) None[source]
Parameters:

synapse_information (SynapseInformation)

property post_vertex: PopulationVertex

The vertex at the end of the edge.

Return type:

AbstractVertex

property pre_vertex: DelayExtensionVertex

The vertex at the start of the edge.

Return type:

AbstractVertex

property synapse_information: List[SynapseInformation]
Return type:

list(SynapseInformation)

property undelayed_edge: ProjectionApplicationEdge

The edge for projections without extended delays.

Return type:

ProjectionApplicationEdge

class spynnaker.pyNN.models.neural_projections.ProjectionApplicationEdge(pre_vertex: PopulationApplicationVertex, post_vertex: PopulationVertex, synapse_information: SynapseInformation, label: str | None = None)

Bases: ApplicationEdge, AbstractProvidesLocalProvenanceData

An edge which terminates on an PopulationVertex.

Parameters:
add_synapse_information(synapse_information: SynapseInformation) None[source]
Parameters:

synapse_information (SynapseInformation)

property delay_edge: DelayedApplicationEdge | None

Settable.

Return type:

DelayedApplicationEdge or None

get_local_provenance_data() None[source]

Get provenance data items and store them in the provenance DB.

property is_neuromodulation: bool

Whether this edge is providing neuromodulation.

Return type:

bool

property n_delay_stages: int
Return type:

int

property post_vertex: PopulationVertex

The vertex at the end of the edge.

Return type:

AbstractVertex

property pre_vertex: PopulationApplicationVertex

The vertex at the start of the edge.

Return type:

AbstractVertex

property synapse_information: List[SynapseInformation]
Return type:

list(SynapseInformation)

class spynnaker.pyNN.models.neural_projections.SynapseInformation(connector: AbstractConnector, pre_population: Population | PopulationView, post_population: Population | PopulationView, prepop_is_view: bool, postpop_is_view: bool, synapse_dynamics: AbstractSynapseDynamics, synapse_type: int, receptor_type: str, synapse_type_from_dynamics: bool, weights: Weight_Types = None, delays: Delay_Types = None, download_on_pause: bool = False, partition_id: str | None = None)

Bases: object

Contains the synapse information including the connector, synapse type and synapse dynamics.

Parameters:
  • connector (AbstractConnector) – The connector connected to the synapse

  • pre_population (Population or PopulationView) – The population sending spikes to the synapse

  • post_population (Population or PopulationView) – The population hosting the synapse

  • prepop_is_view (bool) – Whether the pre_population is a view

  • postpop_is_view (bool) – Whether the post_population is a view

  • synapse_dynamics (AbstractSynapseDynamics) – The dynamic behaviour of the synapse

  • synapse_type (int) – The type of the synapse

  • receptor_type (str) – Description of the receptor (e.g. excitatory)

  • synapse_type_from_dynamics (bool) – Whether the synapse type came from synapse dynamics

  • weights (float or list(float) or ndarray(float) or None) – The synaptic weights

  • delays (float or list(float) or ndarray(float) or None) – The total synaptic delays

  • download_on_pause (bool) – Whether to download the synapse matrix when the simulation pauses

  • partition_id (str or None) – The partition id for the application edge when not standard; if None, the standard SPIKE_PARTITION_ID is used

add_pre_run_connection_holder(pre_run_connection_holder: ConnectionHolder) None[source]

Add a connection holder that will be filled in before run.

Parameters:

pre_run_connection_holder (ConnectionHolder) – The connection holder to be added

property connector: AbstractConnector

The connector connected to the synapse.

Return type:

AbstractConnector

property delays: float | str | RandomDistribution | ndarray[tuple[int, ...], dtype[float64]]

The total synaptic delays (if any).

Return type:

float or ndarray(float64) or str or RandomDistribution

property download_on_pause: bool

Whether to download the synapse matrix when the simulation pauses.

Return type:

bool

finish_connection_holders() None[source]

Finish all the connection holders, and clear the list so that they are not generated again later.

may_generate_on_machine() bool[source]

Do we describe a collection of synapses whose synaptic matrix may be generated on SpiNNaker instead of needing to be calculated in this process and uploaded? This depends on the connector, the definitions of the weights and delays, and the dynamics of the synapses.

Returns:

True if the synaptic matrix may be generated on machine (or may have already been so done)

Return type:

bool

property n_post_neurons: int

The number of neurons in the post-population.

Return type:

int

property n_pre_neurons: int

The number of neurons in the pre-population.

Return type:

int

property partition_id: str

The partition id for the application edge

Return type:

str

property post_population: Population | PopulationView

The population hosting the synapse.

Return type:

Population or PopulationView

property post_vertex: ApplicationVertex

The vertex hosting the synapse.

Return type:

ApplicationVertex

property postpop_is_view: bool

Whether the post_population() is a view.

Return type:

bool

property pre_population: Population | PopulationView

The population sending spikes to the synapse.

Return type:

Population or PopulationView

property pre_run_connection_holders: Sequence[ConnectionHolder]

The list of connection holders to be filled in before run.

Return type:

list(ConnectionHolder)

property pre_vertex: ApplicationVertex

The vertex sending spikes to the synapse.

Return type:

ApplicationVertex

property prepop_is_view: bool

Whether the pre_population() is a view.

Return type:

bool

property receptor_type: str

A string representing the receptor type.

Return type:

str

property synapse_dynamics: AbstractSynapseDynamics

The dynamic behaviour of the synapse.

Return type:

AbstractSynapseDynamics

property synapse_type: int

The type of the synapse. An index into the set of synapse types supported by a neuron.

Return type:

int

property synapse_type_from_dynamics: bool

Whether the synapse type comes from the synapse dynamics.

Return type:

bool

property weights: float | str | RandomDistribution | ndarray[tuple[int, ...], dtype[float64]] | None

The synaptic weights (if any).

Return type:

float or ndarray(float64) or str or RandomDistribution