Simple Examples¶
How to run these examplesCreate a Leaky Neuron¶
Demonstrates use of Leaky Integrate and Fire (LeakyIaf class) in moose.
Create a Leaky Compartment¶
-
class
lifcomp.
LIFComp
(*args)[source]¶ Leaky integrate and fire neuron using regular compartments, spikegen and Func.
-
Vreset
¶ Reset voltage. The cell's membrane potential is set to this value after spiking.
-
Vthreshold
¶ Threshold voltage. The cell spikes if its membrane potential goes above this value.
-
Voltage Clamping¶
Generate Pulse¶
-
pulsegen2.
main
()[source]¶ This example shows the full range of operations of PulseGen objects with a reimplementation of corresponding GENESIS demo.
A PulseGen object can be run in three modes: free running (trigMode=0), triggered (trigMode=1) and gated (trigMode=2).
In the free running mode it keeps repeating the pulse series indefinitely.
In triggered mode, it generates a pulse series on the leading edge of the trigger signal coming to its input field. The trigger can be the output of another PulseGen as in this example.
In gated mode, the PulseGen acts as if it was free-running as long as the input remains high.
Synapse¶
-
synapse.
main
()[source]¶ This is an example of event messages from multiple SpikeGen objects into a synchan.
Create a SynChan element with 2 elements in synapse field.
Create 5 SpikeGen elements.
Connect alternet SpikeGen elements to synapse[0] and synapse[1]
... This is a minimal example. In real simulations the SpikeGens will be embedded in compartments representing axon terminals and the SynChans will be embedded in somatic/dendritic compartments.
Message transmission via synapse¶
Demonstrates connection between 2 IntFire neurons to observe spike generation.
-
intfire.
connect_spikegen
()[source]¶ Connect a SpikeGen object to an IntFire neuron such that spike events in spikegen get transmitted to the synapse of the IntFire neuron.
-
intfire.
connect_two_intfires
()[source]¶ Connect two IntFire neurons so that spike events in one gets transmitted to synapse of the other.