When a dependent Parameter is bound to a calculator through _callback (in InterfaceFactoryTemplate.generate_bindings), changes to
its independent component never propagate to the calculator, and the recomputed value is overwritten with the old calculator value on the next .value read.
The result: every constraint with a bound dependent parameter is completely neglected during fitting and simulation.
In easyreflectometry this breaks:
MaterialMixture: fitting fraction does not change its value, and fraction has zero effect on the computed reflectivity (_sld/_isld are dependent parameters bound to the calculator),
- gradient-layer thickness/roughness constraints (each sub-layer's thickness/roughness is dependent on the assembly parameter),
- surfactant/bilayer area-per-molecule, solvation and roughness constraints.
No error or warning is raised anywhere.
When a dependent
Parameteris bound to a calculator through_callback(inInterfaceFactoryTemplate.generate_bindings), changes toits independent component never propagate to the calculator, and the recomputed value is overwritten with the old calculator value on the next
.valueread.The result: every constraint with a bound dependent parameter is completely neglected during fitting and simulation.
In easyreflectometry this breaks:
MaterialMixture: fittingfractiondoes not change its value, andfractionhas zero effect on the computed reflectivity (_sld/_isldare dependent parameters bound to the calculator),No error or warning is raised anywhere.