-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbalanced_network.py
45 lines (37 loc) · 1.41 KB
/
balanced_network.py
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
net = Network()
ng_ex = NeuronGroup(net = net, size = 80, behavior={
1 : CurrentBehavior(mode = "constant", has_noise = False, pw = 10),
4 : SynTypeInput(),
6 : LIF_Behavior(tau = 25),
9 : Recorder(['voltage', 'torch.mean(voltage)', 'I', 'activity']),
10 : EventRecorder(['spike'])
})
ng_in = NeuronGroup(net = net, size = 20, behavior={
1 : CurrentBehavior(mode = "constant", has_noise = False, pw = 10),
4 : SynTypeInput(),
6 : LIF_Behavior(tau = 22),
9 : Recorder(['voltage', 'torch.mean(voltage)', 'I', 'activity']),
10 : EventRecorder(['spike'])
})
SynapseGroup(net = net, src = ng_ex, dst = ng_ex, tag = "GLUTAMATE", behavior={
2 : SynConnectivity(mode = "balanced_fixed", J0 = 30, C = 30),
3 : SynFun()
})
SynapseGroup(net = net, src = ng_ex, dst = ng_in, tag = "GLUTAMATE", behavior={
2 : SynConnectivity(mode = "balanced_fixed", J0 = 30, C = 30),
3 : SynFun()
})
SynapseGroup(net = net, src = ng_in, dst = ng_ex, tag = "GABA", behavior={
2 : SynConnectivity(mode = "balanced_fixed", J0 = 30, C = 30),
3 : SynFun()
})
SynapseGroup(net = net, src = ng_in, dst = ng_in, tag = "GABA", behavior={
2 : SynConnectivity(mode = "balanced_fixed", J0 = 30, C = 30),
3 : SynFun()
})
net.initialize()
net.simulate_iterations(100)
plotter.plot_V(ng)
plotter.plot_I(ng)
plotter.plot_spike_raster(ng)
plotter.plot_activity(ng)