Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces initial support for Bayesian (DREAM) sampling in the EasyReflectometryApp, including state management for Bayesian hyperparameters and results, integration into the minimizer selection logic, and the addition of posterior predictive overlays for both reflectivity and SLD plots. The changes span both Python backend logic and QML frontend state, laying the groundwork for Bayesian workflows and visualization.
Bayesian Sampling State & Logic
Added a new
Bayesianstate container class to manage DREAM hyperparameters (samples, burn-in, population, thinning, initializer) and posterior results, including cached plot URLs and diagnostics. This class ensures proper validation and encapsulation of Bayesian-related state.Extended the fitting logic to support Bayesian sampling, including progress tracking, experiment data aggregation for sampling, and new methods for preparing and handling sampling runs and results.
Minimizer Selection Integration
Updated the minimizer logic to prepend a Bayesian sentinel entry to the available minimizers list, allowing users to select Bayesian sampling as a minimization option. Added methods to check if Bayesian is selected and to ensure the correct underlying engine is used.
Frontend State & Property Additions (QML/Qt)
Analysis.qmlandPlotting.qmlbackends for Bayesian state (e.g.,isBayesianSelected,bayesianSamples,bayesianPosterior,bayesianResultAvailable, and related plot URLs/diagnostics), as well as setter functions for Bayesian parameters.Miscellaneous
fitting.pyto ensurescippis available for Bayesian data aggregation.