model module
Implemented models
Model Module documentation
Model of model building.
Inherits from circuit to directly include the equivalent circuit here.
- class DMT.extraction.model.Model(model_name, version, nodes, independent_vars)[source]
Bases:
object
Base class for compact models that can be evaluated analytically in Python.
- Parameters:
- model_name
str
Name of the model
- version
float
Specifies the version of the model
- nodes[
str
] Nodes of the model
- independent_vars[
str
] Variables of the models which sould be considered independent, like voltages, currents and temperatures… ‘kwargs’ is added per default
- model_resistance_info
dict
Dictionary describing the dependencies for the model method ‘model_resistance’. For each key a tuple is expected if it is given. The possible keys are:
‘independent_vars’: Independent variables of this model method.
‘depends’: The model method depends on these other model methods.
‘depends_optional’: The model method CAN depend on these additional model methods to model the full voltage and current range.
- model_name
- Attributes:
- model_name
str
Name of the model
- version
float
Specifies the version of the model
- nodes[
str
] Nodes of the model
- independent_vars[
str
] Variables of the models which should be considered independent, like voltages, currents and temperatures…
- netlist[
CircuitElement
] Netlist of the equivalent circuit of this model.
- model_name
- DMT.extraction.model.check_nan_inf(func)[source]
This wrapper for mathematical functions checks if that functions returns Nan or Inf values. If such a value is returned, an error is raised and the function arguments are also given, which is useful to debug model equations.
- DMT.extraction.model.memoize(obj)[source]
Decorator that implements memoization for McParameter objects in *args.
- DMT.extraction.model.vectorize(func)[source]
This decorator can be used to vectorize model functions. Somehow it slows everything down heavily, it is currently not clear why! https://www.pythonlikeyoumeanit.com/Module3_IntroducingNumpy/VectorizedOperations.html