Skip to content
Snippets Groups Projects
Unverified Commit 27c054e3 authored by Sebastian Schmitt's avatar Sebastian Schmitt Committed by GitHub
Browse files

Add some comments about units to network ring examples (#1697)

parent 3e56a00f
No related branches found
No related tags found
No related merge requests found
......@@ -88,13 +88,13 @@ class ring_recipe (arbor.recipe):
def connections_on(self, gid):
src = (gid-1)%self.ncells
w = 0.01 # 0.01 μS on expsyn
d = 5
d = 5 # ms delay
return [arbor.connection((src,'detector'), 'syn', w, d)]
# (9) Attach a generator to the first cell in the ring.
def event_generators(self, gid):
if gid==0:
sched = arbor.explicit_schedule([1])
sched = arbor.explicit_schedule([1]) # one event at 1 ms
weight = 0.1 # 0.1 μS on expsyn
return [arbor.event_generator('syn', weight, sched)]
return []
......@@ -121,7 +121,7 @@ sim.record(arbor.spike_recording.all)
# (14) Attach a sampler to the voltage probe on cell 0. Sample rate of 10 sample every ms.
handles = [sim.sample((gid, 0), arbor.regular_schedule(0.1)) for gid in range(ncells)]
# (15) Run simulation
# (15) Run simulation for 100 ms
sim.run(100)
print('Simulation finished')
......
......@@ -89,15 +89,15 @@ class ring_recipe (arbor.recipe):
# (8) Make a ring network. For each gid, provide a list of incoming connections.
def connections_on(self, gid):
src = (gid-1)%self.ncells
w = 0.01
d = 5
w = 0.01 # 0.01 μS on expsyn
d = 5 # ms delay
return [arbor.connection((src,'detector'), 'syn', w, d)]
# (9) Attach a generator to the first cell in the ring.
def event_generators(self, gid):
if gid==0:
sched = arbor.explicit_schedule([1])
weight = 0.1
sched = arbor.explicit_schedule([1]) # one event at 1 ms
weight = 0.1 # 0.1 μS on expsyn
return [arbor.event_generator('syn', weight, sched)]
return []
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment