Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
6613570
Stack on the daily grid, robust step metric, gate probe, held-out cov…
mdenolle Sep 13, 2026
7b67e53
Regenerate Figs 7, 12, 13, 14, the clean calibration run and the Baye…
mdenolle Sep 13, 2026
f62e01e
Science corrections in the results and methods text (#39)
mdenolle Sep 13, 2026
813c1b2
Log the P1 execution in the iteration-3 plan record (#39)
mdenolle Sep 13, 2026
52f7234
Exclude zero-variance rows from the residual autocorrelation (#39, Co…
mdenolle Sep 13, 2026
1345a47
run_pipeline docstring: the gate applies to both references and every…
mdenolle Sep 13, 2026
64e439c
Record the 2026-09-13 prompts in the collaboration log
mdenolle Sep 14, 2026
86dd78c
Rerun the shared-source and clock-drift locked calibrations with the …
mdenolle Sep 14, 2026
e4f4657
Remove script and module names from the manuscript text (#39)
mdenolle Sep 14, 2026
d1cefa7
Measure the multiverse step about the event day; take the R-hat maxim…
mdenolle Sep 14, 2026
606f528
Multiverse panel annotation in a box on three lines; step attribution…
mdenolle Sep 14, 2026
6bbe687
Regenerate Fig 13 with the event-day step and the boxed annotation (#39)
mdenolle Sep 14, 2026
697d253
multiverse(): count pipelines with too few epochs for an RMS as n_spa…
mdenolle Sep 14, 2026
f38f098
Check scripts record the commit from the repository root; multiverse …
mdenolle Sep 14, 2026
688cbcb
residual_autocorrelation docstring: entry 0 is 1 when defined (#39, C…
mdenolle Sep 14, 2026
9088088
run_realization: import inside the try so the never-raises contract h…
mdenolle Sep 14, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
287 changes: 240 additions & 47 deletions literature/figs/demo_10_deviations.json

Large diffs are not rendered by default.

Binary file modified literature/figs/demo_10_deviations.npz
Binary file not shown.
Binary file modified literature/figs/demo_10_deviations.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
149 changes: 137 additions & 12 deletions literature/figs/demo_11_multiverse.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"figure": "demo_11_multiverse",
"generator": "codameter.deviations.multiverse + fig_multiverse_full",
"codameter_version": "0.4.0",
"git_commit": "d3a5c18b08d95872cfa54fa796f080daec94d20a",
"generated_utc": "2026-09-13T13:47:02+00:00",
"git_commit": "606f52826e348f55cf41c5c8cc97d83f7477e814",
"generated_utc": "2026-09-14T20:22:04+00:00",
"python": "3.12.13",
"numpy": "2.4.3",
"matplotlib": "3.10.9",
Expand Down Expand Up @@ -1011,20 +1011,145 @@
-0.0015953601640949972
],
"sobol_rms": {
"estimator": 0.19172730464675428,
"band": 0.020594323416902805,
"window": 0.27548277786930814,
"stack": 0.1720939509947523,
"reference": 0.0002193875128073912
"estimator": 0.18463613802418932,
"band": 0.023801370403100576,
"window": 0.2695482936114043,
"stack": 0.16715781784273717,
"reference": 0.0013864692528178886
},
"sobol_drop": {
"estimator": 0.18311655669696053,
"band": 0.049651795492108027,
"window": 0.19170881230491268,
"stack": 0.2062488515155831,
"reference": 0.001916032998687386
"estimator": 0.06235364288721693,
"band": 0.02898266944784389,
"window": 0.055215473347404134,
"stack": 0.00045630955433450854,
"reference": 0.12776374206635088
},
"n_pipelines": 108,
"n_valid": 96,
"n_empty": 12,
"empty": [
{
"config": {
"estimator": "MWCS",
"band": "0.4\u20131",
"window": "4\u201314",
"stack": "1",
"reference": "fixed"
},
"reason": "MWCS needs at least three sub-windows for the delay-versus-lapse fit; the 4-14 s window holds 2 at 6 s length and 3 s step"
},
{
"config": {
"estimator": "MWCS",
"band": "0.4\u20131",
"window": "4\u201314",
"stack": "1",
"reference": "moving"
},
"reason": "MWCS needs at least three sub-windows for the delay-versus-lapse fit; the 4-14 s window holds 2 at 6 s length and 3 s step"
},
{
"config": {
"estimator": "MWCS",
"band": "0.4\u20131",
"window": "4\u201314",
"stack": "10",
"reference": "fixed"
},
"reason": "MWCS needs at least three sub-windows for the delay-versus-lapse fit; the 4-14 s window holds 2 at 6 s length and 3 s step"
},
{
"config": {
"estimator": "MWCS",
"band": "0.4\u20131",
"window": "4\u201314",
"stack": "10",
"reference": "moving"
},
"reason": "MWCS needs at least three sub-windows for the delay-versus-lapse fit; the 4-14 s window holds 2 at 6 s length and 3 s step"
},
{
"config": {
"estimator": "MWCS",
"band": "0.4\u20131",
"window": "4\u201314",
"stack": "45",
"reference": "fixed"
},
"reason": "MWCS needs at least three sub-windows for the delay-versus-lapse fit; the 4-14 s window holds 2 at 6 s length and 3 s step"
},
{
"config": {
"estimator": "MWCS",
"band": "0.4\u20131",
"window": "4\u201314",
"stack": "45",
"reference": "moving"
},
"reason": "MWCS needs at least three sub-windows for the delay-versus-lapse fit; the 4-14 s window holds 2 at 6 s length and 3 s step"
},
{
"config": {
"estimator": "MWCS",
"band": "0.8\u20132",
"window": "4\u201314",
"stack": "1",
"reference": "fixed"
},
"reason": "MWCS needs at least three sub-windows for the delay-versus-lapse fit; the 4-14 s window holds 2 at 6 s length and 3 s step"
},
{
"config": {
"estimator": "MWCS",
"band": "0.8\u20132",
"window": "4\u201314",
"stack": "1",
"reference": "moving"
},
"reason": "MWCS needs at least three sub-windows for the delay-versus-lapse fit; the 4-14 s window holds 2 at 6 s length and 3 s step"
},
{
"config": {
"estimator": "MWCS",
"band": "0.8\u20132",
"window": "4\u201314",
"stack": "10",
"reference": "fixed"
},
"reason": "MWCS needs at least three sub-windows for the delay-versus-lapse fit; the 4-14 s window holds 2 at 6 s length and 3 s step"
},
{
"config": {
"estimator": "MWCS",
"band": "0.8\u20132",
"window": "4\u201314",
"stack": "10",
"reference": "moving"
},
"reason": "MWCS needs at least three sub-windows for the delay-versus-lapse fit; the 4-14 s window holds 2 at 6 s length and 3 s step"
},
{
"config": {
"estimator": "MWCS",
"band": "0.8\u20132",
"window": "4\u201314",
"stack": "45",
"reference": "fixed"
},
"reason": "MWCS needs at least three sub-windows for the delay-versus-lapse fit; the 4-14 s window holds 2 at 6 s length and 3 s step"
},
{
"config": {
"estimator": "MWCS",
"band": "0.8\u20132",
"window": "4\u201314",
"stack": "45",
"reference": "moving"
},
"reason": "MWCS needs at least three sub-windows for the delay-versus-lapse fit; the 4-14 s window holds 2 at 6 s length and 3 s step"
}
],
"cadence": 3,
"axes": [
"estimator",
"band",
Expand Down
Binary file modified literature/figs/demo_11_multiverse.npz
Binary file not shown.
Binary file modified literature/figs/demo_11_multiverse.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 5 additions & 5 deletions literature/figs/demo_12_bayes.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"figure": "demo_12_bayes",
"generator": "codameter.uq_bayes._build_bayes + _fig_bayes",
"codameter_version": "0.4.0",
"git_commit": "d3a5c18b08d95872cfa54fa796f080daec94d20a",
"generated_utc": "2026-09-13T13:41:32+00:00",
"git_commit": "c0f91f1f5d72ab3d7b4ed4be9294e7b023a372aa",
"generated_utc": "2026-09-13T17:05:28+00:00",
"python": "3.12.13",
"numpy": "2.4.3",
"matplotlib": "3.10.9",
Expand Down Expand Up @@ -61,7 +61,7 @@
},
{
"axes": "ax3",
"title": "(c) time-dependent error; $N_{eff}$=23/229",
"title": "(c) time-dependent error; $N_{eff}$=29/229",
"xlabel": "time (years)",
"ylabel": "$\\sigma$ (dv/v, %)",
"lines": [
Expand Down Expand Up @@ -143,8 +143,8 @@
"bayes": {
"tau": 0.0003612992348785833,
"s": 12.098861625892763,
"corr_length_days": 39.20671143105746,
"n_eff": 22.760567115510465,
"corr_length_days": 5.702100823925634,
"n_eff": 28.950925940431706,
"n_epochs": 229,
"labels": [
"stretching (TS) 0.4-1Hz 8-28s stack10d fixed",
Expand Down
Binary file modified literature/figs/demo_12_bayes.npz
Binary file not shown.
Binary file modified literature/figs/demo_12_bayes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 12 additions & 4 deletions literature/figs/demo_18_stack_coherence.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"figure": "demo_18_stack_coherence",
"generator": "codameter.synthetic_demo.fig_stack_coherence",
"codameter_version": "0.4.0",
"git_commit": "141e7bc25bb439420c5ee73223bf78eb4ca7a839",
"generated_utc": "2026-09-10T18:41:24+00:00",
"git_commit": "c0f91f1f5d72ab3d7b4ed4be9294e7b023a372aa",
"generated_utc": "2026-09-13T16:54:15+00:00",
"python": "3.12.13",
"numpy": "2.4.3",
"matplotlib": "3.10.9",
Expand Down Expand Up @@ -52,6 +52,14 @@
"ax1/line2/x",
"ax1/line2/y",
"ax1/line3/x",
"ax1/line3/y"
]
"ax1/line3/y",
"data/snr0.5/median_cc",
"data/snr0.5/rms_pct",
"data/snr0.5/signed_step_error_pct",
"data/snr4/median_cc",
"data/snr4/rms_pct",
"data/snr4/signed_step_error_pct",
"data/stack_days"
],
"step_error": "recovered minus true step amplitude, each the median of the 120 days after the event minus the median of the 120 days before (synthetic_demo.step_amplitude); negative = recovered drop deeper than the truth"
}
Binary file modified literature/figs/demo_18_stack_coherence.npz
Binary file not shown.
Binary file modified literature/figs/demo_18_stack_coherence.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 38 additions & 5 deletions paper/build_calibration_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,17 @@
OUT = HERE / "calibration_table.tex"


def _mean_se(values: list[float]) -> dict:
n = len(values)
mean = sum(values) / n
se = (
(sum((v - mean) ** 2 for v in values) / (n - 1)) ** 0.5 / n**0.5
if n > 1
else None
)
return {"mean": mean, "se": se, "n": n}


def _pm(m: dict, scale: float = 1.0, digits: int = 3) -> str:
if m is None or m.get("mean") is None:
return "--"
Expand All @@ -46,19 +57,35 @@ def main() -> int:
+ f" ($n={r['summary']['n_realizations']}$)"
for r in runs
]
for r in runs: # per-realisation max of the finite split R-hats, then mean, se
vals = []
for x in r["results"]:
if not x.get("ok"):
continue
finite = [
float(x[k])
for k in ("rhat_tau2", "rhat_s2", "rhat_lambda")
if isinstance(x.get(k), int | float) and x[k] == x[k]
]
if finite:
vals.append(max(finite))
r["summary"]["rhat_max_realisation"] = _mean_se(vals) if vals else None
metrics = [
("Member 68\\%", "member_coverage68", 1, 3),
("Member 95\\%", "member_coverage95", 1, 3),
("Member 95\\%, held-out half", "heldout_member_coverage95", 1, 3),
("Posterior 95\\%", "coverage95_posterior", 1, 3),
(r"Median $\sigma_{C_d}$ (\%)", "median_sd", 100, 3),
("Bias (\\%)", "shared_bias", 100, 3),
(r"RMSE($\mu$) (\%)", "rmse", 100, 3),
(r"Rescale $s$", "s", 1, 2),
(r"Correlation length $L$ (d)", "corr_length_days", 1, 1),
(r"Split $\hat R$, largest of three", "rhat_max_realisation", 1, 3),
(r"Prior scale share $\tau^2$", "prior_weight_tau2", 1, 2),
]
rows = []
for label, key, scale, digits in metrics:
cells = [_pm(r["summary"][key], scale, digits) for r in runs]
cells = [_pm(r["summary"].get(key), scale, digits) for r in runs]
rows.append(label + " & " + " & ".join(cells) + r" \\")
body = "\n".join(rows)
header = "Quantity & " + " & ".join(headings) + r" \\"
Expand All @@ -71,17 +98,23 @@ def main() -> int:
"target of the proposed single-member error scale; $z=1$ for the 68\\% "
"level and $z=1.96$ for the 95\\% level. "
"Posterior: fraction of epochs whose 95\\% credible band on $\\mu$ contains "
"the truth. Rescale $s$: the fitted factor on the within-method floor of "
"eq.~\\ref{eq:weaver}. "
"the truth. Held-out half: $C_d$ fitted on a random six of the twelve "
"members and scored on the other six. Rescale $s$: the fitted factor on the "
"within-method floor of eq.~\\ref{eq:weaver}. $L$: fitted temporal "
"correlation length of the residuals. Split $\\hat R$: two Gibbs chains "
"from different seeds, each split in halves, largest of the three scale "
"hyper-parameters per realisation. A realisation redraws the additive "
"noise on one fixed generating coda; the truth and the twelve "
"configurations are the same in every realisation. "
"Means with standard errors across realisations; no realisation failed; "
"$\\sigma_{C_d}$, bias and RMSE in percent; prior $\\tau^2$ is the fraction of "
"conditional posterior rate supplied by the prior scale term (the $\\lambda$ ratio is "
"below 0.01 throughout). "
"Clock drift: $4\\times10^{-5}$\\,s/day from 40\\% of the record. "
"Shared source: a seasonal source "
"effect warping the coda beyond 6\\,s lapse with a spurious 0.2\\% "
"seasonal \\dvv, seen by every configuration. Generated from "
"\\texttt{paper/data/calibration/} by \\texttt{paper/build\\_calibration\\_table.py}.}\n"
"seasonal \\dvv, seen by every configuration. Generated from the archived "
"runs distributed with the paper.}\n"
"\\label{tab:calibration}\n"
"\\begin{tabularx}{\\textwidth}{@{}L"
+ "r" * len(runs)
Expand Down
5 changes: 4 additions & 1 deletion paper/calibration_table.tex
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
\begin{table}
\footnotesize
\caption{Coverage calibration of the Bayesian measurement model over independent synthetic realisations of the volcano scenario (2.5 years, SNR 7, 4-day cadence, 12-member ensemble). Member coverage: fraction of member epochs with $|m_k(t)-\mathrm{truth}(t)|\le z\,\sigma_{C_d}(t)$, the target of the proposed single-member error scale; $z=1$ for the 68\% level and $z=1.96$ for the 95\% level. Posterior: fraction of epochs whose 95\% credible band on $\mu$ contains the truth. Rescale $s$: the fitted factor on the within-method floor of eq.~\ref{eq:weaver}. Means with standard errors across realisations; no realisation failed; $\sigma_{C_d}$, bias and RMSE in percent; prior $\tau^2$ is the fraction of conditional posterior rate supplied by the prior scale term (the $\lambda$ ratio is below 0.01 throughout). Clock drift: $4\times10^{-5}$\,s/day from 40\% of the record. Shared source: a seasonal source effect warping the coda beyond 6\,s lapse with a spurious 0.2\% seasonal \dvv, seen by every configuration. Generated from \texttt{paper/data/calibration/} by \texttt{paper/build\_calibration\_table.py}.}
\caption{Coverage calibration of the Bayesian measurement model over independent synthetic realisations of the volcano scenario (2.5 years, SNR 7, 4-day cadence, 12-member ensemble). Member coverage: fraction of member epochs with $|m_k(t)-\mathrm{truth}(t)|\le z\,\sigma_{C_d}(t)$, the target of the proposed single-member error scale; $z=1$ for the 68\% level and $z=1.96$ for the 95\% level. Posterior: fraction of epochs whose 95\% credible band on $\mu$ contains the truth. Held-out half: $C_d$ fitted on a random six of the twelve members and scored on the other six. Rescale $s$: the fitted factor on the within-method floor of eq.~\ref{eq:weaver}. $L$: fitted temporal correlation length of the residuals. Split $\hat R$: two Gibbs chains from different seeds, each split in halves, largest of the three scale hyper-parameters per realisation. A realisation redraws the additive noise on one fixed generating coda; the truth and the twelve configurations are the same in every realisation. Means with standard errors across realisations; no realisation failed; $\sigma_{C_d}$, bias and RMSE in percent; prior $\tau^2$ is the fraction of conditional posterior rate supplied by the prior scale term (the $\lambda$ ratio is below 0.01 throughout). Clock drift: $4\times10^{-5}$\,s/day from 40\% of the record. Shared source: a seasonal source effect warping the coda beyond 6\,s lapse with a spurious 0.2\% seasonal \dvv, seen by every configuration. Generated from the archived runs distributed with the paper.}
\label{tab:calibration}
\begin{tabularx}{\textwidth}{@{}Lrrr@{}}
\toprule
Quantity & clean ($n=200$) & shared source ($n=200$) & clock drift ($n=200$) \\
\midrule
Member 68\% & 0.808 $\pm$ 0.001 & 0.795 $\pm$ 0.001 & 0.804 $\pm$ 0.001 \\
Member 95\% & 0.9561 $\pm$ 0.0003 & 0.9496 $\pm$ 0.0004 & 0.9543 $\pm$ 0.0003 \\
Member 95\%, held-out half & 0.937 $\pm$ 0.004 & 0.930 $\pm$ 0.004 & 0.936 $\pm$ 0.004 \\
Posterior 95\% & 0.590 $\pm$ 0.004 & 0.340 $\pm$ 0.004 & 0.604 $\pm$ 0.004 \\
Median $\sigma_{C_d}$ (\%) & 0.225 $\pm$ 0.001 & 0.330 $\pm$ 0.001 & 0.222 $\pm$ 0.001 \\
Bias (\%) & -0.017 $\pm$ 0.001 & -0.045 $\pm$ 0.001 & -0.019 $\pm$ 0.001 \\
RMSE($\mu$) (\%) & 0.0669 $\pm$ 0.0005 & 0.161 $\pm$ 0.001 & 0.0656 $\pm$ 0.0005 \\
Rescale $s$ & 11.67 $\pm$ 0.03 & 12.70 $\pm$ 0.04 & 10.88 $\pm$ 0.03 \\
Correlation length $L$ (d) & 6.11 $\pm$ 0.03 & 6.18 $\pm$ 0.04 & 6.16 $\pm$ 0.03 \\
Split $\hat R$, largest of three & 1.024 $\pm$ 0.002 & 1.036 $\pm$ 0.005 & 1.030 $\pm$ 0.004 \\
Prior scale share $\tau^2$ & 0.09 $\pm$ 0.01 & 0.025 $\pm$ 0.005 & 0.08 $\pm$ 0.01 \\
\bottomrule
\end{tabularx}
Expand Down
15 changes: 15 additions & 0 deletions paper/data/bayes/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Checks of the Bayesian measurement model (audits UQ-03 and UQ-04)

Both files are produced from the manuscript's Fig. 14 realisation
(`codameter.uq_bayes._build_bayes`: seed 55, 2.5 years, SNR 7, 4-day cadence,
12-member ensemble).

- `duplication_check.json`, from `scripts/check_ensemble_duplication.py`: the
credible band on mu, the C_d scale, s, tau and the share of the precision of
mu supplied by the smoothness prior, for the ensemble as measured and with
every member duplicated and quadrupled.
- `cd_whitening.json`, from `scripts/check_cd_whitening.py`: raw and whitened
lag autocorrelations of the member residuals about mu, the whitened variance
under the full C_d and under its diagonal alone.

Rerun the two scripts to regenerate; each takes a few minutes.
Loading