Skip to content

Paper output tooling: LaTeX dataset stats, sigma-fit figure, paper-ready convergence table#636

Merged
efahnestock merged 1 commit into
mainfrom
paper-output-formatting
Jul 2, 2026
Merged

Paper output tooling: LaTeX dataset stats, sigma-fit figure, paper-ready convergence table#636
efahnestock merged 1 commit into
mainfrom
paper-output-formatting

Conversation

@efahnestock

Copy link
Copy Markdown
Collaborator

Summary

Three small, cohesive additions to the paper-output scripts so the paper's tables + figures are regenerable end-to-end without hand-editing.

Changes

1. dataset_statistics.py — new --latex mode

Emits the paper's tab:dataset-stats in one shot. Reads editorial metadata (per-city Conditions blurb, VIGOR / rig markers, VIGOR pano-date override, Boston Snowy/Night date overrides) from a new `LATEX_PAPER_ROWS` dict; datasets discovered on disk but not in that dict emit with an empty Conditions cell so they're obvious-to-edit. Numeric fields (panos, sat patches, sat coverage km², trajectory km, pano/OSM landmarks, YY-MM dates) are derived from the same code path the ASCII summary uses, so the LaTeX numbers can't drift from the plain-text output.

Default `dataset_statistics` behavior (no `--latex`) is unchanged.

2. `sigma_paper_figure.py` — new `--sigma=value[:label]` overlay flag (repeatable)

Overlays one or more `HalfNormal(σ)` PDFs on the empirical residual histogram. Enables A/B comparisons of calibrated σ values — e.g. the σ=0.737 per-pair MLE vs the σ=0.4673 used by the canonical Ours variant of the paper.

Default behavior (no `--sigma`) still uses the per-pair MLE, unchanged.

Also finalizes the BUILD-registration/target: the `py_binary` entry was previously committed on main but pointed at an untracked source file, so `bazel build` of this target would fail on a fresh checkout. This PR fills that in.

3. `paper_convergence_plot.py` — paper-ready formatting in `print_summary_table`

Match the paper's hand-formatted style directly from the script:

  • 2-space indent inside `\begin{table*}`
  • `ljust`-padded data cells so the source columns visually line up (LaTeX ignores the extra whitespace; the diff stays clean when reviewers touch individual cells)
  • Caption reads `"…mean $\pm$ 95\% CI using standard error of the mean.…"` — explicit about how the interval is built (`1.96 * SEM`, normal approximation).

All figure rendering behavior is unchanged; only the LaTeX table's whitespace + caption change.

Test plan

  • `bazel build //experimental/overhead_matching/swag/scripts:{paper_convergence_plot,sigma_paper_figure,dataset_statistics}` — all three build clean.
  • Re-rendered the canonical paper figure + LaTeX table from the four-method eval set with the new script — matches the on-disk `table.tex` at `.../260522_full_rerun_no_hinge/figures/cosmos_no_hinge_sigma0.46/` bit-for-bit.
  • `dataset_statistics.py --latex` produces the paper's `tab:dataset-stats` rows verbatim; the ASCII summary output is unchanged.
  • `sigma_paper_figure.py --sigma=0.737:MLE --sigma=0.4673:canonical` overlays both PDFs and prints per-σ vertical lines; no `--sigma` still uses the MLE.

…ady convergence table

Three small, cohesive additions to the paper-output scripts so the paper's
tables + figures are regenerable end-to-end without hand-editing:

- **dataset_statistics.py**: new `--latex` mode emits the paper's
  `tab:dataset-stats` in one shot. Reads editorial metadata (per-city
  Conditions blurb, VIGOR / rig markers, VIGOR pano-date override, Boston
  Snowy / Night date overrides) from a `LATEX_PAPER_ROWS` dict; datasets
  discovered on disk but not in that dict emit with an empty Conditions
  cell so they're obvious-to-edit. Numeric fields (panos, sat patches,
  sat coverage km², trajectory km, pano/OSM landmarks, YY-MM dates) are
  derived from the same code path the ASCII summary uses, so the LaTeX
  numbers can't drift from the plain-text output.

- **sigma_paper_figure.py**: new `--sigma=value[:label]` repeatable flag
  overlays one or more HalfNormal(σ) PDFs on the empirical residual
  histogram. Useful for A/B comparing calibrated σ values (e.g. the
  σ=0.737 per-pair MLE vs the σ=0.4673 used by the canonical `Ours`).
  Default behavior (no `--sigma`) still uses the per-pair MLE, unchanged.

- **paper_convergence_plot.py** (`print_summary_table`): match the paper's
  hand-formatted style. 2-space indent inside `\begin{table*}`, ljust
  padding on data rows for visual column alignment in the source (LaTeX
  ignores it; the diff stays clean when reviewers touch cells). Caption
  reads "mean $\pm$ 95\% CI using standard error of the mean" to be
  explicit about how the interval is built.
@efahnestock efahnestock merged commit 9118b26 into main Jul 2, 2026
3 checks passed
@efahnestock efahnestock deleted the paper-output-formatting branch July 2, 2026 15:49
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.

1 participant