| 1 |
''' |
|---|
| 2 |
Synfire chains (from Diesmann et al, 1999) |
|---|
| 3 |
''' |
|---|
| 4 |
from brian import * |
|---|
| 5 |
|
|---|
| 6 |
Vr = -70*mV |
|---|
| 7 |
Vt = -55*mV |
|---|
| 8 |
taum = 10*ms |
|---|
| 9 |
taupsp = 0.325*ms |
|---|
| 10 |
weight = 4.86 * mV |
|---|
| 11 |
|
|---|
| 12 |
eqs=Equations(''' |
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
) |
|---|
| 18 |
|
|---|
| 19 |
P = NeuronGroup(N=1000, model=eqs, |
|---|
| 20 |
threshold=Vt,reset=Vr,refractory=1*ms) |
|---|
| 21 |
Pinput = PulsePacket(t=50*ms,n=85,sigma=1*ms) |
|---|
| 22 |
|
|---|
| 23 |
Pgp = [ P.subgroup(100) for i in range(10)] |
|---|
| 24 |
C = Connection(P,P,'y') |
|---|
| 25 |
for i in range(9): |
|---|
| 26 |
C.connect_full(Pgp[i],Pgp[i+1],weight) |
|---|
| 27 |
Cinput = Connection(Pinput,P,'y') |
|---|
| 28 |
Cinput.connect_full(Pinput,Pgp[0],weight) |
|---|
| 29 |
|
|---|
| 30 |
Mgp = [SpikeMonitor(p,record=True) for p in Pgp] |
|---|
| 31 |
Minput = SpikeMonitor(Pinput,record=True) |
|---|
| 32 |
monitors = [Minput]+Mgp |
|---|
| 33 |
|
|---|
| 34 |
P.V = Vr + rand(len(P)) * (Vt-Vr) |
|---|
| 35 |
run(100*ms) |
|---|
| 36 |
|
|---|
| 37 |
raster_plot(showgrouplines=True,*monitors) |
|---|
| 38 |
show() |
|---|