Skip to content

Api generalisation - #43

Merged
beykyle merged 24 commits into
mainfrom
api_generalisation
Sep 10, 2026
Merged

Api generalisation#43
beykyle merged 24 commits into
mainfrom
api_generalisation

Conversation

@beykyle

@beykyle beykyle commented Sep 9, 2026

Copy link
Copy Markdown
Owner

Supersedes #42, simplifies API and implementation

beykyle and others added 23 commits August 10, 2026 23:21
Replace the LikelihoodModel zoo with additive covariance Terms over each
constraint's stacked observation vector: cross-block terms couple
observations (case A) and Parameter-identity sharing wires one sampled
value into several terms (case B). Likelihoods become thin functionals
(Gaussian, Student-t, chi-squared) of the precomputed Mahalanobis
statistics, with the full-tuple parameter convention validated
everywhere.

Also: constraint-scoped parameter validation (cross-constraint sharing
and duplicate names are hard errors), fail-fast singular-covariance
checks naming the offending dataset, frozen block classification with
cached dense and per-block Cholesky factors, measurement systematics
retained as inert Observation metadata with an opt-in systematic_terms
factory (norm-divided units), latent-scale models (ScaledModel,
PerObservationScaledModel), predictive utilities including GP
discrepancy propagation, and comprehensive unit + regression coverage
(178 tests), including real-solver smoke tests and a fix for the
never-working dXS/dA-from-dXS/dRuth unit conversion.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Port all notebooks to the Term-based covariance API and extend coverage:
new measurement_to_calibration (EXFOR-shaped measurement to calibrated
potential, unit contract, guardrails) and robust_likelihoods (Student-t
vs Gaussian) notebooks; error-model catalog completed with noise_term
and offset_term options; likelihood_scaling/weights equivalence; shared
systematics across real cross-section datasets (case A); GP model
discrepancy on a differential cross section. Notebooks use the
stacked_supports helper and no longer write PDF artifacts on execution.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Rewrite the API reference around the covariance/predictive modules,
replace the design spec with an accurate architecture page
(docs/design.md), refresh README to the Term API with the behavior
change called out, drop the broken environment.yml install path, run
notebooks in CI with pytest-xdist under a raised timeout, test 3.11,
scope bare pytest to the unit suite, and ignore local tooling artifacts.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
x4i3 downloads its database at import time when missing from
site-packages, and each nbmake notebook runs in its own kernel process:
under pytest-xdist, concurrent kernels raced the same download/unpack
and failed mid-extraction. Warm the database with a single serial import
before the parallel run, and cache the data directory across runs (one
key shared by all jobs, keyed on the dependency pins) so tests, docs,
and the wheel smoke test stop re-downloading it every run.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
jitr 3.0 changed DifferentialWorkspace.xs and the (p,n) Workspace.xs to
take potential arrays evaluated on ws.radial_grid() instead of callables
plus argument tuples. Move the potential evaluation into a private _xs
helper on each reaction model so evaluate and
visualizable_model_prediction share it, accept an optional separate
Coulomb interaction (calculate_interaction_from_params may return two or
three argument tuples), and fail loudly on an unknown elastic quantity
instead of leaving the extractor unset.

Require jitr>=3.0 from PyPI, and raise the Python floor to 3.12 (the
only version jitr 3.0 is built for), trimming the CI matrix to match.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Introduce a single low-level transform type shared by the observation
(comparison space), model (parametric latent scale) and covariance
(term coordinates) layers that follow. A Transform is a numpy-style
callable fn(a, *values) with an optional tuple of Parameters, an
optional analytic derivative (central finite difference otherwise), an
optional inverse, and composition via `|` with parameters concatenated.
Plain callables are accepted anywhere a Transform is and wrapped as
parameter-free.

Ship the parameter-free `identity`, `log` (-inf where the argument is
not positive, no warnings) and `exp`, plus the parametric `scale()` and
`per_observation_scaling()` latent normalisations that will replace the
ScaledModel classes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Both reaction observations' from_measurement classmethods copied the
same eight fields out of an exfor_tools Distribution and re-listed every
constructor option by hand, so each new constructor keyword had to be
threaded through twice. Collect the Distribution fields in one
measurement_kwargs helper and forward the remaining keywords with
**kwargs, so from_measurement accepts everything the constructor does
(solver settings, compound_correction, and the observation-level
options added in the following commits).

