deerlab.relate#

relate(model, **functions)[source]#

Create functional relationships between model parameters.

Parameters:
modeldeerlab.Model

Model object.

functionskeyword-callable pairs

Functions describing the relationship between parameters. The keyword represents the parameter which will be funtionalized. The keyword argument must be a callable function taking a number of model parameters (names must match any of the model parameter names) as input and returning the value to be assigned to the functionalized parameter. For example:

newmodel = relate(model, parA = lambda parB: 2*parB)

will create a new model newmodel based on model where the parameter parA is now given by twice the value of parameter parB. The model newmodel will no longer have parA as a model parameter and will have a parameter less than model. Multiple parameters can be functionalized by specifying multiple keyword-callable pairs.

Returns:
newmodeldeerlab.Model

New model object without the functionalized parameters.