Skip to content

Commit

Permalink
small change to __init__.py
Browse files Browse the repository at this point in the history
  • Loading branch information
schymans authored and jirikuncar committed Jun 29, 2017
1 parent fdd0d69 commit 857dd5f
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions essm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,25 @@
# along with essm; if not, write to the
# Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
# MA 02111-1307, USA.
"""ESSM contains helpers to deal with physical variables and units.
"""Variables module to deal with physical variables and units.
It allows attaching docstrings to variable names, defining their domains
(e.g. integer, real or complex), their units and LaTeX representations.
You can also provide a default value, which is particularly useful for
physical constants.
Creating variables
==================
To create custom variables, first import `Variable`:
>>> from essm.variables import Variable
To define units, you can either import these units from the library:
To define units, you must first import these units from the library:
>>> from essm.variables.units import joule, kelvin, meter
Then you can define a custom variable with its name, description, domain,
latex_name, and unit, e.g.:
latex_name, unit, and an optional default value, e.g.:
>>> class demo_chamber_volume(Variable):
... '''Volume of chamber.'''
Expand Down Expand Up @@ -60,7 +65,7 @@
Creating equations
==================
To create custom equations, proceed similarly to avove, i.e. first import
To create custom equations, proceed similarly to above, i.e. first import
`Equation`:
>>> from essm.equations import Equation
Expand Down

0 comments on commit 857dd5f

Please sign in to comment.