SynapticPathway class¶
(Shortest import: from brian2.synapses.synapses import SynapticPathway)
- class brian2.synapses.synapses.SynapticPathway(*args, **kw)[source]¶
Bases:
CodeRunner,GroupThe
CodeRunnerthat applies the pre/post statement(s) to the state variables of synapses where the pre-/postsynaptic group spiked in this time step.Attributes
The
CodeObjectinitalising theSpikeQueueat the begin of a runThe
SpikeQueueMethods
before_run(run_namespace)Optional method to prepare the object before a run.
check_variable_write(variable)Function that can be overwritten to raise an error if writing to a variable should not be allowed.
create_code_objects(run_namespace)update_abstract_code([run_namespace, level])Update the abstract code for the code object.
Details
- _initialise_queue_codeobj¶
The
CodeObjectinitalising theSpikeQueueat the begin of a run
- queue¶
The
SpikeQueue
- before_run(run_namespace)[source]¶
Optional method to prepare the object before a run.
Called by
Network.after_runbefore the main simulation loop starts.
- 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.
- update_abstract_code(run_namespace=None, level=0)[source]¶
Update the abstract code for the code object. Will be called in
before_runand should update theCodeRunner.abstract_codeattribute.Does nothing by default.