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 1 commit
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
16 changes: 9 additions & 7 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 [unit], cm=0.1[unit])
Copy link
Contributor

Choose a reason for hiding this comment

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

Hi,

the units are explained here

.def("set_property",

in the code. Note, however, that only the dimension needs to match, not the scale.
So, you could happily pass kOhm to any resistance-type argument and Arbor will
scale it properly.

Copy link
Contributor

Choose a reason for hiding this comment

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

I did mean to say that you could find the units there, not that they aren't needed

             " * Vm:    initial membrane voltage [mV].\n"
             " * cm:    membrane capacitance [F/m²].\n"
             " * rL:    axial resistivity [Ω·cm].\n"
             " * tempK: temperature [Kelvin].\n"


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

Expand All @@ -60,8 +61,9 @@ 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.
Expand All @@ -74,7 +76,7 @@ Cable cell decoration
.. 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 Down Expand Up @@ -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