A Python toolkit for downloading and visualizing stellar spectra from the Sloan Digital Sky Survey (SDSS) Data Release 18, focused on F-type stars with effective temperatures around 6500 K.
- Interactive Sky Map - Explore star positions, hover to see spectra
- Spectrum Gallery - Browse all spectrum plots
- Publication-quality plots with labeled spectral absorption lines
- Major features marked: Balmer series (Hα, Hβ, Hγ, Hδ), Ca II H & K, Na D, Mg I b
- Color-coded line markers by element type
- Noise panel showing flux uncertainty (σ = 1/√ivar) vs wavelength
- Stellar parameters displayed: Teff, log g, [Fe/H], coordinates, S/N
- Plotly-based HTML visualization of star positions (RA vs Dec)
- Points colored by metallicity [Fe/H] using Viridis colorscale
- Hover over any star to see its full spectrum as a popup
- Proper astronomical convention (RA increases right-to-left)
- Python 3.9+
- numpy
- matplotlib
- astropy
- plotly
Generate spectrum plots for all FITS files:
/opt/miniconda3/envs/py39/bin/python plot_spectra.pyGenerate the interactive sky map:
/opt/miniconda3/envs/py39/bin/python sky_map.pyspectrum_plots/- PNG plots for each spectrumspectrum_plots/index.html- Gallery view of all spectrasky_map.html- Interactive sky map with spectrum popups
The dataset contains 100 F-type stars from SDSS DR18 with:
- Effective temperature: Teff ≈ 6500 K
- Surface gravity: log g ranging from ~2.2 to ~4.4
- Metallicity: [Fe/H] from -3.1 to 0.0
- Signal-to-noise: 10 to 111
Stellar parameters are stored in spectra_metadata.json and were obtained from the SDSS Stellar Parameter Pipeline (SSPP).
├── plot_spectra.py # Spectrum plotting script
├── sky_map.py # Interactive sky map generator
├── spectra_metadata.json # Stellar parameters (Teff, log g, [Fe/H], etc.)
├── spec-*.fits # SDSS spectrum FITS files
├── spectrum_plots/ # Generated PNG plots
│ └── index.html # Gallery view
└── sky_map.html # Interactive sky map
MIT