Tests get a make_measurement stub factory in place of four hand-built
SimpleNamespaces.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Replace the DenseTerm / DiagonalTerm / RankOneTerm / KernelTerm class
hierarchy with a single Term: a numpy-style callable fn(c, *values) of a
TermContext (the term's local view of the stacked x, y and ym on its
support) plus a `kind` saying how the result enters the covariance
("diag" adds v**2 to the diagonal, "mode" adds the outer product v v^T,
"matrix" adds a symmetric block). A plain array instead of fn is a fixed
contribution; `constant=True` lets an x-dependent callable be evaluated
once and cached, and the Constraint's eager singular-covariance check
now passes a real StackContext so such terms can read x.

Terms default to support=None, meaning "the whole constraint", and are
bound when added to a ConstraintCovariance, so the factory helpers take
support as a trailing keyword instead of a leading positional. An
optional `coords` transform (rxmc.transforms) is applied to x before fn
sees it, so a kernel can live in momentum transfer without knowing.

The factory helpers become one-liners over Term: statistical_term,
offset_term, normalization_term, noise_term (now with an optional
parametric basis), noise_fraction_term, model_error_term, the new
systematic_term (a mode with a user basis) and kernel_term (replacing
KernelTerm and discrepancy_term, with an optional parametric amplitude
so that Sigma += a a^T o K). Bases are ordinary callables of the
TermContext: ones, ym, averaging, x_basis(scale), exp_growth(scale),
constant_amplitude and exp_growth_amplitude(scale).

Port Observation.statistical_term / systematic_terms, the predictive
docstrings, the unit tests and five example notebooks to the new
signatures.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Let an Observation compare in a transformed space without the model
knowing: Observation(x, y, transform=rxmc.transforms.log) takes raw y,
keeps it as y_raw, stores y = log(y_raw) and the delta-method
statistical error |t'(y_raw)| sigma, and fails loudly at construction
if the transform is not finite at a data point. The Constraint applies
the same transform to every prediction when stacking, so the model is
written once in physical space and can never be double-transformed;
predict(raw=True) returns the untransformed prediction, and a
non-finite prediction (a non-positive cross section under log) yields
-inf log likelihood and +inf chi-squared instead of a LinAlgError.

Reported systematics are propagated to the comparison space the same
way: the offset mode is |t'(y_raw)| omega and the normalisation mode
becomes a systematic_term whose basis is eta ym_raw |t'(ym_raw)|,
evaluated at the prediction. obs.log_jacobian and constraint.log_jacobian
expose the constant needed to compare evidences across comparison
spaces. Parametric transforms are rejected here; they belong on the
model.

The reaction observations forward transform= to the base class.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Make hold-out part of a constraint's support instead of a data surgery.
Observation(mask=) marks which points are active; masked() and
masked_where(predicate) derive views that share the data and any
precomputed solver workspaces and only change which points enter the
likelihood. Constraint(mask=) additionally switches whole observations
off, and Constraint.masked() / complement() build the fit / held-out
counterpart over the same Term and Parameter objects, so both views
have an identical parameter vector and their log likelihoods add up to
the unmasked one.

Terms are still authored over the full stack: ConstraintCovariance
gains active= and always assembles the full N x N matrix, restricting
the Cholesky factorisation and the Mahalanobis distance to the active
rows (fully masked blocks are skipped on the block path). The
non-finite-transform guard, log_jacobian and the coverage counts are
scoped to active points, and masked views keep an `identity` pointing
at their root so identity-routed transforms treat them as one dataset.
predict_and_covariance, x, y and covariance_matrix(active_only=) give
the active-point views that model comparison needs.

The reaction observations forward mask= to the base class.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Drop ScaledModel and PerObservationScaledModel in favour of one
mechanism: PhysicalModel(params, transform=...) appends the transform's
Parameters to the model's and applies it to the output of evaluate, so
evaluate stays physical-space only and split_params / apply_transform
give subclasses the same hook for their visualisation predictions.
rxmc.transforms.scale() is the Kennedy-O'Hagan latent scale rho (it
changes the mean, so it is a model transform, not a covariance term)
and per_observation_scaling(observations) is one rho_i per dataset,
routed by observation identity so masked views scale like their root.

