spynnaker8.utilities package¶
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.neo_compare module¶
-
spynnaker8.utilities.neo_compare.
compare_analogsignal
(as1, as2, same_length=True)[source]¶ Compares two analogsignal 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 analogsignals 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 (Block) – 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.
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.
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 (SpikeTrain) – 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: 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 spynnaker7 format
Parameters: - signal_array (AnalogSignal) – Extended Quantities object
- time_unit (quantities.unitquantity.UnitTime) – Data time unit for time index
Return type:
-
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: Return type:
-
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: Return type:
-
spynnaker8.utilities.neo_convertor.
convert_gsyn
(gsyn_exc, gsyn_inh)[source]¶ Converts two neo objects into the spynnaker7 format
Note
It is acceptable for both neo parameters to be the same object
Parameters: Return type:
-
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 (Block) – The data to convert; it must have Gsyn_exc data in it Return type: list(ndarray)
-
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 (Block) – The data to convert; it must have Gsyn_inh data in it Return type: list(ndarray)
-
spynnaker8.utilities.neo_convertor.
convert_spikes
(neo, run=0)[source]¶ Extracts the spikes for run one from a Neo Object
Parameters: Return type:
-
spynnaker8.utilities.neo_convertor.
convert_spiketrains
(spiketrains)[source]¶ Converts a list of spiketrains into spynnaker7 format
Parameters: spiketrains (list(SpikeTrain)) – List of SpikeTrains Return type: ndarray
-
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 (Block) – The data to convert; it must have V data in it Return type: list(ndarray)
-
spynnaker8.utilities.neo_convertor.
count_spikes
(neo)[source]¶ Help function to count the number of spikes in a list of spiketrains
Only counts run 0
Parameters: neo (Block) – Neo Object which has spikes in it Returns: The number of spikes in the first segment
-
spynnaker8.utilities.neo_convertor.
count_spiketrains
(spiketrains)[source]¶ Help function to count the number of spikes in a list of spiketrains
Parameters: spiketrains (list(SpikeTrain)) – List of SpikeTrains Returns: Total number of spikes in all the spiketrains Return type: int