Welcome to modelparameters’s documentation!

Modelparameters is a lightweight library to declare nested parameters in Python, and can be used as a module for providing parameter structure for physical models. It is mainly developed as a tool for gotran, but certainly not limited to that.

from modelparameters import ScalarParam
# Define the gravitational acceleration
g = ScalarParam(9.81, name="g", unit="m/s**2",
                description="gravitational acceleration")
# Define the time (in milliseconds)
t = ScalarParam(100.0, unit="ms",
                description="Time spent")
# Compute the distance travelled in free fall
s = 0.5 * g * t**2
print(s)

Output:

49050.0 ∈ [-∞, ∞]

Demos

Will come later!

Installation

You can install modelparameters either with pip:

pip install modelparameters

or if you want the latest features, you can install from source:

pip install git+https://finsberg@bitbucket.org/finsberg/modelparameters.git

Source code

Modelparmeters is orginally developed by Johan Hake, and the original source code can be found in his repoistory. The current maintained version can be foud here.

Contributors

The main contributors are

Indices and tables