The reaction models accept transform= and route their visualisation
path through split_params / apply_transform; the normalization
inference notebook is ported to Polynomial(transform=...).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Expose the entrance-channel wavenumber of an
ElasticDifferentialXSObservation and a momentum_transfer helper
q = 2 k sin(theta/2) on its data angles, so a kernel_term can be
placed in momentum-transfer space (coords=) for the error-model study
forms instead of every caller reaching into the jitr workspace.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ence

Provide the model-comparison bookkeeping the error-model study needs
without touching a sampler: everything consumes a Constraint plus rows
of posterior samples. predictive_draws draws from N(ym(theta),
Sigma(theta)) on the active points (or the model-only predictive),
coverage_curve / coverage_error / sharpness score calibration and
width of those draws, heldout_log_predictive and elpd score a held-out
constraint (typically fit.complement()), logz_summary and compare_logz
summarise replicate nested-sampling evidences with a conservative tie
verdict, log_jacobian supplies the comparison-space constant, and
split_samples cuts flat sampler rows into model and per-constraint
parameter blocks.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…rm API

Rewrite the covariance section of the README and docs/design.md around
the single generic Term (kind table, support=None, coords, the factory
helpers and bases), add sections on comparison-space and model
transforms, point masks and held-out complements, and the sampler-free
model-comparison module, and record the error-model recipes the API was
generalised for. The API reference gains the transforms and
model_comparison modules and the new covariance helpers, and drops the
removed term classes, ScaledModel classes and discrepancy_term. The
README notes the jitr>=3.0 / Python 3.12 requirement.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
docs/generated/ is pure build output: docs/conf.py sets
autosummary_generate = True, so Sphinx rewrites every stub on each
build and `make clean` deletes the directory. Keeping them under
version control meant every API change churned dozens of generated
files (this refactor alone added 24, deleted 7 and modified 12).
Ignore the directory and drop the tracked copies.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Constraint.__init__ copied the observations into a list and then kept
iterating the original argument, so a generator (or any one-shot
iterable) was exhausted on the first line and produced an empty
constraint without complaint. Iterate the stored list throughout.

Also from the review of the masks commit: empirical_coverage returns
nan instead of dividing by zero when no point is active; an integer
observation mask of length n holding only 0/1 is rejected as ambiguous
(bool mask or index list?) instead of being read as indices; masked()
re-runs the non-finite comparison-space guard so a view cannot
re-activate a point that is -inf under log (and the guard no longer
warns about inf*0 at inactive points); ConstraintCovariance keeps an
active index array that merely has size N unless it is exactly
arange(N); covariance_matrix documents active_only and its two
possible shapes; masked() explains why sharing Terms between the view
and its parent is safe; stray blank lines left by hoisted test imports
are removed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The generic-Term rewrite lost the eager shape check the old
offset_term / normalization_term had: a magnitude or mask array of the
wrong length was run through np.broadcast_to in the basis, which
silently spreads a length-1 array over the support. Route every
magnitude and basis value through _full(), which broadcasts scalars
(0-d arrays included) and rejects any array whose shape is not (n,).

A Term binds its support once and caches x-dependent values, so it
cannot be shared between constraints of different length without
returning stale or misplaced blocks; bind() now raises when asked to
re-bind to a different N, and the Term docstring states the
one-Term-one-constraint rule (masked views of one constraint share its
stack and may share Terms). local_context() checks the parameter count
before handing values to a parametric coords transform, so the error
comes from the covariance layer rather than the Transform.

Drop the discrepancy_term alias: nothing used it, the module docstring
and API reference already omitted it, and kernel_term is the one name.
Document StackContext in the API reference (it is the context a
ConstraintCovariance is evaluated on), extract the kernel
hyperparameter-to-Parameter loop into _kernel_params, and state that a
kernel_term amplitude sees the transformed coordinate. Tests: length-1
magnitude/mask, 0-d magnitude, re-binding, local_context parameter
check; the constant-term test moves out of the kernel class and the
noqa'd lambda becomes a def.

