Simple Examples¶
Create a Leaky Neuron¶
Demonstrates use of Leaky Integrate and Fire (LeakyIaf class) in moose.
Create a Leaky Compartment¶
Voltage Clamping¶
Generate Pulse¶
-
pulsegen2.
main
()[source]¶ Pulse generator example
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¶
-
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.
if3 = moose.IntFire(‘if3’)
-
intfire.
connect_two_intfires
()[source]¶ Connect two IntFire neurons so that spike events in one gets transmitted to synapse of the other.