Skip to content
Snippets Groups Projects
Unverified Commit 16c86878 authored by Han Lu's avatar Han Lu Committed by GitHub
Browse files

fixed typo and code style (#2344)

Thorsten please add the units

<!-- Please make sure your PR follows our [contribution
guidelines](https://github.com/arbor-sim/arbor/tree/master/doc/contrib)
and agree to the terms outlined in the [PR
procedure](https://github.com/arbor-sim/arbor/tree/master/doc/contrib/pr.rst

).
-->

---------

Co-authored-by: default avatarThorsten Hater <24411438+thorstenhater@users.noreply.github.com>
parent cd2f5323
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,7 @@ Cable cell decoration ...@@ -7,7 +7,7 @@ Cable cell decoration
.. py:class:: decor .. 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` to a morphology when used to instantiate a :py:class:`cable_cell`
.. method:: __init__() .. method:: __init__()
...@@ -35,9 +35,10 @@ Cable cell decoration ...@@ -35,9 +35,10 @@ Cable cell decoration
.. code-block:: Python .. code-block:: Python
import arbor as A
# Set cell-wide values for properties for resistivity and capacitance # Set cell-wide values for properties for resistivity and capacitance
decor = arbor.decor() decor = A.decor()
decor.set_property(rL=100, cm=0.1) decor.set_property(rL=100 * U.Ohm * U.cm, cm=0.1 * U.F/ U.m2)
.. method:: set_ion(ion, int_con=None, ext_con=None, rev_pot=None, method=None) .. method:: set_ion(ion, int_con=None, ext_con=None, rev_pot=None, method=None)
...@@ -60,13 +61,14 @@ Cable cell decoration ...@@ -60,13 +61,14 @@ Cable cell decoration
.. code-block:: Python .. code-block:: Python
import arbor as A
# Set nernst reversal potential method for calcium. # 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) decor.set_ion('ca', method=ca_mech)
# Set reversal potential and concentration for sodium. # Set reversal potential and concentration for sodium.
# The reversal potential is fixed, so we set the method to None. # 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 Various specialisations of the ``paint`` method are available for setting properties
and density mechanisms that are applied to regions. and density mechanisms that are applied to regions.
...@@ -74,7 +76,7 @@ Cable cell decoration ...@@ -74,7 +76,7 @@ Cable cell decoration
.. method:: paint(region, Vm=None, cm=None, rL=None, tempK=None) .. 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 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. expression.
:param str region: description of the region. :param str region: description of the region.
...@@ -90,10 +92,10 @@ Cable cell decoration ...@@ -90,10 +92,10 @@ Cable cell decoration
.. code-block:: Python .. code-block:: Python
# Specialize resistivity on soma # Specialize resistivity on soma
decor.paint('"soma"', rL=100) decor.paint('"soma"', rL=100 * U.Ohm * U.cm)
# Specialize resistivity and capacitance on the axon, where # Specialize resistivity and capacitance on the axon, where
# axon is defined using a region expression. # 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/U.m2, rL=80 * U.Ohm * U.cm)
# Specialize resistivity on soma and set :math:`r_L(s) = 42.0 \cdot d(s)` # 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 # where `s` parametrises the cable segment(s) and :math:`d(s)` is the cable
# diameter at `s`. # diameter at `s`.
...@@ -103,7 +105,7 @@ Cable cell decoration ...@@ -103,7 +105,7 @@ Cable cell decoration
:noindex: :noindex:
Set ion species properties initial conditions on a region. A property 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. interpreted as an inhomogeneous expression.
:param str name: name of the ion species. :param str name: name of the ion species.
...@@ -141,7 +143,7 @@ Cable cell decoration ...@@ -141,7 +143,7 @@ Cable cell decoration
Place one instance of the gap junction mechanism described by ``junction`` at each location in ``locations`` 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 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`. :py:class:`arbor.gap_junction_connection`.
:param str locations: description of the locset. :param str locations: description of the locset.
......
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