spynnaker.pyNN.models.spike_source package¶
Submodules¶
spynnaker.pyNN.models.spike_source.spike_source_array_vertex module¶
-
class
spynnaker.pyNN.models.spike_source.spike_source_array_vertex.
SpikeSourceArrayVertex
(n_neurons, spike_times, constraints, label, max_atoms_per_core, model, splitter)[source]¶ Bases:
spinn_front_end_common.utility_models.reverse_ip_tag_multi_cast_source.ReverseIpTagMultiCastSource
,spynnaker.pyNN.models.common.abstract_spike_recordable.AbstractSpikeRecordable
,spynnaker.pyNN.models.common.simple_population_settable.SimplePopulationSettable
,spinn_front_end_common.abstract_models.abstract_changable_after_run.AbstractChangableAfterRun
,spinn_front_end_common.abstract_models.impl.provides_key_to_atom_mapping_impl.ProvidesKeyToAtomMappingImpl
Model for play back of spikes
-
SPIKE_RECORDING_REGION_ID
= 0¶
-
clear_spike_recording
(buffer_manager, placements)[source]¶ Clear the recorded data from the object
Parameters: - buffer_manager (BufferManager) – the buffer manager object
- placements (Placements) – the placements object
Return type:
-
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_spikes
(placements, buffer_manager)[source]¶ Get the recorded spikes from the object
Parameters: - placements (Placements) – the placements object
- buffer_manager (BufferManager) – the buffer manager object
Returns: A numpy array of 2-element arrays of (neuron_id, time) ordered by time, one element per event
Return type:
-
get_spikes_sampling_interval
()[source]¶ Return the current sampling interval for spikes
Returns: Sampling interval in microseconds Return type: float
-
is_recording_spikes
()[source]¶ Determine if spikes are being recorded
Returns: True if spikes are being recorded, False otherwise Return type: bool
-
mark_no_changes
()[source]¶ Marks the point after which changes are reported, so that new changes can be detected before the next check.
-
requires_mapping
¶ True if changes that have been made require that mapping be performed. By default this returns False but can be overridden to indicate changes that require mapping.
Return type: bool
-
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 (int or None) – The interval at which spikes are recorded. Must be a whole multiple of the timestep. None will be taken as the timestep.
- indexes (list(int) or None) – The indexes of the neurons that will record spikes. If None the assumption is all neurons are recording
-
set_value_by_selector
(selector, key, value)[source]¶ Sets the value for a particular key but only for the selected subset.
Parameters:
-
spike_times
¶ The spike times of the spike source array
-
spynnaker.pyNN.models.spike_source.spike_source_poisson_machine_vertex module¶
-
class
spynnaker.pyNN.models.spike_source.spike_source_poisson_machine_vertex.
SpikeSourcePoissonMachineVertex
(resources_required, is_recording, constraints=None, label=None, app_vertex=None, vertex_slice=None, slice_index=None)[source]¶ Bases:
pacman.model.graphs.machine.machine_vertex.MachineVertex
,spinn_front_end_common.interface.buffer_management.buffer_models.abstract_receive_buffers_to_host.AbstractReceiveBuffersToHost
,spinn_front_end_common.interface.provenance.provides_provenance_data_from_machine_impl.ProvidesProvenanceDataFromMachineImpl
,spinn_front_end_common.abstract_models.abstract_supports_database_injection.AbstractSupportsDatabaseInjection
,spinn_front_end_common.interface.profiling.abstract_has_profile_data.AbstractHasProfileData
,spinn_front_end_common.abstract_models.abstract_has_associated_binary.AbstractHasAssociatedBinary
,spinn_front_end_common.abstract_models.abstract_rewrites_data_specification.AbstractRewritesDataSpecification
,spinn_front_end_common.abstract_models.abstract_generates_data_specification.AbstractGeneratesDataSpecification
,spynnaker.pyNN.models.abstract_models.abstract_read_parameters_before_set.AbstractReadParametersBeforeSet
,spynnaker.pyNN.models.abstract_models.sends_synaptic_inputs_over_sdram.SendsSynapticInputsOverSDRAM
-
class
EXTRA_PROVENANCE_DATA_ENTRIES
[source]¶ Bases:
enum.Enum
Entries for the provenance data generated by standard neuron models.
-
TDMA_MISSED_SLOTS
= 0¶ The number of pre-synaptic events
-
-
FAST_RATE_PER_TICK_CUTOFF
= 10¶
-
PARAMS_BASE_WORDS
= 14¶
-
class
POISSON_SPIKE_SOURCE_REGIONS
[source]¶ Bases:
enum.Enum
An enumeration.
-
POISSON_PARAMS_REGION
= 1¶
-
PROFILER_REGION
= 5¶
-
PROVENANCE_REGION
= 4¶
-
RATES_REGION
= 2¶
-
SDRAM_EDGE_PARAMS
= 7¶
-
SPIKE_HISTORY_REGION
= 3¶
-
SYSTEM_REGION
= 0¶
-
TDMA_REGION
= 6¶
-
-
PROFILE_TAG_LABELS
= {0: 'TIMER', 1: 'PROB_FUNC'}¶
-
SEED_OFFSET_BYTES
= 40¶
-
SEED_SIZE_BYTES
= 16¶
-
SLOW_RATE_PER_TICK_CUTOFF
= 0.01¶
-
generate_data_specification
(spec, placement, routing_info, data_n_time_steps, graph, first_machine_time_step)[source]¶ Generate a data specification.
Parameters: - spec (DataSpecificationGenerator) – The data specification to write to
- placement (Placement) – The placement the vertex is located at
- routing_info (RoutingInfo) –
- data_n_time_steps (int) –
- graph (MachineGraph) –
- first_machine_time_step (int) –
Return type:
-
get_binary_start_type
()[source]¶ Get the start type of the binary to be run.
Return type: ExecutableType
-
get_profile_data
(transceiver, placement)[source]¶ Get the profile data recorded during simulation
Parameters: - transceiver (Transceiver) –
- placement (Placement) –
Return type:
-
get_recorded_region_ids
()[source]¶ Get the recording region IDs that have been recorded using buffering
Returns: The region numbers that have active recording Return type: iterable(int)
-
get_recording_region_base_address
(txrx, placement)[source]¶ Get the recording region base address
Parameters: - txrx (Transceiver) – the SpiNNMan instance
- placement (Placement) – the placement object of the core to find the address of
Returns: the base address of the recording region
Return type:
-
max_spikes_per_second
()[source]¶ Get maximum expected number of spikes per second
Parameters: variable (str) – the variable to find units from Returns: the units as a string. Return type: str
-
parse_extra_provenance_items
(label, x, y, p, provenance_data)[source]¶ Convert the remaining provenance words (those not in the standard set) into provenance items.
Called by
get_provenance_data_from_machine()
Parameters: - label (str) – A descriptive label for the vertex (derived from label and placed position) to be used for provenance error reporting to the user.
- x (int) – x coordinate of the chip where this core
- y (int) – y coordinate of the core where this core
- p (int) – virtual id of the core
- provenance_data (list(int)) – The list of words of raw provenance data.
-
read_parameters_from_machine
(transceiver, placement, vertex_slice)[source]¶ Read the parameters from the machine before any are changed.
Parameters: - transceiver (Transceiver) – the SpinnMan interface
- placement (Placement) – the placement of a vertex
- vertex_slice (Slice) – the slice of atoms for this vertex
Return type:
-
regenerate_data_specification
(spec, placement, routing_info, graph, first_machine_time_step)[source]¶ Regenerate the data specification, only generating regions that have changed and need to be reloaded
Parameters: - spec (DataSpecificationGenerator) – Where to write the regenerated spec
- placement (Placement) – Where are we regenerating for?
- routing_info (RoutingInfo) –
- graph (MachineGraph) –
- first_machine_time_step (int) –
-
reload_required
(first_machine_time_step)[source]¶ Return true if any data region needs to be reloaded
Return type: bool
-
reserve_memory_regions
(spec, placement)[source]¶ Reserve memory regions for Poisson source parameters and output buffer.
Parameters: - spec (DataSpecificationGenerator) – the data specification writer
- placement (Placement) – the location this vertex resides on in the machine
Returns: None
-
resources_required
¶ The resources required by the vertex
Return type: ResourceContainer
-
sdram_requirement
(sdram_machine_edge)[source]¶ Asks a machine vertex for the sdram requirement it needs.
Parameters: sdram_machine_edge – The SDRAM edge in question Returns: the size in bytes this vertex needs for the SDRAM edge Return type: int (most likely a multiple of 4)
-
class
spynnaker.pyNN.models.spike_source.spike_source_poisson_vertex module¶
-
class
spynnaker.pyNN.models.spike_source.spike_source_poisson_vertex.
SpikeSourcePoissonVertex
(n_neurons, constraints, label, seed, max_atoms_per_core, model, rate=None, start=None, duration=None, rates=None, starts=None, durations=None, max_rate=None, splitter=None)[source]¶ Bases:
spinn_front_end_common.abstract_models.impl.tdma_aware_application_vertex.TDMAAwareApplicationVertex
,spynnaker.pyNN.models.common.abstract_spike_recordable.AbstractSpikeRecordable
,spinn_front_end_common.abstract_models.abstract_provides_outgoing_partition_constraints.AbstractProvidesOutgoingPartitionConstraints
,spinn_front_end_common.abstract_models.abstract_changable_after_run.AbstractChangableAfterRun
,spynnaker.pyNN.models.common.simple_population_settable.SimplePopulationSettable
,spinn_front_end_common.abstract_models.impl.provides_key_to_atom_mapping_impl.ProvidesKeyToAtomMappingImpl
,pacman.model.partitioner_interfaces.legacy_partitioner_api.LegacyPartitionerAPI
A Poisson Spike source object
Parameters: - n_neurons (int) –
- constraints (iterable(AbstractConstraint)) –
- label (str) –
- seed (float) –
- max_atoms_per_core (int) –
- model (SpikeSourcePoisson) –
- rate (iterable(float)) –
- start (iterable(int)) –
- duration (iterable(int)) –
- splitter (AbstractSplitterCommon) –
-
SPIKE_RECORDING_REGION_ID
= 0¶
-
add_outgoing_projection
(projection)[source]¶ Add an outgoing projection from this vertex
Parameters: projection (PyNNProjectionCommon) – The projection to add
-
clear_spike_recording
(buffer_manager, placements)[source]¶ Clear the recorded data from the object
Parameters: - buffer_manager (BufferManager) – the buffer manager object
- placements (Placements) – the placements object
Return type:
-
create_machine_vertex
(vertex_slice, resources_required, label=None, constraints=None)[source]¶ Create a machine vertex from this application vertex.
Parameters: - vertex_slice (Slice) – The slice of atoms that the machine vertex will cover.
- resources_required (ResourceContainer) – The resources used by the machine vertex.
- label (str or None) – human readable label for the machine vertex
- constraints (iterable(AbstractConstraint)) – Constraints to be passed on to the machine vertex.
Returns: The created machine vertex
Return type:
-
describe
()[source]¶ Return 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.
Return type: dict(str, ..)
-
duration
¶
-
durations
¶
-
get_n_cores
()[source]¶ Get the number of cores this application vertex is using in the TDMA.
Returns: the number of cores to use in the TDMA Return type: int
-
get_outgoing_partition_constraints
(partition)[source]¶ Get constraints to be added to the given edge partition 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_resources_used_by_atoms
(vertex_slice)[source]¶ Get the separate resource requirements for a range of atoms.
Parameters: - vertex_slice (Slice) – the low value of atoms to calculate resources from
- vertex_slice –
Returns: a resource container that contains a
CPUCyclesPerTickResource
,DTCMResource
andSDRAMResource
Return type:
-
get_spikes
(placements, buffer_manager)[source]¶ Get the recorded spikes from the object
Parameters: - placements (Placements) – the placements object
- buffer_manager (BufferManager) – the buffer manager object
Returns: A numpy array of 2-element arrays of (neuron_id, time) ordered by time, one element per event
Return type:
-
get_spikes_sampling_interval
()[source]¶ Return the current sampling interval for spikes
Returns: Sampling interval in microseconds Return type: float
-
is_recording_spikes
()[source]¶ Determine if spikes are being recorded
Returns: True if spikes are being recorded, False otherwise Return type: bool
-
mark_no_changes
()[source]¶ Marks the point after which changes are reported, so that new changes can be detected before the next check.
-
max_rate
¶
-
n_profile_samples
¶
-
outgoing_projections
¶ The projections outgoing from this vertex
Return type: list(PyNNProjectionCommon)
-
rate
¶
-
rate_change
¶
-
rates
¶
-
requires_mapping
¶ True if changes that have been made require that mapping be performed. By default this returns False but can be overridden to indicate changes that require mapping.
Return type: bool
-
seed
¶
-
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 (int or None) – The interval at which spikes are recorded. Must be a whole multiple of the timestep. None will be taken as the timestep.
- indexes (list(int) or None) – The indexes of the neurons that will record spikes. If None the assumption is all neurons are recording
-
start
¶
-
starts
¶
-
time_to_spike
¶
Module contents¶
-
class
spynnaker.pyNN.models.spike_source.
SpikeSourceArray
(spike_times=None)[source]¶ Bases:
spynnaker.pyNN.models.abstract_pynn_model.AbstractPyNNModel
-
create_vertex
(n_neurons, label, constraints, splitter)[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(AbstractConstraint) 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
= {'splitter': None}¶
-
-
class
spynnaker.pyNN.models.spike_source.
SpikeSourceArrayVertex
(n_neurons, spike_times, constraints, label, max_atoms_per_core, model, splitter)[source]¶ Bases:
spinn_front_end_common.utility_models.reverse_ip_tag_multi_cast_source.ReverseIpTagMultiCastSource
,spynnaker.pyNN.models.common.abstract_spike_recordable.AbstractSpikeRecordable
,spynnaker.pyNN.models.common.simple_population_settable.SimplePopulationSettable
,spinn_front_end_common.abstract_models.abstract_changable_after_run.AbstractChangableAfterRun
,spinn_front_end_common.abstract_models.impl.provides_key_to_atom_mapping_impl.ProvidesKeyToAtomMappingImpl
Model for play back of spikes
-
SPIKE_RECORDING_REGION_ID
= 0¶
-
clear_spike_recording
(buffer_manager, placements)[source]¶ Clear the recorded data from the object
Parameters: - buffer_manager (BufferManager) – the buffer manager object
- placements (Placements) – the placements object
Return type:
-
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_spikes
(placements, buffer_manager)[source]¶ Get the recorded spikes from the object
Parameters: - placements (Placements) – the placements object
- buffer_manager (BufferManager) – the buffer manager object
Returns: A numpy array of 2-element arrays of (neuron_id, time) ordered by time, one element per event
Return type:
-
get_spikes_sampling_interval
()[source]¶ Return the current sampling interval for spikes
Returns: Sampling interval in microseconds Return type: float
-
is_recording_spikes
()[source]¶ Determine if spikes are being recorded
Returns: True if spikes are being recorded, False otherwise Return type: bool
-
mark_no_changes
()[source]¶ Marks the point after which changes are reported, so that new changes can be detected before the next check.
-
requires_mapping
¶ True if changes that have been made require that mapping be performed. By default this returns False but can be overridden to indicate changes that require mapping.
Return type: bool
-
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 (int or None) – The interval at which spikes are recorded. Must be a whole multiple of the timestep. None will be taken as the timestep.
- indexes (list(int) or None) – The indexes of the neurons that will record spikes. If None the assumption is all neurons are recording
-
set_value_by_selector
(selector, key, value)[source]¶ Sets the value for a particular key but only for the selected subset.
Parameters:
-
spike_times
¶ The spike times of the spike source array
-
-
class
spynnaker.pyNN.models.spike_source.
SpikeSourceFromFile
(spike_time_file, min_atom=None, max_atom=None, min_time=None, max_time=None, split_value='t')[source]¶ Bases:
spynnaker.pyNN.models.spike_source.spike_source_array.SpikeSourceArray
SpikeSourceArray that works from a file
-
spike_times
¶
-
-
class
spynnaker.pyNN.models.spike_source.
SpikeSourcePoisson
(rate=1.0, start=0, duration=None)[source]¶ Bases:
spynnaker.pyNN.models.abstract_pynn_model.AbstractPyNNModel
-
create_vertex
(n_neurons, label, constraints, seed, max_rate, splitter)[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(AbstractConstraint) 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
= {'max_rate': None, 'seed': None, 'splitter': None}¶
-
-
class
spynnaker.pyNN.models.spike_source.
SpikeSourcePoissonMachineVertex
(resources_required, is_recording, constraints=None, label=None, app_vertex=None, vertex_slice=None, slice_index=None)[source]¶ Bases:
pacman.model.graphs.machine.machine_vertex.MachineVertex
,spinn_front_end_common.interface.buffer_management.buffer_models.abstract_receive_buffers_to_host.AbstractReceiveBuffersToHost
,spinn_front_end_common.interface.provenance.provides_provenance_data_from_machine_impl.ProvidesProvenanceDataFromMachineImpl
,spinn_front_end_common.abstract_models.abstract_supports_database_injection.AbstractSupportsDatabaseInjection
,spinn_front_end_common.interface.profiling.abstract_has_profile_data.AbstractHasProfileData
,spinn_front_end_common.abstract_models.abstract_has_associated_binary.AbstractHasAssociatedBinary
,spinn_front_end_common.abstract_models.abstract_rewrites_data_specification.AbstractRewritesDataSpecification
,spinn_front_end_common.abstract_models.abstract_generates_data_specification.AbstractGeneratesDataSpecification
,spynnaker.pyNN.models.abstract_models.abstract_read_parameters_before_set.AbstractReadParametersBeforeSet
,spynnaker.pyNN.models.abstract_models.sends_synaptic_inputs_over_sdram.SendsSynapticInputsOverSDRAM
-
class
EXTRA_PROVENANCE_DATA_ENTRIES
[source]¶ Bases:
enum.Enum
Entries for the provenance data generated by standard neuron models.
-
TDMA_MISSED_SLOTS
= 0¶ The number of pre-synaptic events
-
-
FAST_RATE_PER_TICK_CUTOFF
= 10¶
-
PARAMS_BASE_WORDS
= 14¶
-
class
POISSON_SPIKE_SOURCE_REGIONS
[source]¶ Bases:
enum.Enum
An enumeration.
-
POISSON_PARAMS_REGION
= 1¶
-
PROFILER_REGION
= 5¶
-
PROVENANCE_REGION
= 4¶
-
RATES_REGION
= 2¶
-
SDRAM_EDGE_PARAMS
= 7¶
-
SPIKE_HISTORY_REGION
= 3¶
-
SYSTEM_REGION
= 0¶
-
TDMA_REGION
= 6¶
-
-
PROFILE_TAG_LABELS
= {0: 'TIMER', 1: 'PROB_FUNC'}¶
-
SEED_OFFSET_BYTES
= 40¶
-
SEED_SIZE_BYTES
= 16¶
-
SLOW_RATE_PER_TICK_CUTOFF
= 0.01¶
-
generate_data_specification
(spec, placement, routing_info, data_n_time_steps, graph, first_machine_time_step)[source]¶ Generate a data specification.
Parameters: - spec (DataSpecificationGenerator) – The data specification to write to
- placement (Placement) – The placement the vertex is located at
- routing_info (RoutingInfo) –
- data_n_time_steps (int) –
- graph (MachineGraph) –
- first_machine_time_step (int) –
Return type:
-
get_binary_start_type
()[source]¶ Get the start type of the binary to be run.
Return type: ExecutableType
-
get_profile_data
(transceiver, placement)[source]¶ Get the profile data recorded during simulation
Parameters: - transceiver (Transceiver) –
- placement (Placement) –
Return type:
-
get_recorded_region_ids
()[source]¶ Get the recording region IDs that have been recorded using buffering
Returns: The region numbers that have active recording Return type: iterable(int)
-
get_recording_region_base_address
(txrx, placement)[source]¶ Get the recording region base address
Parameters: - txrx (Transceiver) – the SpiNNMan instance
- placement (Placement) – the placement object of the core to find the address of
Returns: the base address of the recording region
Return type:
-
max_spikes_per_second
()[source]¶ Get maximum expected number of spikes per second
Parameters: variable (str) – the variable to find units from Returns: the units as a string. Return type: str
-
parse_extra_provenance_items
(label, x, y, p, provenance_data)[source]¶ Convert the remaining provenance words (those not in the standard set) into provenance items.
Called by
get_provenance_data_from_machine()
Parameters: - label (str) – A descriptive label for the vertex (derived from label and placed position) to be used for provenance error reporting to the user.
- x (int) – x coordinate of the chip where this core
- y (int) – y coordinate of the core where this core
- p (int) – virtual id of the core
- provenance_data (list(int)) – The list of words of raw provenance data.
-
read_parameters_from_machine
(transceiver, placement, vertex_slice)[source]¶ Read the parameters from the machine before any are changed.
Parameters: - transceiver (Transceiver) – the SpinnMan interface
- placement (Placement) – the placement of a vertex
- vertex_slice (Slice) – the slice of atoms for this vertex
Return type:
-
regenerate_data_specification
(spec, placement, routing_info, graph, first_machine_time_step)[source]¶ Regenerate the data specification, only generating regions that have changed and need to be reloaded
Parameters: - spec (DataSpecificationGenerator) – Where to write the regenerated spec
- placement (Placement) – Where are we regenerating for?
- routing_info (RoutingInfo) –
- graph (MachineGraph) –
- first_machine_time_step (int) –
-
reload_required
(first_machine_time_step)[source]¶ Return true if any data region needs to be reloaded
Return type: bool
-
reserve_memory_regions
(spec, placement)[source]¶ Reserve memory regions for Poisson source parameters and output buffer.
Parameters: - spec (DataSpecificationGenerator) – the data specification writer
- placement (Placement) – the location this vertex resides on in the machine
Returns: None
-
resources_required
¶ The resources required by the vertex
Return type: ResourceContainer
-
sdram_requirement
(sdram_machine_edge)[source]¶ Asks a machine vertex for the sdram requirement it needs.
Parameters: sdram_machine_edge – The SDRAM edge in question Returns: the size in bytes this vertex needs for the SDRAM edge Return type: int (most likely a multiple of 4)
-
class
-
class
spynnaker.pyNN.models.spike_source.
SpikeSourcePoissonVariable
(rates, starts, durations=None)[source]¶ Bases:
spynnaker.pyNN.models.abstract_pynn_model.AbstractPyNNModel
-
create_vertex
(n_neurons, label, constraints, seed, splitter)[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(AbstractConstraint) 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
= {'seed': None, 'splitter': None}¶
-
-
class
spynnaker.pyNN.models.spike_source.
SpikeSourcePoissonVertex
(n_neurons, constraints, label, seed, max_atoms_per_core, model, rate=None, start=None, duration=None, rates=None, starts=None, durations=None, max_rate=None, splitter=None)[source]¶ Bases:
spinn_front_end_common.abstract_models.impl.tdma_aware_application_vertex.TDMAAwareApplicationVertex
,spynnaker.pyNN.models.common.abstract_spike_recordable.AbstractSpikeRecordable
,spinn_front_end_common.abstract_models.abstract_provides_outgoing_partition_constraints.AbstractProvidesOutgoingPartitionConstraints
,spinn_front_end_common.abstract_models.abstract_changable_after_run.AbstractChangableAfterRun
,spynnaker.pyNN.models.common.simple_population_settable.SimplePopulationSettable
,spinn_front_end_common.abstract_models.impl.provides_key_to_atom_mapping_impl.ProvidesKeyToAtomMappingImpl
,pacman.model.partitioner_interfaces.legacy_partitioner_api.LegacyPartitionerAPI
A Poisson Spike source object
Parameters: - n_neurons (int) –
- constraints (iterable(AbstractConstraint)) –
- label (str) –
- seed (float) –
- max_atoms_per_core (int) –
- model (SpikeSourcePoisson) –
- rate (iterable(float)) –
- start (iterable(int)) –
- duration (iterable(int)) –
- splitter (AbstractSplitterCommon) –
-
SPIKE_RECORDING_REGION_ID
= 0¶
-
add_outgoing_projection
(projection)[source]¶ Add an outgoing projection from this vertex
Parameters: projection (PyNNProjectionCommon) – The projection to add
-
clear_spike_recording
(buffer_manager, placements)[source]¶ Clear the recorded data from the object
Parameters: - buffer_manager (BufferManager) – the buffer manager object
- placements (Placements) – the placements object
Return type:
-
create_machine_vertex
(vertex_slice, resources_required, label=None, constraints=None)[source]¶ Create a machine vertex from this application vertex.
Parameters: - vertex_slice (Slice) – The slice of atoms that the machine vertex will cover.
- resources_required (ResourceContainer) – The resources used by the machine vertex.
- label (str or None) – human readable label for the machine vertex
- constraints (iterable(AbstractConstraint)) – Constraints to be passed on to the machine vertex.
Returns: The created machine vertex
Return type:
-
describe
()[source]¶ Return 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.
Return type: dict(str, ..)
-
duration
¶
-
durations
¶
-
get_n_cores
()[source]¶ Get the number of cores this application vertex is using in the TDMA.
Returns: the number of cores to use in the TDMA Return type: int
-
get_outgoing_partition_constraints
(partition)[source]¶ Get constraints to be added to the given edge partition 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_resources_used_by_atoms
(vertex_slice)[source]¶ Get the separate resource requirements for a range of atoms.
Parameters: - vertex_slice (Slice) – the low value of atoms to calculate resources from
- vertex_slice –
Returns: a resource container that contains a
CPUCyclesPerTickResource
,DTCMResource
andSDRAMResource
Return type:
-
get_spikes
(placements, buffer_manager)[source]¶ Get the recorded spikes from the object
Parameters: - placements (Placements) – the placements object
- buffer_manager (BufferManager) – the buffer manager object
Returns: A numpy array of 2-element arrays of (neuron_id, time) ordered by time, one element per event
Return type:
-
get_spikes_sampling_interval
()[source]¶ Return the current sampling interval for spikes
Returns: Sampling interval in microseconds Return type: float
-
is_recording_spikes
()[source]¶ Determine if spikes are being recorded
Returns: True if spikes are being recorded, False otherwise Return type: bool
-
mark_no_changes
()[source]¶ Marks the point after which changes are reported, so that new changes can be detected before the next check.
-
max_rate
¶
-
n_profile_samples
¶
-
outgoing_projections
¶ The projections outgoing from this vertex
Return type: list(PyNNProjectionCommon)
-
rate
¶
-
rate_change
¶
-
rates
¶
-
requires_mapping
¶ True if changes that have been made require that mapping be performed. By default this returns False but can be overridden to indicate changes that require mapping.
Return type: bool
-
seed
¶
-
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 (int or None) – The interval at which spikes are recorded. Must be a whole multiple of the timestep. None will be taken as the timestep.
- indexes (list(int) or None) – The indexes of the neurons that will record spikes. If None the assumption is all neurons are recording
-
start
¶
-
starts
¶
-
time_to_spike
¶