Not changed: the _AVERAGING alias stays, because removing it means
renaming model_error_term's averaging= keyword for no behavioural gain.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
predictive_draws and heldout_log_predictive validated model_samples
against its own length, so the row check could never fire and a single
1-D posterior row [a0, a1] was reshaped to (2, 1) - two samples of a
one-parameter model - before failing deep in Constraint._split. _rows
now treats a 1-D input as one sample (as split_samples already did) and
checks the row count only against an explicit n.

_psd_factor added an absolute 1e-10 jitter to Sigma on every call,
including the successful Cholesky path; in a log comparison space with
1e-8 variances that inflated every draw by ~1 %. Factor Sigma as-is
first, retry with a jitter relative to the mean variance only when the
plain Cholesky fails, and fall back to the eigen square root last. The
model-only predictive no longer assembles the covariance at all: it
stacks Constraint.predict and takes the active points.

Rename elpd to log_posterior_predictive: it is the log-mean-exp of the
joint held-out log likelihood over posterior samples, i.e. the joint log
posterior predictive of the block, not the pointwise-summed elpd of
Vehtari et al., and the old name invited comparison with ArviZ/LOO
numbers that are not comparable. sharpness(levels=) becomes
sharpness(percentiles=) so the two interval conventions in the module
(probabilities in (0, 1) for coverage, percentiles in 0-100 here) no
longer share a name. The default coverage levels are one module
constant; scipy.linalg is dropped for numpy.linalg; docstrings gain the
missing Returns and parameter descriptions; test imports are hoisted.

Not changed: compare_logz still ignores the replicate count (it is
informational; now said so in the docstring), and the log_jacobian
wrapper stays because the design doc and API reference point to it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Polynomial.evaluate reported len(self.params) in its parameter-count
error, which counts the transform's parameters too; report order + 1.
A contextual per_observation_scaling evaluated without a context now
says so instead of raising a misleading "observation was not
registered" KeyError, and it keeps its registered observations under a
private attribute (the test checks the id-routing behaviour instead of
reaching in). Transform.is_identity and inverse document that they
are an object-identity test and parameter-free only, the composition
closures share one argument unpacker, and _safe_log says it expects an
ndarray.

Observation.systematic_terms checks eagerly that the transform has an
inverse when a normalisation systematic is reported (the failure used
to surface at the first likelihood evaluation), explains why the offset
and normalisation modes are linearised at y_raw and ym_raw
respectively, and says what support=None means inside a
multi-observation constraint. The elastic observation keeps the
kinematics it already unpacks and reads k from them; the
momentum_transfer docstring no longer suggests passing its array as a
kernel coordinate transform, and the momentum-transfer study form
checks the helper against the inline map. The base evaluate docstrings
say they receive base parameters only, the ias potential docstrings are
wrapped to the line length, and _xs states the two-or-three-tuple
contract. The design doc notes that the latent scale parameters now come
last and are named log_rho, unlike ScaledModel.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Add the module-level identity, log and exp transforms to the API
reference (they are used throughout the README, design doc and tests
but had no entry), and document StackContext's fields as constructor
parameters so its autosummary page no longer duplicates the attribute
descriptions under sphinx -W.

Bring the example notebooks back in line with the code: the stored
output in measurement_to_calibration that still printed the old
RankOneTerm class names now shows Term, the gp_discrepancy prose refers
to kernel_term rather than the dropped discrepancy_term alias, and
linear_calibration_demo is re-executed so its help() output shows the
current statistical_term signature instead of DenseTerm.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
docs/groundup_design.md sketches a declare-then-compile architecture
(hashable identity Parameters, Dataset/Block split, bind-time predictors,
stateless Terms with block-reference supports, a single ParameterIndex,
and a structured diag + modes + block covariance with a Woodbury path)
and compares it with the current api_generalisation design, ending with
an incremental adoption path.

docs/bugs_found.md enumerates the bugs and driver inconsistencies found
while reading the branch for that comparison, with file:line references.

Both pages are added to the Sphinx toctree.
Confirmed bugs
- IsobaricAnalogPNObservation forwards wavelengths_beyond_range and
  zeros_per_node to set_up_solver instead of silently dropping them.
