Constant Spike Source
This section shows all the code relative to the Constant Spike Source block.
- class sPyBlocks.constant_spike_source.ConstantSpikeSource(sim, global_params, neuron_params, std_conn)
This class defines the Constant Spike Source (CSS) block, a block which constantly fires spikes. Its use allows the correct operation of the NOT and fast AND gates.
- __init__(sim, global_params, neuron_params, std_conn)
Constructor of the class.
- Parameters
sim – The simulator package.
global_params (dict) – A dictionary of type str:int which must include the “min_delay” keyword. This keyword is likely to have the time period associated with it as a value.
neuron_params (dict) – A dictionary of type str:int containing the neuron parameters.
std_conn (sim.StaticSynapse) – The connection to be used for the construction of the block. Commonly, its weight is 1.0 and its delay is equal to the timestep. Using other values could change the behavior of the block.
- connect_outputs(output_population, conn=None, rcp_type='excitatory')
Connects the output neurons of the block to an output population.
- Parameters
output_population (sim.Population, sim.PopulationView, sim.Assembly, list) – A PyNN object or a list of PyNN objects containing the population to connect the output neurons to.
conn (sim.StaticSynapse) – The connection to use. std_conn (class parameter) by default.
rcp_type (str) – A string indicating the receptor type of the connections (excitatory or inhibitory). “Excitatory” by default.
- Returns
The number of connections that have been created.
- Return type
int
- get_output_neuron(flat=False)
Gets a list containing all the output neurons of the block
- Parameters
flat (bool) – A boolean value indicating whether or not to flatten the list. False by default.
- Returns
The flattened or unflattened list containing all the output neurons of the block
- Return type
list