diff --git a/doc/python/decor.rst b/doc/python/decor.rst index 8c0104a34d31393371f0cd3d80a07404f552afc0..c941296669995788ee674dd8cb15f14de47e4e12 100644 --- a/doc/python/decor.rst +++ b/doc/python/decor.rst @@ -1,4 +1,4 @@ -.. pycablecell-decor: +.. _pycablecell-decor: Cable cell decoration ===================== diff --git a/python/example/network_ring.py b/python/example/network_ring.py index 1754ab38100cf7e4c19f3c006ab449640f517f06..09b3a75cd322690a9408f5f3b42528aa76e94a37 100755 --- a/python/example/network_ring.py +++ b/python/example/network_ring.py @@ -48,10 +48,10 @@ def make_cable_cell(gid): decor.paint('"dend"', 'pas') # (4) Attach a single synapse. - decor.place('"synapse_site"', 'expsyn', "syn") + decor.place('"synapse_site"', 'expsyn', 'syn') # Attach a spike detector with threshold of -10 mV. - decor.place('"root"', arbor.spike_detector(-10), "detector") + decor.place('"root"', arbor.spike_detector(-10), 'detector') cell = arbor.cable_cell(tree, labels, decor) @@ -88,13 +88,14 @@ class ring_recipe (arbor.recipe): src = (gid-1)%self.ncells w = 0.01 d = 5 - return [arbor.connection((src,"detector"), "syn", w, d)] + 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]) - return [arbor.event_generator("syn", 0.1, sched)] + weight = 0.1 + return [arbor.event_generator('syn', weight, sched)] return [] # (10) Place a probe at the root of each cell. diff --git a/python/example/mpi.py b/python/example/network_ring_mpi.py similarity index 93% rename from python/example/mpi.py rename to python/example/network_ring_mpi.py index a7096ede95ab22ee2b1b021531f42d92ddf7c288..98a53f69f17e08be3fc7df14ef9d1ff14b81e209 100644 --- a/python/example/mpi.py +++ b/python/example/network_ring_mpi.py @@ -50,10 +50,10 @@ def make_cable_cell(gid): decor.paint('"dend"', 'pas') # (4) Attach a single synapse. - decor.place('"synapse_site"', 'expsyn') + decor.place('"synapse_site"', 'expsyn', 'syn') # Attach a spike detector with threshold of -10 mV. - decor.place('"root"', arbor.spike_detector(-10)) + decor.place('"root"', arbor.spike_detector(-10), 'detector') cell = arbor.cable_cell(tree, labels, decor) @@ -90,13 +90,14 @@ class ring_recipe (arbor.recipe): src = (gid-1)%self.ncells w = 0.01 d = 5 - return [arbor.connection((src,0), (gid,0), w, d)] + 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]) - return [arbor.event_generator((0,0), 0.1, sched)] + weight = 0.1 + return [arbor.event_generator('syn', weight, sched)] return [] # (10) Place a probe at the root of each cell. @@ -133,7 +134,7 @@ sim.run(ncells*5) print('Simulation finished') # (17) Plot the recorded voltages over time. -print("Storing results ...") +print('Storing results ...') df_list = [] for gid in range(ncells): if len(sim.samples(handles[gid])): diff --git a/python/example/mpi_plot.py b/python/example/network_ring_mpi_plot.py similarity index 100% rename from python/example/mpi_plot.py rename to python/example/network_ring_mpi_plot.py