API referenceΒΆ

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

specsr.inference.pipeline

The user-facing inference pipeline: LR spectrum in, SR spectrum and redshift out.

specsr.paths

Filesystem locations used by specsr.

specsr.checkpoints

On-demand model weight fetching from the Hugging Face Hub.

specsr.config

Configuration loading for the training stages.

specsr.runtime

Environment-variable overrides for the training scripts.

specsr.metrics

Residual and power-spectrum statistics used by the paper figures.

specsr.linefit

Gaussian emission-line fitting, and the S/N derived from it.

specsr.data.grid

The common wavelength grid, and flux-conserving resampling onto it.

specsr.data.augment

Augmentation of paired spectra, with explicit provenance.

specsr.data.build

Build paired training products from the raw JADES release.

specsr.data.ingest

Discovery and reading of raw JADES NIRSpec x1d products.

specsr.data.stitch

Combine the medium gratings into one high-resolution reference.

specsr.data.datasets

Torch datasets over the paired spectra products.

specsr.data.splits

Group-aware train/test splitting for the augmented spectra datasets.

specsr.models.blocks

Building blocks shared across the SR1, ZHead and SR2 architectures.

specsr.models.sr1

SR1 β€” the super-resolution backbone (stage 1 of 3).

specsr.models.zhead

ZHead β€” redshift inference from a super-resolved spectrum (stage 2 of 3).

specsr.models.sr2

SR2 β€” physics-informed residual refiner (stage 3 of 3).

specsr.models.lines

Rest-frame spectral feature catalogue.

specsr.training.losses

Loss functions for the SR1 and SR2 stages.

specsr.training.ztransform

Redshift normalisation and bounded decoding.

specsr.training.zhead_sources

Input representations for the redshift head.