Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed typo and code style #2344

Merged
merged 6 commits into from
Aug 8, 2024
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions doc/python/decor.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Cable cell decoration

.. py:class:: decor

A decor object contains a description of the cell dynamics, to be applied
A decor object contains a description of the cell dynamics to be applied
to a morphology when used to instantiate a :py:class:`cable_cell`

.. method:: __init__()
Expand Down Expand Up @@ -35,9 +35,10 @@ Cable cell decoration

.. code-block:: Python

import arbor as A
# Set cell-wide values for properties for resistivity and capacitance
decor = arbor.decor()
decor.set_property(rL=100, cm=0.1)
decor = A.decor()
decor.set_property(rL=100 * U.Ω·cm, cm=0.1 * U.F/m²)
ErbB4 marked this conversation as resolved.
Show resolved Hide resolved

.. method:: set_ion(ion, int_con=None, ext_con=None, rev_pot=None, method=None)

Expand All @@ -60,21 +61,22 @@ Cable cell decoration

.. code-block:: Python

import arbor as A
# Set nernst reversal potential method for calcium.
ca_mech = arbor.mechanism('nernst/x=ca')
ca_mech = A.mechanism('nernst/x=ca')
decor.set_ion('ca', method=ca_mech)

# Set reversal potential and concentration for sodium.
# The reversal potential is fixed, so we set the method to None.
decor.set_ion('na', int_con=5.0, rev_pot=70, method=None)
decor.set_ion('na', int_con=5.0 * U.mM, rev_pot=70 * U.mV, method=None)

Various specialisations of the ``paint`` method are available for setting properties
and density mechanisms that are applied to regions.

.. method:: paint(region, Vm=None, cm=None, rL=None, tempK=None)

Set cable properties on a region. A property ``v`` is given as a float
or a string. In the latter ``v`` will be interpreted as an inhomogeneous
or a string. In the latter, ``v`` will be interpreted as an inhomogeneous
expression.

:param str region: description of the region.
Expand All @@ -90,10 +92,10 @@ Cable cell decoration
.. code-block:: Python

# Specialize resistivity on soma
decor.paint('"soma"', rL=100)
decor.paint('"soma"', rL=100 * U.Ω·cm)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

# Specialize resistivity and capacitance on the axon, where
# axon is defined using a region expression.
decor.paint('(tag 2)', cm=0.05, rL=80)
decor.paint('(tag 2)', cm=0.05 * U.F/m², rL=80 * U.Ω·cm)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and here.

# Specialize resistivity on soma and set :math:`r_L(s) = 42.0 \cdot d(s)`
# where `s` parametrises the cable segment(s) and :math:`d(s)` is the cable
# diameter at `s`.
Expand All @@ -103,7 +105,7 @@ Cable cell decoration
:noindex:

Set ion species properties initial conditions on a region. A property
``v`` is given as a float or a string. In the latter ``v`` will be
``v`` is given as a float or a string. In the latter, ``v`` will be
interpreted as an inhomogeneous expression.

:param str name: name of the ion species.
Expand Down Expand Up @@ -141,7 +143,7 @@ Cable cell decoration

Place one instance of the gap junction mechanism described by ``junction`` at each location in ``locations``
and label the group of gap junction sites with ``label``. The label can be used to form gap junction
connections to/from one of labeled sites in the :py:class:`arbor.recipe` by creating a
connections to/from one of the labeled sites in the :py:class:`arbor.recipe` by creating a
:py:class:`arbor.gap_junction_connection`.

:param str locations: description of the locset.
Expand Down