- BatchedAdaptiveMetropolisSampler: docstrings now match the code (the
  proposal adapts after every batch, burn-in included) and the public
  proposal attribute is refreshed alongside args.
- Parameter is hashable (value hash consistent with its value __eq__),
  coerces bounds to a float 2-tuple, and has a repr.
- One pint UnitRegistry, DEFAULT_LMAX, XS_UNIT, RUTHERFORD_UNIT and MB_PER_B
  live in observation_from_measurement (now exported from rxmc); both
  reaction observations import them and both reaction models divide by
  MB_PER_B instead of a bare 1000.

Driver parity between CalibrationConfig and Walker
- Walker.log_posterior and the Gibbs conditional evaluate the prior first
  and return -inf without touching the likelihood.
- Walker gains likelihood_scaling with the config's semantics.
- A list of scipy marginals is wrapped in IndependentPrior by a shared
  priors.as_prior in both ParameterConfig and Sampler; the four list
  branches in ParameterConfig are gone.  x0 for a list prior is now seeded.
- ParameterConfig._infer_dim calls mean() when it is a method.

Fragile spots
- Reaction models reject an observation of the wrong class up front.
- Walker.walk runs one _run_batch sweep for burn-in and active batches.
- priors.clip_unit_cube is applied in every prior_transform.

Tests added for each item (295 total, from 268); docs/bugs_found.md
records the resolution of every item, with 11 deferred to
groundup_design.md.
…s page

docs/groundup_design.md now guides a from-scratch rewrite on a branch of
this repository rather than an incremental migration: immutable
declarations compiled by one Problem, structured (Woodbury) covariance,
external samplers only, a capability map covering every notebook and
test behaviour, a harvest table, the gaps to fill, milestones that slot
the recipe tests in as capabilities arrive, and the 0.x to 1.0 release
path.

docs/recipes.md is the companion: 42 user stories with the new spelling,
expected behaviour and citations, each of which becomes a test in the
rewrite, plus the list of what the API deliberately does not express.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

It introduces a broad, cross-cutting API refactor across core modeling, sampling, reaction integration, docs, and CI, so it warrants final human review despite limited localized issues found.

Pull request overview

This PR generalizes and simplifies the rxmc API by consolidating uncertainty modeling around composable covariance Terms, introducing a shared low-level Transform type, and aligning the built-in Walker with CalibrationConfig semantics (tempering, prior short-circuiting, consistent prior handling). It also updates the reaction-model integration for jitr>=3.0, adds new predictive/model-comparison utilities, and refreshes docs/CI to match the new architecture.

Changes:

  • Replace/retire the prior “likelihood model zoo” patterns in favor of stacked-covariance composition (rxmc.covariance.Term) and shared transforms (rxmc.transforms.Transform).
  • Align sampling drivers and prior handling (list-of-marginals -> IndependentPrior, unit-cube clipping, likelihood tempering in Walker).
  • Add new utilities and regression coverage (predictive bands, model comparison utilities, covariance-refactor regression pins), plus CI/docs updates.
