spynnaker.pyNN.utilities package¶
Submodules¶
spynnaker.pyNN.utilities.constants module¶
-
class
spynnaker.pyNN.utilities.constants.
POPULATION_BASED_REGIONS
¶ Bases:
enum.Enum
An enumeration.
-
CONNECTOR_BUILDER
= 9¶
-
DIRECT_MATRIX
= 10¶
-
NEURON_PARAMS
= 1¶
-
POPULATION_TABLE
= 3¶
-
PROFILING
= 8¶
-
PROVENANCE_DATA
= 7¶
-
RECORDING
= 6¶
-
SYNAPSE_DYNAMICS
= 5¶
-
SYNAPSE_PARAMS
= 2¶
-
SYNAPTIC_MATRIX
= 4¶
-
SYSTEM
= 0¶
-
spynnaker.pyNN.utilities.extracted_data module¶
-
class
spynnaker.pyNN.utilities.extracted_data.
ExtractedData
[source]¶ Bases:
object
Data holder for all synaptic data being extracted in parallel. @Chimp: play here to hearts content.
spynnaker.pyNN.utilities.fake_HBP_Portal_machine_provider module¶
spynnaker.pyNN.utilities.reports module¶
spynnaker.pyNN.utilities.running_stats module¶
spynnaker.pyNN.utilities.spynnaker_connection_holder_generations module¶
spynnaker.pyNN.utilities.spynnaker_failed_state module¶
-
class
spynnaker.pyNN.utilities.spynnaker_failed_state.
SpynnakerFailedState
[source]¶ Bases:
spynnaker.pyNN.spynnaker_simulator_interface.SpynnakerSimulatorInterface
,spinn_front_end_common.utilities.failed_state.FailedState
,object
-
has_reset_last
¶
-
max_delay
¶
-
min_delay
¶
-
spynnaker.pyNN.utilities.spynnaker_neuron_network_specification_report module¶
spynnaker.pyNN.utilities.spynnaker_synaptic_matrix_report module¶
spynnaker.pyNN.utilities.utility_calls module¶
utility class containing simple helper methods
-
spynnaker.pyNN.utilities.utility_calls.
check_directory_exists_and_create_if_not
(filename)[source]¶ Create a parent directory for a file if it doesn’t exist
Parameters: filename – The file whose parent directory is to be created
-
spynnaker.pyNN.utilities.utility_calls.
convert_param_to_numpy
(param, no_atoms)[source]¶ Convert parameters into numpy arrays
Parameters: - param – the param to convert
- no_atoms – the number of atoms available for conversion of param
Return numpy.array: the converted param in whatever format it was given
-
spynnaker.pyNN.utilities.utility_calls.
convert_to
(value, data_type)[source]¶ Convert a value to a given data type
Parameters: - value – The value to convert
- data_type – The data type to convert to
Returns: The converted data as a numpy data type
-
spynnaker.pyNN.utilities.utility_calls.
get_maximum_probable_value
(dist, n_items, chance=0.01)[source]¶ Get the likely maximum value of a RandomDistribution given a number of draws
-
spynnaker.pyNN.utilities.utility_calls.
get_minimum_probable_value
(dist, n_items, chance=0.01)[source]¶ Get the likely minimum value of a RandomDistribution given a number of draws
-
spynnaker.pyNN.utilities.utility_calls.
get_n_bits
(n_values)[source]¶ Determine how many bits are required for the given number of values
-
spynnaker.pyNN.utilities.utility_calls.
get_probability_within_range
(dist, lower, upper)[source]¶ Get the probability that a value will fall within the given range for a given RandomDistribution
-
spynnaker.pyNN.utilities.utility_calls.
get_probable_maximum_selected
(n_total_trials, n_trials, selection_prob, chance=0.01)[source]¶ Get the likely maximum number of items that will be selected from a set of n_trials from a total set of n_total_trials with a probability of selection of selection_prob
-
spynnaker.pyNN.utilities.utility_calls.
get_standard_deviation
(dist)[source]¶ Get the standard deviation of a RandomDistribution
-
spynnaker.pyNN.utilities.utility_calls.
get_variance
(dist)[source]¶ Get the variance of a RandomDistribution
-
spynnaker.pyNN.utilities.utility_calls.
high
(dist)[source]¶ Gets the high or max boundary value for this distribution
Could return None
-
spynnaker.pyNN.utilities.utility_calls.
low
(dist)[source]¶ Gets the high or min boundary value for this distribution
Could return None
-
spynnaker.pyNN.utilities.utility_calls.
read_in_data_from_file
(file_path, min_atom, max_atom, min_time, max_time, extra=False)[source]¶ - Read in a file of data values where the values are in a format of:
- <time> <atom ID> <data value>
Parameters: - file_path – absolute path to a file containing the data
- min_atom – min neuron ID to which neurons to read in
- max_atom – max neuron ID to which neurons to read in
- min_time – min time slot to read neurons values of.
- max_time – max time slot to read neurons values of.
Returns: a numpy array of (time stamp, atom ID, data value)
-
spynnaker.pyNN.utilities.utility_calls.
read_spikes_from_file
(file_path, min_atom=0, max_atom=inf, min_time=0, max_time=inf, split_value='\t')[source]¶ Read spikes from a file formatted as: <time> <neuron ID>
Parameters: - file_path (str) – absolute path to a file containing spike values
- min_atom (int) – min neuron ID to which neurons to read in
- max_atom (int) – max neuron ID to which neurons to read in
- min_time (int) – min time slot to read neurons values of.
- max_time (int) – max time slot to read neurons values of.
- split_value (str) – the pattern to split by
Returns: a numpy array with max_atom elements each of which is a list of spike times.
Return type: numpy.array(int, int)