From 27c054e3528a3bd362ec9bbce86079ff818dbb49 Mon Sep 17 00:00:00 2001 From: Sebastian Schmitt <sebastian.schmitt@kip.uni-heidelberg.de> Date: Wed, 6 Oct 2021 14:29:51 +0200 Subject: [PATCH] Add some comments about units to network ring examples (#1697) --- python/example/network_ring.py | 6 +++--- python/example/network_ring_mpi.py | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/python/example/network_ring.py b/python/example/network_ring.py index 46c6ada3..345238a8 100755 --- a/python/example/network_ring.py +++ b/python/example/network_ring.py @@ -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') diff --git a/python/example/network_ring_mpi.py b/python/example/network_ring_mpi.py index 52e88aec..6a38e2c6 100644 --- a/python/example/network_ring_mpi.py +++ b/python/example/network_ring_mpi.py @@ -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 [] -- GitLab