Datasets:
image image |
|---|
specsrbench tutorial sample
24 held-out JWST/NIRSpec spectra from JADES DR4, and everything needed to run
the specsrbench
benchmark on them: seven classical deconvolution methods and one deep-learning
pipeline, scored against real grating spectra.
This is the data behind the package's tutorial notebook. It is a teaching sample, not the benchmark's evaluation set.
The methods this sample lets you run, on a 1-D toy where the truth is known: a close doublet the instrument blends into one blob, and a weak isolated line. Each panel is one method, labelled with the equation that defines it. The notebook runs these same deconvolvers on the 24 real spectra below.
Use
pip install "specsrbench[tutorial]"
from specsrbench.sample import load_sample
s = load_sample() # downloads this file, then caches it
print(s.summary())
recon = s.reconstruct() # all six classical methods, tuned parameters
No torch and no survey data are needed: the SR2 predictions are precomputed and the matched filter's line list travels with the archive.
Contents
One file, specsrbench_sample.npz (1.9 MB), 24 spectra × 6,671 pixels on a
logarithmic R = 4000 grid spanning 1.0–5.3 µm.
| array | contents |
|---|---|
x_low |
prism input (R ~ 100) on the fine grid — the input, and the do-nothing baseline |
x_high |
grating reference (R ~ 1000) — what every method is scored against |
x_high_err |
reference flux uncertainty, NaN where invalid |
sr2 |
the SR2 deep-learning prediction, precomputed |
valid |
pixels where the reference is real rather than padding |
wave |
the wavelength grid, in microns |
sigma_pix |
the measured line-spread function, in detector pixels |
z, z_pred |
spectroscopic redshift, and the redshift head's estimate |
mf_lines |
rest wavelengths the matched filter uses |
params |
the tuned classical parameters, as the tuner recorded them |
provenance |
what these spectra are, and what produced the arrays beside them |
How the galaxies were chosen
The 572-spectrum evaluation set, sorted by redshift and sampled at evenly spaced ranks. So they are:
- held out of training by construction — the split is group-wise, by galaxy;
- not used for tuning the classical parameters, which were chosen on a disjoint 40-spectrum set;
- not cherry-picked — they span z = 0.31 to 13.86 rather than being selected for how good they look.
That last point matters, because the notebook prints performance numbers. A tutorial that reports line recovery off a hand-picked set of bright galaxies is quietly claiming something the benchmark does not support.
Two things to know before quoting a number
These are 24 galaxies, not 572. The ordering of the methods reproduces the paper's and so does the lesson — the deep-learning model leads mean absolute error by ~30% at well under the reference's amplitude, and ranks last once that is corrected for. The individual figures carry a small sample's error bar and are not the paper's.
Absolute flux scale is not part of this problem. Every spectrum is per-spectrum z-scored, which is what makes an error metric comparable across galaxies whose brightnesses differ by orders of magnitude. Nothing in this package predicts the flux scale.
The kernel
sigma_pix is the measured LSF, in detector pixels. This is worth stating
because getting it wrong is not a subtle error: an LSF that is instead roughly
constant in wavelength is more than a factor of two too broad at the red end,
and deconvolving with it merges line pairs that the input still resolves.
Related
- Code: https://github.com/aryana-haghjoo/specsr-benchmark · PyPI · docs
- Model weights: https://huggingface.co/aryana-haghjoo/specsr
- Paper 1: Haghjoo, A., Hemmati, S., Mobasher, B., et al., Learning to See Sharper: A Physics-Informed Artificial Intelligence Framework for Super-Resolving Galaxy Spectra, arXiv:2603.18357
- Paper 2: Sharper at What Cost? Benchmarking Deep Learning Against Classical Deconvolution for Galaxy Spectral Super-Resolution — in preparation.
Source data
Derived from JADES DR4 public JWST/NIRSpec products. Please cite the JADES survey papers for the underlying observations.
License
MIT, as for the specsrbench package.
- Downloads last month
- 80
