Repository navigation
Add low-rank and full-Jacobian Gauss–Newton assimilation with a Laplace posterior - #204
Merged
KriFos1 merged 3 commits intoNov 27, 2026
Merged
Conversation
This was referenced Nov 26, 2026
This was referenced Nov 26, 2026
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.
Summary
Add a simulator-independent scheme that finds the posterior mode in physical state coordinates and draws a Laplace posterior ensemble. Low-rank mode requests the misfit gradient and one adjoint product per retained data direction. Full-Jacobian mode uses the same solver with identity directions. Each damping trial forecasts one member; the final posterior ensemble is forecast once.
Entry points and public APIs
pipt.LowRankGN,pipt.update_schemes.LowRankGN, and the existing scheme factory/registry: setscheme = "lowrankgn"andanalysis = "laplace".[dataassim.iteration]selects rank orfull_jacobian;[dataassim.laplace]configures prior covariance or precision actions.run_vjp(state, weights): PET supplies labelled observation weights; the simulator returns one gradient row per objective and state variable.MiniRes.run_vjpimplements it. MiniRes's existing adjoint path also covers BHP-controlled wells, bottom-hole pressure and permeability-dependent well indices.BaseEnsemble.calc_predictionandForecastMixin.forecastuseensemble.neby default; an explicit keyword-onlymember_countselects a different batch width. LowRankGN uses one member per MAP trial and[dataassim.laplace].posterior_samplesfor final sampling and forecast (defaultensemble.ne). The assimilation restart path recognises already-converged runs; imported state can supply the prior ensemble without a separate prior specification.Verification
pytest -q tests/assimilation/test_lowrank_gn.py tests/test_minires_sim.py tests/assimilation/test_scheme_factory.py— 97 passed.a7dc998: 777 passed, 5 xfailed, 1 xpassed. Regression coverage includes 8 prior members, single-member trials, 100 posterior draws, unchanged MAP and basis, short prior rejection, and reloading a saved posterior forecast.