You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It can be beneficial in a model to have Parameters which are defined through a relation to other parameters/descriptors. These dependent parameters are defined by their relation and thus should not be fitted during minimization. Their value should be updated when the values of the independent parameters which they depend on are changed. It should be possible to easily convert a dependent parameter to a dependent parameter and vice versa.
Current Implementation
Currently, this is handled by the "constraints" objects which are created separately and then assigned to the parameter, such as:
a=Parameter(name='a', value=0.2)
b=Parameter(name='b', value=1)
constraint=ObjConstraint(a, '2*', b)
b.user_constraints['SET_A'] =constraint
Requirements
When an independent parameter value is changed, it should update the values of all the parameters which depend directly on it. When doing this update, signals should also be send to the GUI frontend to reflect this change.
Making a parameter dependent should be easy and user-friendly, both when generated and when changed by the setter, by allowing direct expressions such as: 'value=a+2*b' in the value field
A dependent parameter should also be easy to change back into an independent parameter
Dependent parameters should not be included in the fitting procedure
[Optional] It should be possible to visualize a dependency tree to get an overview of all parameter dependencies
Implementation
'_is_independent' boolean variable, for checks
'list_of_dependents' list variable with UIDs of parameters that depend on the parameter
'_update' method, to be called on dependent parameters when their independent dependency is changed
Logic to ensure no broken, cyclic or secondary (for now) dependencies
The text was updated successfully, but these errors were encountered:
Discussed in #10
Originally posted by damskii9992 June 7, 2024
General
It can be beneficial in a model to have Parameters which are defined through a relation to other parameters/descriptors. These dependent parameters are defined by their relation and thus should not be fitted during minimization. Their value should be updated when the values of the independent parameters which they depend on are changed. It should be possible to easily convert a dependent parameter to a dependent parameter and vice versa.
Current Implementation
Currently, this is handled by the "constraints" objects which are created separately and then assigned to the parameter, such as:
Requirements
Implementation
The text was updated successfully, but these errors were encountered: