Parameters

Parameter_obj object is a major building block of ESCAPE library. It performs a link between created models and optimizer, which performs optimization of the parameters for the best match between modeled and experimental data. In order to create a parameter object one should use a special factory function par, which has the following arguments:

1. name - parameter name
1. value - default value
2. userlim - limits of the parameter value
3. scale - multiplicator for parameter value
4. limscale - scale for automatic limits
5. units - units of parameter
6. fixed - set to True if you would like to fix value of the parameter

Below few examples of parameter creation are given.

How to assign a value

There are two ways to assign parameter value:

1. by assigning to *value* property
2. by calling *force_value* method

If you try to set value outside given boundaries a warning will be generated. The force value method forces the value setting and changes boundaries.

Expressions

Another useful feature of parameters is that they support arithmetic operators and mathematical functions. This feature allows the user to define parameters dependencies. New parameters will observe such dependencies and certainly will be not optimized during fit. The following mathematical functions are supported: sin, cos, tan, sinh, cosh, tanh, exp, sqrt, log, log10, pow, min, max, erf

As you have probably noticed par factory function returns an object of type parameter_obj. Class parameter_obj has a static method convert which is responsible for conversion from int and float types to parameters. In every method which requires parameter as an input, you can, if necessary, provide a float value. The value provided by the user will be converted to parameter_obj with constant value. This parameter is considered as dependent and will be ignored by the optimizer.

To help the user setting the parameters themselves and their ranges of validity, a visual representation has been devised. A slider can be used to represent a parameter. It is easier to change a parameter's value with a slider rather than restarting each and every cell. This is an experimental feature and you will need the package escape.utils.widgets.

Conditional parameters

Conditional parameter is the parameter which, depending on condition result, true or false, returns a value of either the first parameter or the second one, respectively. Below is an example of conditional parameter. Conditional parameters can be used everywhere where parameter is required as an input.