File: examples-frompapers_Diesmann_et_al_1999.txt

package info (click to toggle)
brian 1.4.3-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, stretch
  • size: 23,436 kB
  • sloc: python: 68,707; cpp: 29,040; ansic: 5,182; sh: 111; makefile: 61
file content (61 lines) | stat: -rw-r--r-- 1,688 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
.. currentmodule:: brian

.. index::
   pair: example usage; NeuronGroup
   pair: example usage; run
   pair: example usage; show
   pair: example usage; raster_plot
   pair: example usage; Connection
   pair: example usage; SpikeMonitor
   pair: example usage; PulsePacket
   pair: example usage; Equations

.. _example-frompapers_Diesmann_et_al_1999:

Example: Diesmann_et_al_1999 (frompapers)
=========================================

Synfire chains
--------------
M. Diesmann et al. (1999). Stable propagation of synchronous spiking in cortical
neural networks. Nature 402, 529-533.

::

    from brian import *
    # Neuron model parameters
    Vr = -70 * mV
    Vt = -55 * mV
    taum = 10 * ms
    taupsp = 0.325 * ms
    weight = 4.86 * mV
    # Neuron model
    eqs = Equations('''
    dV/dt=(-(V-Vr)+x)*(1./taum) : volt
    dx/dt=(-x+y)*(1./taupsp) : volt
    dy/dt=-y*(1./taupsp)+25.27*mV/ms+\
        (39.24*mV/ms**0.5)*xi : volt
    ''')
    # Neuron groups
    P = NeuronGroup(N=1000, model=eqs,
        threshold=Vt, reset=Vr, refractory=1 * ms)
    Pinput = PulsePacket(t=50 * ms, n=85, sigma=1 * ms)
    # The network structure
    Pgp = [ P.subgroup(100) for i in range(10)]
    C = Connection(P, P, 'y')
    for i in range(9):
        C.connect_full(Pgp[i], Pgp[i + 1], weight)
    Cinput = Connection(Pinput, Pgp[0], 'y')
    Cinput.connect_full(weight=weight)
    # Record the spikes
    Mgp = [SpikeMonitor(p) for p in Pgp]
    Minput = SpikeMonitor(Pinput)
    monitors = [Minput] + Mgp
    # Setup the network, and run it
    P.V = Vr + rand(len(P)) * (Vt - Vr)
    run(100 * ms)
    # Plot result
    raster_plot(showgrouplines=True, *monitors)
    show()