spynnaker.pyNN.models.utility_models.spike_injector package¶
Submodules¶
spynnaker.pyNN.models.utility_models.spike_injector.spike_injector module¶
-
class
spynnaker.pyNN.models.utility_models.spike_injector.spike_injector.
SpikeInjector
[source]¶ Bases:
spynnaker.pyNN.models.abstract_pynn_model.AbstractPyNNModel
-
create_vertex
(n_neurons, label, constraints, port, virtual_key, reserve_reverse_ip_tag)[source]¶ Create a vertex for a population of the model
Parameters: - n_neurons (int) – The number of neurons in the population
- label (str) – The label to give to the vertex
- constraints (list or None) – A list of constraints to give to the vertex, or None
Returns: An application vertex for the population
Return type:
-
default_population_parameters
= {'port': None, 'reserve_reverse_ip_tag': False, 'virtual_key': None}¶
-
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, label, constraints, port, virtual_key, reserve_reverse_ip_tag)[source]¶ Bases:
spinn_front_end_common.utility_models.reverse_ip_tag_multi_cast_source.ReverseIpTagMultiCastSource
,spinn_front_end_common.abstract_models.abstract_provides_outgoing_partition_constraints.AbstractProvidesOutgoingPartitionConstraints
,spynnaker.pyNN.models.common.abstract_spike_recordable.AbstractSpikeRecordable
,spynnaker.pyNN.models.common.simple_population_settable.SimplePopulationSettable
An Injector of Spikes for PyNN populations. This only allows the user to specify the virtual_key of the population to identify the population
-
SPIKE_RECORDING_REGION_ID
= 0¶
-
clear_spike_recording
(buffer_manager, placements, graph_mapper)[source]¶ Clear the recorded data from the object
Parameters: - buffer_manager – the buffer manager object
- placements – the placements object
- graph_mapper – the graph mapper object
Return type: None
-
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_outgoing_partition_constraints
(partition)[source]¶ Get constraints to be added to the given edge that comes out of this vertex.
Parameters: partition (AbstractOutgoingEdgePartition) – An edge that comes out of this vertex Returns: A list of constraints Return type: list(AbstractConstraint)
-
get_spikes
(placements, graph_mapper, buffer_manager, machine_time_step)[source]¶ Get the recorded spikes from the object
Parameters: - placements – the placements object
- graph_mapper – the graph mapper object
- buffer_manager – the buffer manager object
- machine_time_step – the time step of the simulation
Returns: A numpy array of 2-element arrays of (neuron_id, time) ordered by time
-
get_spikes_sampling_interval
()[source]¶ Return the current sampling interval for spikes
Returns: Sampling interval in micro seconds
-
is_recording_spikes
()[source]¶ Determine if spikes are being recorded
Returns: True if spikes are being recorded, False otherwise Return type: bool
-
port
¶
-
set_recording_spikes
(new_state=True, sampling_interval=None, indexes=None)[source]¶ Set spikes to being recorded. If new_state is false all other parameters are ignored.
Parameters: - new_state (bool) – Set if the spikes are recording or not
- sampling_interval – The interval at which spikes are recorded. Must be a whole multiple of the timestep None will be taken as the timestep
- indexes – The indexes of the neurons that will record spikes. If None the assumption is all neurons are recording
-
virtual_key
¶
-
Module contents¶
-
class
spynnaker.pyNN.models.utility_models.spike_injector.
SpikeInjector
[source]¶ Bases:
spynnaker.pyNN.models.abstract_pynn_model.AbstractPyNNModel
-
create_vertex
(n_neurons, label, constraints, port, virtual_key, reserve_reverse_ip_tag)[source]¶ Create a vertex for a population of the model
Parameters: - n_neurons (int) – The number of neurons in the population
- label (str) – The label to give to the vertex
- constraints (list or None) – A list of constraints to give to the vertex, or None
Returns: An application vertex for the population
Return type:
-
default_population_parameters
= {'port': None, 'reserve_reverse_ip_tag': False, 'virtual_key': None}¶
-