specsr-roman models — v0.6.1
Install pip install "specsr-roman[hub]>=0.6.1".
from specsr_roman import RomanPipeline
pipe = RomanPipeline.from_pretrained()
out = pipe.predict(flux_low, flux_low_err, phot=roman_medium_fluxes)
The default pipeline uses the three _independent checkpoints listed below.
All nine new checkpoints include a portable training config and a
model.provenance.json sidecar with the dataset and weight hashes.
Previous checkpoints remain available under their original names for older
software; they are not the v0.6.0 default.
Release 0.6.0
Version 0.6.0 uses the independently trained chain
sr1_ou2024_v6_independent → zhead_ou2024_roman_med3_noisy_independent → sr2_ou2024_v5_romanonly_independent.
The dataset contains 23,845 spectra of 10,039 galaxies detected in H158, selected by true Hα or [O III] λ5007 flux above 10⁻¹⁶ erg s⁻¹ cm⁻². The galaxy-grouped split has 19,134 training spectra (8,042 galaxies), 2,327 validation spectra (992 galaxies), and 2,384 reserved test spectra (1,005 galaxies). Checkpoints were selected on validation only; all nine models were frozen before test predictions were generated. Evaluation uses 0.05 mag Roman photometric noise and the configured Rubin coadd noise. The previous 4,711-spectrum results used the checkpoint-selection partition and must be read as validation results.
Redshift — every reserved test spectrum, no S/N cut
| Configuration | NMAD | Catastrophic outliers |
|---|---|---|
| Grism + Roman F106/F129/F158 | 0.00133 | 0.67% (16/2,384) |
| + Rubin ugrizy, Year 1 | 0.00120 | 0.042% (1/2,384) |
| + Rubin ugrizy, Year 10 | 0.00123 | 0.042% (1/2,384) |
| Nine-band photometry-only redshift control | 0.01152 | None in 2,384 spectra |
Catastrophic means |Δz|/(1+z) > 0.15. The control removes the spectrum from the redshift head; its SR2 still reads the spectrum. No observed outliers in this finite sample does not imply a zero population outlier rate.
Line amplitude recovery — Roman three-band chain
Median recovered/true flux in detected line regions, binned by the best integrated line S/N in the grism. Lines below S/N 2 are excluded.
| Recoverability | n | SR1 | SR2 |
|---|---|---|---|
| Marginal (2–3) | 764 | 0.58 | 0.90 |
| Good (3–6) | 710 | 0.78 | 0.94 |
| Strong (>6) | 345 | 0.81 | 0.89 |
| SR2 configuration | Marginal / good / strong recovery |
|---|---|
| Roman three bands | 0.90 / 0.94 / 0.89 |
| + Rubin Year 1 | 0.90 / 1.01 / 0.98 |
| + Rubin Year 10 | 0.84 / 0.94 / 0.95 |
| Photometry-only redshift control | 0.82 / 0.94 / 0.93 |
Frozen test caches, exact metrics, the split record and weight provenance are available with the dataset and models. Version 0.6.1 completes the audits of these weights. The Roman SR2 deployed line-response exponent is 0.098 (galaxy-grouped 95% bootstrap interval 0.089–0.106; 0.255 for strong lines), compared with 1 for proportional recovery. The nominal central 68% redshift interval covers 98.7% of test truths. Spectral coverage is 75.5% within 1σ overall and 92.1% within 1.96σ in detected-line regions. These are diagnostics; no recalibration was fitted on the test data. Full audits, normalization controls and records document the remaining limitations. Output line fluxes and ratios are not yet calibrated measurements.
Checkpoints
checkpoints/sr1_ou2024_v6_independent/model.pthcheckpoints/sr2_ou2024_v5_photonly_rubin_y10_independent/model.pthcheckpoints/sr2_ou2024_v5_romanonly_independent/model.pthcheckpoints/sr2_ou2024_v5_rubin_y10_independent/model.pthcheckpoints/sr2_ou2024_v5_rubin_y1_independent/model.pthcheckpoints/zhead_ou2024_photonly_rubin_y10_independent/model.pthcheckpoints/zhead_ou2024_roman_med3_noisy_independent/model.pthcheckpoints/zhead_ou2024_roman_med3_rubin_y10_independent/model.pthcheckpoints/zhead_ou2024_roman_med3_rubin_y1_independent/model.pth
Completed audits — v0.6.1
The nine checkpoint binaries and four prediction caches are unchanged. The v0.6.0 tags preserve the earlier release. The v0.6.1 tags include the completed audits and expanded provenance.
The reserved galaxies appeared in historical validation during development; this is not a fully prospective or cross-simulation test.
Full audit report · Exact summary and records
Response to changing a line
The strongest target line is halved or doubled, its difference is smoothed with the Gaussian grism LSF and added to the input in extraction units. The original errors and each source's noisy photometry are held fixed. Audit noise draws use per-source iteration; frozen prediction caches use batches. The primary response includes the deployed input-dependent LR restoration. Eligibility requires best-line expected S/N ≥ 2 and positive baseline recovery of at least 20% in both stages. All 1,819 candidate spectra were attempted. This approximates spectral injection; it does not repeat 2D morphological dispersion.
| Configuration | Eligible spectra | SR1 median r | SR2 median r (95% bootstrap) | SR2, strong lines |
|---|---|---|---|---|
| Roman three bands | 1,786 | 0.220 | 0.098 (0.089–0.106) | 0.255 |
| + Rubin Year 1 | 1,786 | 0.220 | 0.147 (0.136–0.158) | 0.306 |
| + Rubin Year 10 | 1,786 | 0.220 | 0.188 (0.178–0.200) | 0.381 |
| Photometry-only redshift | 1,786 | 0.220 | 0.158 (0.147–0.172) | 0.289 |
Intervals use 1,000 galaxy-grouped bootstrap draws (seed 0), retaining all visits and perturbations of each sampled galaxy. Medians pool spectrum/factor responses. Strong lines have original expected S/N > 6.
| Configuration | SR2 r, halving | SR2 r, doubling |
|---|---|---|
| Roman three bands | 0.098 | 0.098 |
| + Rubin Year 1 | 0.146 | 0.147 |
| + Rubin Year 10 | 0.205 | 0.166 |
| Photometry-only redshift | 0.148 | 0.173 |
Response 1 means proportional output change in the selected restoration; response 0 means no output change. Low response to an injection below the noise can be appropriate. Original and injected-change S/N breakdowns are retained in the JSON and per-response records. A pooled exponent is not a fraction of flux attributable to a learned prior, nor a single doubling prediction.
Normalization control
Fixed-target restoration holds the target mean and scale constant and isolates normalized network output. Input normalization can remove amplitude changes even for an identity estimator, so this is not a corrected physical response. The comparison below matches valid source IDs and perturbation factors.
| Configuration | Matched SR2 responses | Deployed r | Fixed-target r |
|---|---|---|---|
| Roman three bands | 3,457 | 0.096 | 0.043 |
| + Rubin Year 1 | 3,462 | 0.143 | 0.086 |
| + Rubin Year 10 | 3,465 | 0.184 | 0.132 |
| Photometry-only redshift | 3,464 | 0.156 | 0.096 |
Uncertainty coverage
These are coverage diagnostics, not a fitted correction. Gaussian reference coverage is 68.27% within 1σ and 95% within 1.96σ. Redshift coverage uses the central 68% P(z) interval with uniform density within each 0.01-wide bin. Bin-midpoint coverage and randomized PIT diagnostics are also retained.
| Configuration | All pixels, 1σ | Detected-line pixels, 1σ | Detected-line pixels, 1.96σ | Redshift central 68% |
|---|---|---|---|---|
| Roman three bands | 75.5% | 77.8% | 92.1% | 98.7% |
| + Rubin Year 1 | 81.1% | 74.8% | 91.2% | 99.4% |
| + Rubin Year 10 | 86.8% | 68.5% | 86.6% | 99.4% |
| Photometry-only redshift | 81.7% | 73.2% | 90.4% | 86.7% |
P(z) intervals over-cover this sample; their bin width also limits local precision. Spectral uncertainties are conservative in aggregate but miss nominal 95% coverage in detected-line tails. One global variance scale is not established by these results. Any fitted recalibration needs validation data and a separate evaluation; none was fitted on the test partition.
Unsupported-emission proxies
The diagnostic uses truth-centered, overlapping Gaussian windows (σ = 0.005 µm), smoothed-continuum subtraction, and a threshold of 5 in standardized weighted-sum units. Off-grid windows are excluded. These proxies are not blind line-search false-positive rates.
| Configuration | Weak-target windows above threshold | Present but expected S/N < 2, above threshold |
|---|---|---|
| Roman three bands | 24/3,859 (0.62%) | 1,572/4,325 (36.3%) |
| + Rubin Year 1 | 12/3,859 (0.31%) | 1,513/4,325 (35.0%) |
| + Rubin Year 10 | 16/3,859 (0.41%) | 1,579/4,325 (36.5%) |
| Photometry-only redshift | 24/3,859 (0.62%) | 1,629/4,325 (37.7%) |
Line recovery against simulated targets remains distinct from measuring physical line fluxes. The weak perturbation response, uncertainty mismatch, historical development exposure, and simulation domain limit scientific use.
Citation
Please cite the specsr-roman
repository and Haghjoo et al. (2026), Learning to See Sharper: A
Physics-Informed Artificial Intelligence Framework for Super-Resolving Galaxy
Spectra, ApJ (arXiv:2603.18357), the
method paper for the JWST original.