Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
arbor
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Analyze
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
arbor-sim
arbor
Commits
c84a8416
Unverified
Commit
c84a8416
authored
4 years ago
by
Brent Huisman
Committed by
GitHub
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add missing quotes in the Python example and docs. (#1174)
parent
3d725ce1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
doc/gs_single_cell.rst
+4
-10
4 additions, 10 deletions
doc/gs_single_cell.rst
python/example/single_cell_model.py
+4
-4
4 additions, 4 deletions
python/example/single_cell_model.py
with
8 additions
and
14 deletions
doc/gs_single_cell.rst
+
4
−
10
View file @
c84a8416
...
...
@@ -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)
...
...
This diff is collapsed.
Click to expand it.
python/example/single_cell_model.py
+
4
−
4
View file @
c84a8416
...
...
@@ -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
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment