specsrbench.figures¶
One module per paper figure, and the registry the CLI dispatches through.
Each module exposes build(cache=None, outdir=None) -> Path: it draws its
figure, prints the numbers the paper quotes from it, and returns the path it
wrote. Nothing else in the package imports one figure from another, so a
figure can be rebuilt on its own without dragging the rest of the suite in.
These were six Jupyter notebooks until 2026-08-25. Notebooks were a poor fit
for a product that has to rebuild identically: their outputs are committed
alongside their code, so a stale number can sit in a diff looking like data;
they cannot be imported, so five of the six carried a copied load() helper
and colour table; and “run all the figures” meant driving nbconvert and
parsing stdout to find out whether it had worked.
Module Attributes
figure name -> (module, output filename). |
|
|
Paper figure number -> registry name, for |
Functions
|
Build one figure by name or number. |
|
Build every figure, in paper order, returning what was written. |
|
Accept a registry name, a paper figure number, or |
- specsrbench.figures.REGISTRY: dict[str, tuple[str, str]] = {'mae': ('fig4_mae_summary', 'fig_mae_summary.pdf'), 'per-line-snr': ('fig5_per_line_snr', 'fig_jades_per_line_snr.pdf'), 'qualitative': ('fig2_qualitative', 'fig_jades_qualitative.pdf'), 'redshift': ('fig6_redshift_mae', 'fig_redshift_mae.pdf'), 'residuals': ('fig3_residual_maps', 'fig_residual_maps.pdf'), 'toy': ('fig1_toy_methods', 'fig_toy_1d.pdf')}¶
figure name -> (module, output filename). The name is what the CLI takes.