| 1 |
#!/usr/bin/env python |
| 2 |
""" |
| 3 |
Dynamics of a network of sparsely connected inhibitory current-based |
| 4 |
integrate-and-fire neurons. Individual neurons fire irregularly at |
| 5 |
low rate but the network is in an oscillatory global activity regime |
| 6 |
where neurons are weakly synchronized. |
| 7 |
|
| 8 |
Reference: |
| 9 |
"Fast Global Oscillations in Networks of Integrate-and-Fire |
| 10 |
Neurons with Low Firing Rates" |
| 11 |
Nicolas Brunel & Vincent Hakim |
| 12 |
Neural Computation 11, 1621-1671 (1999) |
| 13 |
""" |
| 14 |
|
| 15 |
from brian2 import * |
| 16 |
|
| 17 |
N = 5000 |
| 18 |
Vr = 10*mV |
| 19 |
theta = 20*mV |
| 20 |
tau = 20*ms |
| 21 |
delta = 2*ms |
| 22 |
taurefr = 2*ms |
| 23 |
duration = .1*second |
| 24 |
C = 1000 |
| 25 |
sparseness = float(C)/N |
| 26 |
J = .1*mV |
| 27 |
muext = 25*mV |
| 28 |
sigmaext = 1*mV |
| 29 |
|
| 30 |
eqs = """ |
| 31 |
dV/dt = (-V+muext + sigmaext * sqrt(tau) * xi)/tau : volt |
| 32 |
""" |
| 33 |
|
| 34 |
group = NeuronGroup(N, eqs, threshold='V>theta', |
| 35 |
reset='V=Vr', refractory=taurefr, method='euler') |
| 36 |
group.V = Vr |
| 37 |
conn = Synapses(group, group, on_pre='V += -J', delay=delta) |
| 38 |
conn.connect(p=sparseness) |
| 39 |
M = SpikeMonitor(group) |
| 40 |
LFP = PopulationRateMonitor(group) |
| 41 |
|
| 42 |
run(duration) |
| 43 |
|
| 44 |
subplot(211) |
| 45 |
plot(M.t/ms, M.i, '.') |
| 46 |
xlim(0, duration/ms) |
| 47 |
|
| 48 |
subplot(212) |
| 49 |
plot(LFP.t/ms, LFP.smooth_rate(window='flat', width=0.5*ms)/Hz) |
| 50 |
xlim(0, duration/ms) |
| 51 |
|
| 52 |
show() |