File: examples-frompapers_Brunel_Hakim_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 (75 lines) | stat: -rw-r--r-- 1,865 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
.. currentmodule:: brian

.. index::
   pair: example usage; subplot
   pair: example usage; plot
   pair: example usage; run
   pair: example usage; PopulationRateMonitor
   pair: example usage; xlim
   pair: example usage; show
   pair: example usage; raster_plot
   pair: example usage; Connection
   pair: example usage; rate
   pair: example usage; SpikeMonitor
   pair: example usage; NeuronGroup

.. _example-frompapers_Brunel_Hakim_1999:

Example: Brunel_Hakim_1999 (frompapers)
=======================================

Dynamics of a network of sparsely connected inhibitory current-based 
integrate-and-fire neurons. Individual neurons fire irregularly at 
low rate but the network is in an oscillatory global activity regime 
where neurons are weakly synchronized.

Reference:
    "Fast Global Oscillations in Networks of Integrate-and-Fire
    Neurons with Low Firing Rates"
    Nicolas Brunel & Vincent Hakim
    Neural Computation 11, 1621-1671 (1999)

::

    
    from brian import *
    
    N = 5000
    Vr = 10 * mV
    theta = 20 * mV
    tau = 20 * ms
    delta = 2 * ms
    taurefr = 2 * ms
    duration = .1 * second
    C = 1000
    sparseness = float(C)/N
    J = .1 * mV
    muext = 25 * mV
    sigmaext = 1 * mV
    
    eqs = """
    dV/dt = (-V+muext + sigmaext * sqrt(tau) * xi)/tau : volt
    """
    
    group = NeuronGroup(N, eqs, threshold=theta,
                        reset=Vr, refractory=taurefr)
    group.V = Vr
    conn = Connection(group, group, state='V', delay=delta,
                      weight = -J,
                      sparseness=sparseness)
    M = SpikeMonitor(group)
    LFP = PopulationRateMonitor(group, bin=0.4 * ms)
    
    run(duration)
    
    subplot(211)
    raster_plot(M)
    xlim(0, duration/ms)
    
    subplot(212)
    plot(LFP.times_/ms, LFP.rate)
    xlim(0, duration/ms)
    
    show()