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:
  • pre_vertex

  • delay_vertex

  • label

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:
  • pre_vertex – The delay extension at the start of the edge

  • post_vertex – The target of the synapses

  • synapse_information – The synapse information on this edge

  • undelayed_edge – The edge that is used for projections without extended delays

  • label – The edge label

add_synapse_information(synapse_information: SynapseInformation) None[source]

Add more synapse information on this edge

property post_vertex: PopulationVertex

The vertex at the end of the edge.

property pre_vertex: DelayExtensionVertex

The vertex at the start of the edge.

property synapse_information: List[SynapseInformation]

The synapse information on this edge

property undelayed_edge: ProjectionApplicationEdge

The edge for projections without extended delays.

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

Bases: ApplicationEdge

An edge which terminates on an PopulationVertex.

Parameters:
  • pre_vertex

  • post_vertex

  • synapse_information – The synapse information on this edge

  • label

add_synapse_information(synapse_information: SynapseInformation) None[source]

Adds synapse information on this edge

Parameters:

synapse_information

property delay_edge: DelayedApplicationEdge | None

Settable.

get_local_provenance_data() None[source]

Calls get_provenance_data on the connectors

This calls get_provenance_data on the connector used.

property is_neuromodulation: bool

Whether this edge is providing neuromodulation.

property n_delay_stages: int

The maximum number of delay stages required

property post_vertex: PopulationVertex

The vertex at the end of the edge.

property pre_vertex: PopulationApplicationVertex

The vertex at the start of the edge.

property synapse_information: List[SynapseInformation]

The synapse information on this edge

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: Weights = None, delays: Delays = 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 – The connector connected to the synapse

  • pre_population – The population sending spikes to the synapse

  • post_population – The population hosting the synapse

  • prepop_is_view – Whether the pre_population is a view

  • postpop_is_view – Whether the post_population is a view

  • synapse_dynamics – The dynamic behaviour of the synapse

  • synapse_type – The type of the synapse

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

  • synapse_type_from_dynamics – Whether the synapse type came from synapse dynamics

  • weights – The synaptic weights

  • delays – The total synaptic delays

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

  • partition_id – 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 – The connection holder to be added

property connector: AbstractConnector

The connector connected to the synapse.

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

The total synaptic delays (if any).

property download_on_pause: bool

Whether to download the synapse matrix when the simulation pauses.

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)

property n_post_neurons: int

The number of neurons in the post-population.

property n_pre_neurons: int

The number of neurons in the pre-population.

property partition_id: str

The partition id for the application edge

property post_population: Population | PopulationView

The population hosting the synapse.

property post_vertex: ApplicationVertex

The vertex hosting the synapse.

property postpop_is_view: bool

Whether the post_population() is a view.

property pre_population: Population | PopulationView

The population sending spikes to the synapse.

property pre_run_connection_holders: Sequence[ConnectionHolder]

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

property pre_vertex: ApplicationVertex

The vertex sending spikes to the synapse.

property prepop_is_view: bool

Whether the pre_population() is a view.

property receptor_type: str

A string representing the receptor type.

property synapse_dynamics: AbstractSynapseDynamics

The dynamic behaviour of the synapse.

property synapse_type: int

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

property synapse_type_from_dynamics: bool

Whether the synapse type comes from the synapse dynamics.

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

The synaptic weights (if any).