Dataset Viewer
Auto-converted to Parquet Duplicate
Search is not available for this dataset
image
image

specsr-roman training data — Roman grism spectra from OpenUniverse2024

Code PyPI Python Docs DOI License: MIT Model weights

Paired low-resolution Roman grism spectra and their noiseless ground-truth SEDs, for training and evaluating spectral super-resolution. Built with specsr-roman; the models trained on it are at aryana-haghjoo/roman-spectral-superresolution.

Spectra 36,404
Unique galaxies 15,434
Redshift 0.036 – 3.005 (median 0.765; 35 % above z = 1)
Depth AB(H158) 14.7 – 22.5
Pointings 5 visits × 18 SCAs, healpix 10307
Median extraction S/N 0.50

The specsr-roman pipeline in three bands: simulating the training data (OpenUniverse2024 SEDs dispersed through the Wang+2022 grism model, extracted with grizli into 36,404 LR-HR pairs); spectral super-resolution (SR1, a conservative 1D residual CNN emitting mean and log-variance, refined by SR2, an attention network with one token per emission line); and the redshift branch (a ZHead taking the coarse spectrum plus three Roman bands and emitting P(z), whose top modes gate which lines SR2 may draw).

Files

File Size What
ou2024_h10307_dataset.npz 271 MB the dataset
tutorial/ou2024_h10307_tutorial.npz 3.8 MB a 512-row held-out sample, for the tutorial notebook
splits/group_split_41dd131a0fd7750d29dd54c4920cb871.npz 0.3 MB the canonical train/test split
pred_cache.npz 335 MB frozen test-split predictions of the published chain

pred_cache.npz lets you reproduce every published figure and metric without a GPU or the model weights:

import numpy as np
from huggingface_hub import hf_hub_download
from specsr_roman.evaluation import line_amplitude_recovery, redshift_summary

c = np.load(hf_hub_download("aryana-haghjoo/romansr-data", "pred_cache.npz",
                            repo_type="dataset"))
redshift_summary(c["z_pred"], c["z_true"])
# {'nmad': 0.0065, 'median_abs_dz': 0.0047, 'catastrophic_frac': 0.0509, 'n': 7334}

The tutorial subset

If you want to try the model rather than train one, start with the 3.8 MB sample instead of the full 271 MB:

path = hf_hub_download("aryana-haghjoo/romansr-data",
                       "tutorial/ou2024_h10307_tutorial.npz", repo_type="dataset")

512 spectra of 476 galaxies, same schema as the full file plus a source_row column recording where each row came from in it.

Two properties of the sampling matter more than its size. It is drawn from the held-out side of the canonical object-id split, so metrics computed on it are honest out-of-sample numbers rather than a measure of memorisation. And it is a uniform random draw within that split — not a selection of bright objects or strong lines — so it keeps the population's real mix of recoverable and undetectable lines. That mix is exactly what the recoverability-binned line-recovery metric needs in order to mean anything: a hand-picked set of pretty spectra would make any model look good.

It drives the getting-started notebook, which goes from install to the published numbers in about two minutes on a CPU. Rebuild the subset with python scripts/make_tutorial_dataset.py.

Schema

Every row lives on two shared wavelength grids, so any two spectra are directly comparable.

Key Shape Meaning
flux_low (36404, 864) extracted grism spectrum, native ~10.764 Å sampling
flux_low_err (36404, 864) its 1σ uncertainty
flux_high (36404, 2500) ground-truth SED — the super-resolution target
redshift (36404,) true redshift
ids (36404,) OU2024 object_idsplit on this
phot (36404, 14) catalogue fluxes (see band order below)
ab_h158 (36404,) AB magnitude in H158
snr (36404,) median extraction S/N
visit, sca (36404,) provenance
wavelength_low (864,) 10000–19290 Å
wavelength_high (2500,) 10000–19300 Å
phot_bands (14,) photometry column names

There is no flux_high_err: the targets are noiseless simulated SEDs.

Flux units are internal to the simulation and are not calibrated across flux_low and flux_high — they differ by roughly 20 orders of magnitude. Only the shape is meaningful; normalise each spectrum before use, which is what specsr_roman.data.RomanFixedGridDataset does.

Photometry band order

0-5    LSST   u  g  r  i  z  y
6-13   Roman  R062  Z087  Y106  J129  W146  H158  F184  K213

⚠️ Two traps.

  1. OU2024 uses the old Roman band names, which collide with the current WFI scheme: OU2024 R062 is 0.62 µm (current F062) and OU2024 W146 is the current wide filter R062. Map by central wavelength, never by name.
  2. Feeding a model every band means giving it an effectively complete, noiseless SED — the redshift can be read off without the spectrum contributing anything, which measures the catalogue rather than the instrument. Restrict to bands that ship with the grism (Roman Medium tier: indices 8, 9, 11) and add realistic noise.

Splitting

Split by object, never by row. The same galaxy appears in several visits as independent noise realisations; a row-wise split puts one realisation in train and another in test, and measures memorisation.

from specsr_roman.data import get_or_make_group_split
train_idx, test_idx, _ = get_or_make_group_split(path, data["ids"])

Membership is a pure hash of the object id, so it is reproducible without the split file and stable under dataset growth. The included split file is the canonical one: 29,070 train / 7,334 test rows (12,336 / 3,098 galaxies).

How it was built

OpenUniverse2024 provides Roman direct images, truth catalogues and Diffsky SEDs, but no grism images. specsr-roman disperses the scene itself with grizli using the Wang et al. (2022) Roman.G150.conf, then extracts it back.

Because the same configuration disperses and extracts, input and target are self-consistent by construction: any residual is noise, blending or the extraction, not a mismatched instrument model.

Per (visit, SCA):

  1. OU2024 H158 image → grizli direct frame (counts → e⁻/s, flat sky removed) plus an empty grism shell sharing its WCS.
  2. photutils detection, KD-tree matched to the truth index.
  3. Every source brighter than AB 23.0 dispersed with its true Diffsky SED.
  4. Roman grism noise: Poisson (source + 0.57 e⁻/s/pix zodiacal) plus 8.5 e⁻ read noise, at a 301 s single-exposure depth.
  5. Per target (AB < 22.5): re-dispersed alone and subtracted from the scene for exact contamination, then optimally extracted and flux-calibrated against a flat-f_λ pass through the same beam.

Reproduce with specsr-roman extract run then specsr-roman extract merge.

Limitations

  • One simulation's manifold. Targets are Diffsky model SEDs with that simulation's line physics and dust treatment. A model can score well by learning the manifold rather than by measuring anything — see the prior-dominance audit in specsr-roman.
  • Single-visit depth. Noise is a 301 s single grism exposure, not the full HLSS coadd, so the S/N distribution is pessimistic relative to the final survey.
  • One healpix. All 15,434 galaxies come from healpix 10307, so large-scale environmental diversity is limited.
  • Photometry is catalogue truth, noiseless as delivered. Add noise before using it; the dataset does not.

Citation

Please cite the specsr-roman repository, together with the sources of the underlying simulation:

  • Troxel et al. (2025), OpenUniverse2024, arXiv:2501.05632
  • Wang et al. (2022), The High Latitude Spectroscopic Survey on the Nancy Grace Roman Space Telescope, ApJ 928, 1

License

MIT, matching the code. The underlying OpenUniverse2024 products carry their own terms — see the link above.

Downloads last month
177

Paper for aryana-haghjoo/romansr-data