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
5d6f90ff
Unverified
Commit
5d6f90ff
authored
3 years ago
by
Sebastian Schmitt
Committed by
GitHub
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Improve mechanism painting documentation (#1573)
parent
504197df
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/python/mechanisms.rst
+29
-28
29 additions, 28 deletions
doc/python/mechanisms.rst
with
29 additions
and
28 deletions
doc/python/mechanisms.rst
+
29
−
28
View file @
5d6f90ff
...
...
@@ -48,6 +48,34 @@ mechanism that is to be painted or placed on the cable cell.
# by comma-separated list of parameter after the base mechanism name.
rev = arbor.mechanism('nernst/F=96485,x=ca')
Mechanisms can be painted to a region. Different mechanisms can be painted on top of each other.
.. code-block:: Python
import arbor
# Create pas mechanism with default parameter values (set in NOMDL file).
m1 = arbor.mechanism('pas')
# Create default mechainsm with custom conductance (range).
m2 = arbor.mechanism('pas', {'g', 0.1})
# Create a new pas mechanism with that changes reversal potential (global).
m3 = arbor.mechanism('pas/e=-45')
# Create an instance of the same mechanism, that also sets conductance (range).
m4 = arbor.mechanism('pas/e=-45', {'g', 0.1})
# This is an equivalent to m4, using set method to specify range parameters.
m5 = arbor.mechanism('pas/e=-45')
m5.set('g', 0.1)
# Decorate the 'soma' with (multiple) mechanisms
decor.paint('"soma"', m1)
decor.paint('"soma"', m2) # Error: can't place the same mechanism on overlapping regions
decor.paint('"soma"', m3) # This is ok: m3 is a new, derived mechanism by virtue of
# having a different name, i.e. 'pas/e=-45' vs. 'pas'.
.. method:: mechanism(name, params)
constructor for mechanism with *name* and range parameter overrides *params*,
...
...
@@ -83,34 +111,7 @@ mechanism that is to be painted or placed on the cable cell.
.. py:attribute:: values
:type: dict
A dictionary of key-value pairs for the parameters.
.. code-block:: Python
import arbor
# Create pas mechanism with default parameter values (set in NOMDL file).
m1 = arbor.mechanism('pas')
# Create default mechainsm with custom conductance (range).
m2 = arbor.mechanism('pas', {'g', 0.1})
# Create a new pas mechanism with that changes reversal potential (global).
m3 = arbor.mechanism('pas/e=-45')
# Create an instance of the same mechanism, that also sets conductance (range).
m4 = arbor.mechanism('pas/e=-45', {'g', 0.1})
# This is an equivalent to m4, using set method to specify range parameters.
m5 = arbor.mechanism('pas/e=-45')
m5.set('g', 0.1)
# Decorate the 'soma' on a cable_cell.
cell.paint('"soma"', m1)
cell.paint('"soma"', m2) # Error: can't place the same mechanism on overlapping regions
cell.paint('"soma"', m3) # This would be ok: m3 is a new, derived mechanism by virtue of
# having a different name, i.e. 'pas/e=-45' vs. 'pas'.
A dictionary of key-value pairs for the parameters.
.. py:class:: mechanism_info
...
...
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