spynnaker8.utilities package¶
Subpackages¶
- spynnaker8.utilities.random_stats package
- Submodules
- spynnaker8.utilities.random_stats.random_stats_binomial_impl module
- spynnaker8.utilities.random_stats.random_stats_exponential_impl module
- spynnaker8.utilities.random_stats.random_stats_gamma_impl module
- spynnaker8.utilities.random_stats.random_stats_log_normal_impl module
- spynnaker8.utilities.random_stats.random_stats_normal_clipped_impl module
- spynnaker8.utilities.random_stats.random_stats_normal_impl module
- spynnaker8.utilities.random_stats.random_stats_poisson_impl module
- spynnaker8.utilities.random_stats.random_stats_randint_impl module
- spynnaker8.utilities.random_stats.random_stats_scipy_impl module
- spynnaker8.utilities.random_stats.random_stats_uniform_impl module
- spynnaker8.utilities.random_stats.random_stats_vonmises_impl module
- Module contents
Submodules¶
spynnaker8.utilities.exceptions module¶
-
exception
spynnaker8.utilities.exceptions.
DelayExtensionException
[source]¶ Bases:
spinn_front_end_common.utilities.exceptions.ConfigurationException
Raised when a delay extension vertex fails
-
exception
spynnaker8.utilities.exceptions.
FilterableException
[source]¶ Bases:
spynnaker8.utilities.exceptions.Spynnaker8Exception
Raised when it is not possible to determine if an edge should be filtered
-
exception
spynnaker8.utilities.exceptions.
InvalidParameterType
[source]¶ Bases:
spynnaker8.utilities.exceptions.Spynnaker8Exception
Raised when a parameter is not recognised
-
exception
spynnaker8.utilities.exceptions.
MemReadException
[source]¶ Bases:
spynnaker8.utilities.exceptions.Spynnaker8Exception
Raised when the pynn front end fails to read a certain memory region
-
exception
spynnaker8.utilities.exceptions.
Spynnaker8Exception
[source]¶ Bases:
Exception
Superclass of all exceptions from the pynn module
-
exception
spynnaker8.utilities.exceptions.
SynapticBlockGenerationException
[source]¶ Bases:
spinn_front_end_common.utilities.exceptions.ConfigurationException
Raised when the synaptic manager fails to generate a synaptic block
-
exception
spynnaker8.utilities.exceptions.
SynapticBlockReadException
[source]¶ Bases:
spinn_front_end_common.utilities.exceptions.ConfigurationException
Raised when the synaptic manager fails to read a synaptic block or convert it into readable values
-
exception
spynnaker8.utilities.exceptions.
SynapticConfigurationException
[source]¶ Bases:
spinn_front_end_common.utilities.exceptions.ConfigurationException
Raised when the synaptic manager fails for some reason
-
exception
spynnaker8.utilities.exceptions.
SynapticMaxIncomingAtomsSupportException
[source]¶ Bases:
spinn_front_end_common.utilities.exceptions.ConfigurationException
Raised when a synaptic sublist exceeds the max atoms possible to be supported
spynnaker8.utilities.id module¶
spynnaker8.utilities.neo_compare module¶
-
spynnaker8.utilities.neo_compare.
compare_analogsignal
(as1, as2, same_length=True)[source]¶ Compares two analogsignalarray Objects to see if they are the same
Parameters: - as1 (Analogsignal) – first analogsignal holding list of individual analogsignal Objects
- as2 (Analogsignal) – second analogsignal holding list of individual analogsignal Objects
- same_length (bool) – Flag to indicate if the same length of data is held. I.e.: All spikes up to the same time. If False allows one trains to have additional data after the first ends. This is used to compare data extracted part way with data extracted at the end.
Raises: AssertionError – If the analogsignalarrays are not equal
-
spynnaker8.utilities.neo_compare.
compare_blocks
(neo1, neo2, same_runs=True, same_data=True, same_length=True)[source]¶ Compares two neo Blocks to see if they hold the same data.
Parameters: - neo1 (Block) – First block to check
- neo2 – Second block to check
- same_runs (bool) – Flag to signal if blocks are the same length. If False extra segments in the larger block are ignored
- same_data (bool) – Flag to indicate if the same type of data is held. I.e.: Same spikes, v, gsyn_exc and gsyn_inh. If False only data in both blocks is compared
- same_length (bool) – Flag to indicate if the same length of data is held. I.e.: All spikes up to the same time. If False allows one trains to have additional data after the first ends. This is used to compare data extracted part way with data extracted at the end.
Return type: None
Raises: AssertionError – If the blocks are not equal
-
spynnaker8.utilities.neo_compare.
compare_segments
(seg1, seg2, same_data=True, same_length=True)[source]¶ Parameters: - seg1 (Segment) – First Segment to check
- seg2 (Segment) – Second Segment to check
- same_data (bool) – Flag to indicate if the same type of data is held. I.e.: Same spikes, v, gsyn_exc and gsyn_inh. If False only data in both blocks is compared
- same_length (bool) – Flag to indicate if the same length of data is held. I.e.: All spikes up to the same time. If False allows one trains to have additional data after the first ends. This is used to compare data extracted part way with data extracted at the end.
Return type: None
Raises: AssertionError – If the segments are not equal
-
spynnaker8.utilities.neo_compare.
compare_spiketrain
(spiketrain1, spiketrain2, same_length=True)[source]¶ Checks two Spiketrains have the exact same data
Parameters: - spiketrain1 (SpikeTrain) – first spiketrain
- spiketrain2 – second spiketrain
- same_length (bool) – Flag to indicate if the same length of data is held. I.e.: All spikes up to the same time. If False allows one trains to have additional spikes after the first ends This is used to compare data extracted part way with data extracted at the end.
Return type: None
Raises: AssertionError – If the spiketrains are not equal
-
spynnaker8.utilities.neo_compare.
compare_spiketrains
(spiketrains1, spiketrains2, same_data=True, same_length=True)[source]¶ Check two Lists of SpikeTrains have the exact same data
Parameters: - spiketrains1 (List[SpikeTrain]) – First list SpikeTrains to compare
- spiketrains2 (List[SpikeTrain]) – Second list of SpikeTrains to compare
- same_data (bool) – Flag to indicate if the same type of data is held. I.e.: Same spikes, v, gsyn_exc and gsyn_inh. If False allows one or both lists to be Empty. Even if False none empty lists must be the same length
- same_length (bool) – Flag to indicate if the same length of data is held. I.e.: All spikes up to the same time. If False allows one trains to have additional spikes after the first ends This is used to compare data extracted part way with data extracted at the end.
Raises: AssertionError – If the spiketrains are not equal
spynnaker8.utilities.neo_convertor module¶
-
spynnaker8.utilities.neo_convertor.
convert_analog_signal
(signal_array, time_unit=UnitTime('millisecond', 0.001 * s, 'ms'))[source]¶ Converts part of a NEO object into told spynakker7 format
Parameters: - signal_array – Extended Quantities object
- time_unit – Data time unit for time index
Return type: ndarray
-
spynnaker8.utilities.neo_convertor.
convert_data
(data, name, run=0)[source]¶ Converts the data into a numpy array in the format ID, time, value
Parameters: - data (SpynnakerNeoBlock) – Data as returned by a getData() call
- name (str) – Name of the data to be extracted. Same values as used in getData()
- run (int) – Zero based index of the run to extract data for
Return type: nparray
-
spynnaker8.utilities.neo_convertor.
convert_data_list
(data, name, runs=None)[source]¶ Converts the data into a list of numpy arrays in the format ID, time, value
Parameters: - data (SpynnakerNeoBlock) – Data as returned by a getData() call
- name (str) – Name of the data to be extracted. Same values as used in getData()
- runs – List of Zero based index of the run to extract data for. Or None to extract all runs
Return type: list(nparray)
-
spynnaker8.utilities.neo_convertor.
convert_gsyn
(gsyn_exc, gsyn_inh)[source]¶ Converts two neo objects into the spynakker7 format
Note
It is acceptable for both neo parameters to be the same object
Parameters: - gsyn_exc – neo with gsyn_exc data
- gsyn_inh – neo with gsyn_exc data
Return type: nparray
-
spynnaker8.utilities.neo_convertor.
convert_gsyn_exc_list
(data)[source]¶ Converts the gsyn_exc into a list numpy array one per segment (all runs) in the format ID, time, value
Parameters: data (SpynnakerNeoBlock) – The data to convert; it must have Gsyn_exc data in it Return type: list(nparray)
-
spynnaker8.utilities.neo_convertor.
convert_gsyn_inh_list
(data)[source]¶ Converts the gsyn_inh into a list numpy array one per segment (all runs) in the format ID, time, value
Parameters: data (SpynnakerNeoBlock) – The data to convert; it must have Gsyn_inh data in it Return type: list(nparray)
-
spynnaker8.utilities.neo_convertor.
convert_spikes
(neo, run=0)[source]¶ Extracts the spikes for run one from a Neo Object
Parameters: - neo – neo Object including Spike Data
- run (int) – Zero based index of the run to extract data for
Return type: nparray
-
spynnaker8.utilities.neo_convertor.
convert_spiketrains
(spiketrains)[source]¶ Converts a list of spiketrains into spynakker7 format
Parameters: spiketrains – List of SpikeTrains Return type: nparray
-
spynnaker8.utilities.neo_convertor.
convert_v_list
(data)[source]¶ Converts the voltage into a list numpy array one per segment (all runs) in the format ID, time, value
Parameters: data (SpynnakerNeoBlock) – The data to convert; it must have V data in it Return type: list(nparray)
spynnaker8.utilities.version_util module¶
-
spynnaker8.utilities.version_util.
detect_supported_configuration
(pynn_version, neo_version)[source]¶ Check if the version configuration of PyNN and Neo is one we support.
Note
We strongly encourage the use of PyNN 0.9 and Neo 0.6.
Returns: True if we’re using old PyNN 0.8 syntax Raises: ImportError – If a truly unsupported system is present or if we cannot parse the version numbers (shouldn’t happen)