spynnaker.pyNN.models.utility_models.spike_injector package¶
Submodules¶
spynnaker.pyNN.models.utility_models.spike_injector.spike_injector_vertex module¶
- class spynnaker.pyNN.models.utility_models.spike_injector.spike_injector_vertex.SpikeInjectorVertex(n_neurons: int, label: str, port: int | None, virtual_key: int | None, reserve_reverse_ip_tag: bool, splitter: AbstractSplitterCommon | None, max_atoms_per_core: int | Tuple[int, ...] | None = 9223372036854775807)[source]¶
Bases:
ReverseIpTagMultiCastSource
,PopulationApplicationVertex
,SupportsStructure
An Injector of Spikes for PyNN populations. This only allows the user to specify the virtual_key of the population to identify the population.
- Parameters:
n_keys (int) – The number of keys to be sent via this multicast source
label (str) – The label of this vertex
max_atoms_per_core (int)
board_address (str or None) – The IP address of the board on which to place this vertex if receiving data, either buffered or live (by default, any board is chosen)
receive_port (int or None) – The port on the board that will listen for incoming event packets (default is to disable this feature; set a value to enable it)
receive_sdp_port (int) – The SDP port to listen on for incoming event packets (defaults to 1)
receive_tag (IPTag) – The IP tag to use for receiving live events (uses any by default)
receive_rate (float) – The estimated rate of packets that will be sent by this source
virtual_key (int) – The base multicast key to send received events with (assigned automatically by default)
prefix (int) – The prefix to “or” with generated multicast keys (default is no prefix)
prefix_type (EIEIOPrefix) – Whether the prefix should apply to the upper or lower half of the multicast keys (default is upper half)
check_keys (bool) – True if the keys of received events should be verified before sending (default False)
send_buffer_times (ndarray(ndarray(numpy.int32)) or list(ndarray(int32)) or None) – An array of arrays of times at which keys should be sent (one array for each key, default disabled)
reserve_reverse_ip_tag (bool) – Extra flag for input without a reserved port
splitter (AbstractSplitterCommon or None) – the splitter object needed for this vertex
- SPIKE_RECORDING_REGION_ID = 0¶
- property atoms_shape: Tuple[int, ...]¶
The “shape” of the atoms in the vertex i.e. how the atoms are split between the dimensions of the vertex. By default everything is 1-dimensional, so the value will be a 1-tuple but can be overridden by a vertex that supports multiple dimensions.
- default_parameters = {'label': 'spikeInjector', 'port': None, 'virtual_key': None}¶
- describe()[source]¶
Returns a human-readable description of the cell or synapse type.
The output may be customised by specifying a different template together with an associated template engine (see
pyNN.descriptions
).If template is None, then a dictionary containing the template context will be returned.
- get_buffer_data_type(name: str) BufferDataType [source]¶
Get the type of data recorded by the buffer manager.
The buffer data type controls how data returned by the cores is handled in NeoBufferDatabase.
- get_data_type(name: str) None [source]¶
Get the type data returned by a recording of the variable.
This is the type of data the C code is returning. For instance data such as spikes this will be None.
- get_neurons_recording(name: str, vertex_slice: Slice) ndarray[Any, dtype[integer]] [source]¶
Gets the neurons being recorded on the core with this slice.
Typically vertex_slice.get_raster_ids(atoms_shape) but may be a sublist if doing selective recording.
- get_recordable_variables() List[str] [source]¶
Get a list of the names and types of things that can be recorded.
This methods list the variable recorded via the Population.
- get_recording_variables() List[str] [source]¶
Get a list of variables that are currently being recorded.
- get_sampling_interval_ms(name: str) float [source]¶
Get the sampling interval of the recording for the given variable.
The values is in ms and unless selective recording is used will be SpynnakerDataView.get_simulation_time_step_us()
- set_not_recording(name: str, indices: Collection[int] | None = None)[source]¶
Set a variable not recording.
- set_recording(name: str, sampling_interval: float | None = None, indices: Collection[int] | None = None)[source]¶
Set a variable recording.
- Parameters:
- Raises:
KeyError – if the variable cannot be recorded
- set_structure(structure: BaseStructure)[source]¶
Set the structure of the object.
- Parameters:
structure (BaseStructure) – The structure to set
Module contents¶
- class spynnaker.pyNN.models.utility_models.spike_injector.SpikeInjector¶
Bases:
AbstractPyNNModel
Model that creates a Spike Injector Vertex
- create_vertex(n_neurons: int, label: str, *, port: int | None = None, virtual_key: int | None = None, reserve_reverse_ip_tag: bool = False, splitter: AbstractSplitterCommon | None = None) SpikeInjectorVertex [source]¶
Create a vertex for a population of the model.
- Parameters:
- Returns:
An application vertex for the population
- Return type:
- default_population_parameters: Dict[str, Any] = {'port': None, 'reserve_reverse_ip_tag': False, 'splitter': None, 'virtual_key': None}¶
The default values for the parameters at the population level. These are parameters that can be passed in to the Population constructor in addition to the standard PyNN options.