SynapticPathway class¶
(Shortest import: from brian2.synapses.synapses import SynapticPathway)
-
class
brian2.synapses.synapses.SynapticPathway(synapses, code, prepost, objname=None, delay=None, event='spike')[source]¶ Bases:
brian2.groups.group.CodeRunner,brian2.groups.group.GroupThe
CodeRunnerthat applies the pre/post statement(s) to the state variables of synapses where the pre-/postsynaptic group spiked in this time step.Parameters: synapses :
SynapsesReference to the main
Synapsesobjectprepost : {‘pre’, ‘post’}
Whether this object should react to pre- or postsynaptic spikes
objname : str, optional
The name to use for the object, will be appendend to the name of
synapsesto create a name in the sense ofNameable. IfNoneis provided (the default),prepostwill be used.delay :
Quantity, optionalA scalar delay (same delay for all synapses) for this pathway. If not given, delays are expected to vary between synapses.
Attributes
_initialise_queue_codeobjThe CodeObjectinitalising theSpikeQueueat the begin of a runqueueThe SpikeQueueMethods
before_run(**kwds)check_variable_write(variable)Function that can be overwritten to raise an error if writing to a variable should not be allowed. initialise_queue()push_spikes()update_abstract_code(**kwds)Details
-
_initialise_queue_codeobj¶ The
CodeObjectinitalising theSpikeQueueat the begin of a run
-
queue¶ The
SpikeQueue
-
before_run(**kwds)¶
-
check_variable_write(variable)[source]¶ Function that can be overwritten to raise an error if writing to a variable should not be allowed. Note that this does not deal with incorrect writes that are general to all kind of variables (incorrect units, writing to a read-only variable, etc.). This function is only used for type-specific rules, e.g. for raising an error in
Synapseswhen writing to a synaptic variable before anyconnectcall.By default this function does nothing.
Parameters: variable :
VariableThe variable that the user attempts to set.
-
update_abstract_code(**kwds)¶
-