Skip to content

Bayesian analysis#309

Open
rozyczko wants to merge 16 commits into
developfrom
bayesian
Open

Bayesian analysis#309
rozyczko wants to merge 16 commits into
developfrom
bayesian

Conversation

@rozyczko
Copy link
Copy Markdown
Member

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 Bayesian state 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)

  • Added new read-only properties and signals to the mock Analysis.qml and Plotting.qml backends for Bayesian state (e.g., isBayesianSelected, bayesianSamples, bayesianPosterior, bayesianResultAvailable, and related plot URLs/diagnostics), as well as setter functions for Bayesian parameters.
  • Added properties and signals for posterior predictive overlays (reflectivity and SLD) in both Python and QML plotting backends, enabling frontend display and updates of Bayesian-derived uncertainty bands.

Miscellaneous

  • Minor import adjustment in fitting.py to ensure scipp is available for Bayesian data aggregation.

@rozyczko rozyczko added [scope] enhancement Adds/improves features (major.MINOR.patch) [priority] high Should be prioritized soon labels May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[priority] high Should be prioritized soon [scope] enhancement Adds/improves features (major.MINOR.patch)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant