API referenceΒΆ

Leaf modules are listed explicitly rather than recursively: several names are re-exported from their package __init__, and a recursive sweep documents those objects twice, which Sphinx reports as a duplicate description.

specsrbench.paths

Where the inputs and outputs live, and how they are found.

specsrbench.methods

The nine reconstructions, their display names, and the keys they are cached under.

specsrbench.metrics

Reconstruction metrics, and the four guards that keep tuning honest.

specsrbench.classical

Classical deconvolution methods, parameterised for the log constant-R grid.

specsrbench.data

Loading the tuned cache: one object, loaded once, shared by every figure.

specsrbench.sample

The small tutorial dataset: 24 held-out spectra, fetched from the Hub.

specsrbench.style

The one matplotlib style every figure in the paper uses.

specsrbench.cli

specsrbench -- one entry point for every product in this repository.

specsrbench.figures

One module per paper figure, and the registry the CLI dispatches through.

specsrbench.figures.fig1_toy_methods

Figure 1 -- the eight methods on a 1D toy, where the truth is known exactly.

specsrbench.figures.fig2_qualitative

Figure 2 -- one held-out galaxy, every method, with an [O III] inset.

specsrbench.figures.fig3_residual_maps

Figure 3 -- residual maps: every held-out spectrum, sorted by redshift.

specsrbench.figures.fig4_mae_summary

Figure 4 -- global reconstruction fidelity, three ways.

specsrbench.figures.fig5_per_line_snr

Figure 5 -- per-line behaviour: S/N, detection, false detection, width bias.

specsrbench.figures.fig6_redshift_mae

Figure 6 -- reconstruction error against redshift.

specsrbench.build

Rebuilding the cache the figures read, from JADES DR4 and the Hub.

specsrbench.build.predictions

Stage 1 -- run the specsr chain over the held-out split, from Hub weights.

specsrbench.build.sets

Stage 2 -- cut the predictions into the three galaxy-disjoint sets.

specsrbench.build.lsf

Derive the prism->grating line-spread function from the instrument itself.

specsrbench.build.tune

Retune the classical deconvolution hyperparameters against all four guards.

specsrbench.build.classical_cache

Rebuild the classical caches on the log constant-R grid with retuned parameters.

specsrbench.build.lines

Assemble a drop-in cache on the log constant-R grid: arrays, line fits, S/N.