Skip to content
Snippets Groups Projects
Unverified Commit c84a8416 authored by Brent Huisman's avatar Brent Huisman Committed by GitHub
Browse files

Add missing quotes in the Python example and docs. (#1174)

parent 3d725ce1
No related branches found
No related tags found
No related merge requests found
......@@ -48,13 +48,9 @@ create the ``cable_cell`` that represents it are as follows:
# (3) Create cell and set properties
cell = arbor.cable_cell(tree, labels)
cell.set_properties(Vm=-40)
cell.paint('soma', 'hh')
cell.place('center', arbor.iclamp( 10, 2, 0.8))
cell.place('center', arbor.spike_detector(-10))
# Discretization: the default discretization in Arbor is 1 compartment per branch.
# Let's be a bit more precise and make that every 2 μm:
cell.compartments_length(2)
cell.paint('"soma"', 'hh')
cell.place('"center"', arbor.iclamp( 10, 2, 0.8))
cell.place('"center"', arbor.spike_detector(-10))
Let's unpack that.
......@@ -93,8 +89,6 @@ with the named regions and locations.
an :class:`arbor.iclamp<arbor._arbor.iclamp>` with a duration of 2 ms and a current of
0.8 nA, starting at 10 ms. Then, add an :class:`arbor.spike_detector<arbor._arbor.spike_detector>`
with a threshold of -10 mV to the location we've labelled 'center'.
* Finally, we adjust the :ref:`discretisation <cable-discretisation>` of the simulation
by setting the compartment length to 2 μm. By default there is one compartment per branch.
Single cell network
----------------------------------------------------
......@@ -112,7 +106,7 @@ and provides an interface for recording potentials and running the simulation.
m = arbor.single_cell_model(cell)
# (5) Attach voltage probe sampling at 10 kHz (every 0.1 ms).
m.probe('voltage', 'center', frequency=10000)
m.probe('voltage', '"center"', frequency=10000)
# (6) Run simulation for 100 ms of simulated activity.
m.run(tfinal=100)
......
......@@ -11,15 +11,15 @@ labels = arbor.label_dict({'soma': '(tag 1)',
# (3) Create cell and set properties
cell = arbor.cable_cell(tree, labels)
cell.set_properties(Vm=-40)
cell.paint('soma', 'hh')
cell.place('center', arbor.iclamp( 10, 2, 0.8))
cell.place('center', arbor.spike_detector(-10))
cell.paint('"soma"', 'hh')
cell.place('"center"', arbor.iclamp( 10, 2, 0.8))
cell.place('"center"', arbor.spike_detector(-10))
# (4) Make single cell model.
m = arbor.single_cell_model(cell)
# (5) Attach voltage probe sampling at 10 kHz (every 0.1 ms).
m.probe('voltage', 'center', frequency=10000)
m.probe('voltage', '"center"', frequency=10000)
# (6) Run simulation for 100 ms of simulated activity.
m.run(tfinal=100)
......
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