File summaries
File Description
test/test_transforms.py New unit tests for rxmc.transforms behavior (composition, derivatives, contextual scaling).
test/test_sampler.py Update sampler/walker tests for constraint-scoped params, tempering, prior wrapping, and burn messaging.
test/test_regression.py Regression pins for the covariance-refactor behavior change and block-diagonal equivalence.
test/test_reaction_models.py Smoke tests for jitr-backed reaction models and observation type checks.
test/test_priors.py Add coverage for unit-cube clipping and as_prior wrapping behavior.
test/test_predictive.py New tests for GP posterior predictive and predictive-band utilities.
test/test_params.py New tests for value-based Parameter equality/hashing and bounds coercion.
test/test_model_comparison.py New tests for sampler-agnostic predictive/model-comparison utilities.
test/test_evidence.py Update Evidence tests for auto-detected parametric constraints and parameter validation.
test/test_config.py Update config tests for new covariance-term patterns, list-prior wrapping, and tempering parity.
test/helpers.py Shared test helpers for MVN reference computations / stack-context building.
test/conftest.py Ensure helpers are importable under different pytest import modes.
src/rxmc/walker.py Add likelihood tempering, prior-first short-circuiting, and refactor batch execution/messaging.
src/rxmc/transforms.py Introduce Transform abstraction (composition, derivative/inverse, contextual transforms).
src/rxmc/priors.py Add clip_unit_cube and as_prior; make prior transforms boundary-safe.
src/rxmc/predictive.py New predictive-uncertainty helpers (GP conditioning + total predictive bands).
src/rxmc/physical_model.py Add optional model-side transforms with parameter plumbing and splitting helpers.
src/rxmc/params.py Make Parameter hashable/value-equal; coerce bounds; improve repr.
src/rxmc/param_sampling.py Normalize list-priors via as_prior; clarify/adapt burn-in adaptation semantics.
src/rxmc/observation_from_measurement.py Centralize shared unit registry/constants + measurement kwarg helpers and angle-grid checks.
src/rxmc/model_comparison.py New sampler-agnostic posterior predictive and model comparison utilities.
src/rxmc/ias_pn_observation.py Convert to an Observation subclass; normalize measurement/unit handling via shared helpers.
src/rxmc/ias_pn_model.py Update to jitr>=3.0 array-potential API; add observation type checks; support model transforms.
src/rxmc/evidence.py Simplify Evidence API to one constraints list; auto-detect parametric constraints; validate constraint-scoped params.
src/rxmc/elastic_diffxs_observation.py Convert to an Observation subclass; unify units/normalization; add momentum-transfer helper.
src/rxmc/elastic_diffxs_model.py Update to jitr>=3.0 array-potential API; add observation type checks; optional Coulomb term; model transforms.
src/rxmc/correlated_discrepancy_likelihood_model.py Remove old GP discrepancy likelihood model (superseded by covariance kernel_term + predictive tools).
src/rxmc/config.py Wrap list priors via as_prior, clip unit-cube consistently, fix dimension inference, add parametric prediction alignment helper.
src/rxmc/init.py Export new/renamed modules (covariance, predictive, transforms, model_comparison, measurement helpers).
requirements.txt Bump minimum jitr version to match new solver interface.
README.md Update package narrative and quickstart to covariance-term composition; document behavior change and jitr>=3.0.
pyproject.toml Raise minimum Python to 3.12; adjust ruff/isort first-party settings; narrow default pytest scope.
examples/sampling_algos.ipynb Update example to new constraint/term-based noise modeling and constraint-scoped params.
examples/calibration_config_emcee_dynesty.ipynb Update examples for new likelihood API and output formatting.
examples/30s_optical_potential_calibration.ipynb Update examples for new likelihood API.
environment.yml Remove conda environment file (installation guidance updated elsewhere).
docs/installation.rst Remove conda/mamba guidance; keep venv workflow.
docs/index.rst Update docs landing to covariance-term model; expand to include new design docs pages.
docs/generated/rxmc.walker.Walker.rst Remove generated API stub file from repo.
docs/generated/rxmc.proposal.ProposalDistribution.rst Remove generated API stub file from repo.
docs/generated/rxmc.proposal.NormalProposalDistribution.rst Remove generated API stub file from repo.
docs/generated/rxmc.proposal.LogspaceNormalProposalDistribution.rst Remove generated API stub file from repo.
docs/generated/rxmc.proposal.HalfNormalProposalDistribution.rst Remove generated API stub file from repo.
docs/generated/rxmc.priors.TruncatedNormalPrior.rst Remove generated API stub file from repo.
docs/generated/rxmc.priors.IndependentPrior.rst Remove generated API stub file from repo.
docs/generated/rxmc.physical_model.Polynomial.rst Remove generated API stub file from repo.
docs/generated/rxmc.physical_model.PhysicalModel.rst Remove generated API stub file from repo.
docs/generated/rxmc.params.Parameter.rst Remove generated API stub file from repo.
docs/generated/rxmc.param_sampling.Sampler.rst Remove generated API stub file from repo.
docs/generated/rxmc.param_sampling.MetropolisHastingsSampler.rst Remove generated API stub file from repo.
docs/generated/rxmc.param_sampling.BatchedAdaptiveMetropolisSampler.rst Remove generated API stub file from repo.
docs/generated/rxmc.param_sampling.AdaptiveMetropolisSampler.rst Remove generated API stub file from repo.
docs/generated/rxmc.observation.Observation.rst Remove generated API stub file from repo.
docs/generated/rxmc.observation.FixedCovarianceObservation.rst Remove generated API stub file from repo.
docs/generated/rxmc.metropolis_hastings.metropolis_hastings.rst Remove generated API stub file from repo.
docs/generated/rxmc.likelihood_model.UnknownNormalizationModel.rst Remove generated API stub file from repo.
docs/generated/rxmc.likelihood_model.UnknownNormalizationErrorModel.rst Remove generated API stub file from repo.
docs/generated/rxmc.likelihood_model.UnknownNoiseFractionErrorModel.rst Remove generated API stub file from repo.
docs/generated/rxmc.likelihood_model.UnknownNoiseErrorModel.rst Remove generated API stub file from repo.
docs/generated/rxmc.likelihood_model.UnknownModelError.rst Remove generated API stub file from repo.
docs/generated/rxmc.likelihood_model.StudentTLikelihoodModel.rst Remove generated API stub file from repo.
docs/generated/rxmc.likelihood_model.ParametricLikelihoodModel.rst Remove generated API stub file from repo.
docs/generated/rxmc.likelihood_model.LikelihoodModel.rst Remove generated API stub file from repo.
docs/generated/rxmc.likelihood_model.FixedCovarianceLikelihood.rst Remove generated API stub file from repo.
docs/generated/rxmc.likelihood_model.Chi2LikelihoodModel.rst Remove generated API stub file from repo.
docs/generated/rxmc.ias_pn_observation.IsobaricAnalogPNObservation.rst Remove generated API stub file from repo.
docs/generated/rxmc.ias_pn_model.IsobaricAnalogPNXSModel.rst Remove generated API stub file from repo.
docs/generated/rxmc.evidence.Evidence.rst Remove generated API stub file from repo.
docs/generated/rxmc.elastic_diffxs_observation.ElasticDifferentialXSObservation.rst Remove generated API stub file from repo.
docs/generated/rxmc.elastic_diffxs_model.ElasticDifferentialXSModel.rst Remove generated API stub file from repo.
docs/generated/rxmc.correlated_discrepancy_likelihood_model.SklearnKernelGPDiscrepancyModel.rst Remove generated API stub file from repo.
docs/generated/rxmc.constraint.Constraint.rst Remove generated API stub file from repo.
docs/generated/rxmc.config.ParameterConfig.rst Remove generated API stub file from repo.
docs/generated/rxmc.config.CalibrationConfig.rst Remove generated API stub file from repo.
docs/generated/rxmc.adaptive_metropolis.adaptive_metropolis.rst Remove generated API stub file from repo.
docs/examples.rst Expand examples index for new notebooks/advanced topics.
docs/design.md New design document describing the stacked-covariance architecture.
docs/conf.py Exclude jupyter_execute from docs build artifacts.
docs/bugs_found.md New “bugs found” write-up documenting issues found/fixed during review.
docs/api.rst Update API reference to new transforms/covariance/predictive/model-comparison layout.
.gitignore Ignore generated docs outputs and other artifacts (docs/generated, uv.lock, etc.).
.github/workflows/ci.yml CI updates: Python 3.12-only, EXFOR DB caching/warmup, parallel notebook execution, docs build prep.
Review details

Suppressed comments (1)

src/rxmc/observation_from_measurement.py:82

  • check_angle_grid allows an angle exactly equal to pi (it only rejects > np.pi), but the error message says the allowed range is [0,pi). Since callers pass angles_vis=np.linspace(..., 180, ...) (i.e., pi), this message is misleading; either the check should be half-open or the message should be inclusive.
  • Files reviewed: 54/101 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Remove the BUQEYE truncation covariance, model averaging and mixing, the
realised-discrepancy posterior predictive check and power-scaling
sensitivity recipes for brevity; renumber 30-42 to 28-38 and fix every
cross-reference in the design document's capability map, milestones and
notebook mapping.
@beykyle
beykyle merged commit a97c372 into main Sep 10, 2026
5 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.

2 participants