Skip to content

Improved constraints - #339

Merged
rozyczko merged 5 commits into
polar_channelsfrom
improved_constraints
Sep 1, 2026
Merged

Improved constraints#339
rozyczko merged 5 commits into
polar_channelsfrom
improved_constraints

Conversation

@rozyczko

Copy link
Copy Markdown
Member

This pull request adds support for inequality constraints (BUMPS-only fit penalties) and physics-constraint recipes to the EasyReflectometry application, including both the Python backend and the QML mock backend. It introduces new properties and methods for handling inequality constraints, ensures that fits and Bayesian sampling respect these constraints, and improves parameter metadata to distinguish between derived and standard parameters.

Inequality Constraints Support:

  • Added properties and methods in both the Python backend (analysis.py, fitting.py, minimizers.py) and QML mock backend (Sample.qml, Analysis.qml) to track, enforce, and report on inequality constraints during fitting and sampling. This includes logic for error/warning reporting and immutable constraint snapshots during fits.

Physics-Constraint Recipes:

  • Introduced a physicsConstraintRecipes property and related methods in the QML mock backend (Sample.qml) to simulate enabling/disabling predefined physical constraint recipes.

Parameter Metadata Improvements:

  • Updated parameter metadata to include a kind field distinguishing derived parameters (e.g., total film thickness) from standard parameters, and made derived parameters read-only and non-fittable but usable in constraint expressions.

Backend Integration:

  • Imported and integrated new inequality constraint logic and utilities into the Python backend sample logic, preparing for further constraint management features.

@rozyczko
rozyczko force-pushed the improved_constraints branch from 0226201 to 81ec665 Compare September 1, 2026 08:17
@rozyczko
rozyczko merged commit 62e9059 into develop Sep 1, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant