spynnaker.pyNN.models.neuron.threshold_types package¶
Module contents¶
-
class
spynnaker.pyNN.models.neuron.threshold_types.
AbstractThresholdType
(data_types)[source]¶ Bases:
spynnaker.pyNN.models.neuron.implementations.abstract_standard_neuron_component.AbstractStandardNeuronComponent
Represents types of threshold for a neuron (e.g., stochastic).
Parameters: data_types (list(DataType)) – A list of data types in the component structure, in the order that they appear
-
class
spynnaker.pyNN.models.neuron.threshold_types.
ThresholdTypeStatic
(v_thresh)[source]¶ Bases:
spynnaker.pyNN.models.neuron.threshold_types.abstract_threshold_type.AbstractThresholdType
A threshold that is a static value.
Parameters: v_thresh (float, iterable(float), RandomDistribution or (mapping) function) – \(V_{thresh}\) -
add_parameters
(parameters)[source]¶ Add the initial values of the parameters to the parameter holder
Parameters: parameters (RangeDictionary) – A holder of the parameters
-
add_state_variables
(state_variables)[source]¶ Add the initial values of the state variables to the state variables holder
Parameters: state_variables (RangeDictionary) – A holder of the state variables
-
get_n_cpu_cycles
(n_neurons)[source]¶ Get the number of CPU cycles required to update the state
Parameters: n_neurons (int) – The number of neurons to get the cycles for Return type: int
-
get_units
(variable)[source]¶ Get the units of the given variable
Parameters: variable (str) – The name of the variable
-
get_values
(parameters, state_variables, vertex_slice, ts)[source]¶ Get the values to be written to the machine for this model
Parameters: - parameters (RangeDictionary) – The holder of the parameters
- state_variables (RangeDictionary) – The holder of the state variables
- vertex_slice (Slice) – The slice of variables being retrieved
- ts (float) – The time to be advanced in one call to the update of this component
Returns: A list with the same length as self.struct.field_types
Return type: list(int or float or list(int) or list(float) or RangedList)
-
has_variable
(variable)[source]¶ Determine if this component has a variable by the given name
Parameters: variable (str) – The name of the variable Return type: bool
-
update_values
(values, parameters, state_variables)[source]¶ Update the parameters and state variables with the given struct values that have been read from the machine
Parameters: - values (list(list)) – The values read from the machine, one for each struct element
- parameters (RangeDictionary) – The holder of the parameters to update
- state_variables (RangeDictionary) – The holder of the state variables to update
-
v_thresh
¶ \(V_{thresh}\)
-
-
class
spynnaker.pyNN.models.neuron.threshold_types.
ThresholdTypeMaassStochastic
(du_th, tau_th, v_thresh)[source]¶ Bases:
spynnaker.pyNN.models.neuron.threshold_types.abstract_threshold_type.AbstractThresholdType
A stochastic threshold.
Habenschuss S, Jonke Z, Maass W. Stochastic computations in cortical microcircuit models. PLoS Computational Biology. 2013;9(11):e1003311. doi:10.1371/journal.pcbi.1003311
Parameters: - du_th (float, iterable(float), RandomDistribution or (mapping) function) – \(du_{thresh}\)
- tau_th (float, iterable(float), RandomDistribution or (mapping) function) – \(\tau_{thresh}\)
- v_thresh (float, iterable(float), RandomDistribution or (mapping) function) – \(V_{thresh}\)
-
add_parameters
(parameters)[source]¶ Add the initial values of the parameters to the parameter holder
Parameters: parameters (RangeDictionary) – A holder of the parameters
-
add_state_variables
(state_variables)[source]¶ Add the initial values of the state variables to the state variables holder
Parameters: state_variables (RangeDictionary) – A holder of the state variables
-
du_th
¶ \(du_{thresh}\)
-
get_n_cpu_cycles
(n_neurons)[source]¶ Get the number of CPU cycles required to update the state
Parameters: n_neurons (int) – The number of neurons to get the cycles for Return type: int
-
get_units
(variable)[source]¶ Get the units of the given variable
Parameters: variable (str) – The name of the variable
-
get_values
(parameters, state_variables, vertex_slice, ts)[source]¶ Get the values to be written to the machine for this model
Parameters: - parameters (RangeDictionary) – The holder of the parameters
- state_variables (RangeDictionary) – The holder of the state variables
- vertex_slice (Slice) – The slice of variables being retrieved
- ts (float) – The time to be advanced in one call to the update of this component
Returns: A list with the same length as self.struct.field_types
Return type: list(int or float or list(int) or list(float) or RangedList)
-
has_variable
(variable)[source]¶ Determine if this component has a variable by the given name
Parameters: variable (str) – The name of the variable Return type: bool
-
tau_th
¶ \(\tau_{thresh}\)
-
update_values
(values, parameters, state_variables)[source]¶ Update the parameters and state variables with the given struct values that have been read from the machine
Parameters: - values (list(list)) – The values read from the machine, one for each struct element
- parameters (RangeDictionary) – The holder of the parameters to update
- state_variables (RangeDictionary) – The holder of the state variables to update
-
v_thresh
¶ \(V_{thresh}\)