Skip to content

Dependent Parameters do not update the calculator #281

Description

@rozyczko

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions