Advanced: brightness graph and metal content
Advanced: build your own spectrum, or classify from survey colors
MORE TO EXPLORE
When you're ready for more.What a spectrum is
A spectrum is light spread out by color (wavelength), like a prism making a rainbow. Every atom and molecule absorbs light only at its own set of wavelengths, so dark lines work like fingerprints. Hydrogen always absorbs at 656.3 nm, sodium at 589.0 and 589.6 nm, and so on.
Stars: temperature first, ingredients second
A star's overall color comes from its temperature: hot stars glow blue, cool stars red (the blackbody or Planck curve). The pattern of lines comes mostly from temperature too, because heat decides which atoms are in a state to absorb visible light. That's why astronomers sort stars into the O B A F G K M sequence by their lines.
Once the temperature is known, line depths give the composition. The standard measure is iron, written [Fe/H]: 0 means the Sun's share of iron, −1 a tenth of it, +0.3 double.
Why it matters for planets: a transit tells you a planet's size compared with its star. Turning that into kilometers needs the star's size, which comes from its spectrum. Metal-rich stars are also more likely to host giant planets (Fischer & Valenti 2005).
Asteroids: reflected sunlight
Asteroids are seen by reflected sunlight, so astronomers divide their spectrum by the Sun's to get reflectance. Silicate minerals make dips near 1 µm (olivine and pyroxene) and 2 µm (pyroxene). Carbon-rich surfaces are dark and nearly flat. Organic-rich outer-solar-system bodies are very red. These shapes define the Bus-DeMeo classes (DeMeo et al. 2009), and samples returned by Hayabusa (Itokawa), Hayabusa2 (Ryugu) and OSIRIS-REx (Bennu) confirmed what the classes mean.
Why it matters for planetary defense: composition hints at density and structure. Whether an asteroid is solid rock or a loose rubble pile changes how much a spacecraft impact moves it; NASA's DART mission showed that debris thrown off the target can multiply the push.
What this lab simplifies
- Star spectra are a teaching model: a blackbody times a few dozen of the strongest lines, with strengths that follow the real temperature pattern. Real spectra have thousands of lines, and gravity, rotation and magnetic fields also shape them.
- Spectral class comes from temperature alone; real classification also uses a luminosity class (dwarf, giant, supergiant).
- Asteroid curves are smooth templates that capture each class's shape, not averaged survey spectra. Colors from them use filter centers only.
- The color rule (Ivezić et al. 2001) gives a rough group, not a class. Many asteroids sit near the boundaries.
- Uploaded spectra are matched against 123 real stars, not this model. The library is thin on cool red dwarfs and has no old blue horizontal-branch stars, so those match less closely. Temperatures come from the matched star's type, so they are approximate (a few hundred kelvin), and metal content isn't measured.
Uploading a spectrum
Your spectrum is compared with 123 real stellar spectra, mostly from the Indo-US library of stars observed at Kitt Peak, as packaged by the Sloan Digital Sky Survey for its own classifications. Each library star is gently reshaped by a smooth curve to allow for differences in flux calibration and dust, and the features astronomers classify by (hydrogen, helium, calcium, magnesium, sodium and molecular bands) count extra. Element lines are measured directly in your file against their surroundings. Tested on 11 SDSS stars from O to M: the median error is 1 subclass (6 within one subclass, 8 within three), against 5 for the lab's first, physics-model classifier; a G2 came out F8, and two faint “A0” and “B9” stars (probably blue horizontal-branch stars) came out as B stars. Full results and the script to rerun them are on the Evidence page.
Pictures of a spectrum (a rainbow strip with dark lines, like the classic diagram of the Sun's Fraunhofer lines) are read too. The lab finds the colorful strip, guesses the wavelength scale from its colors, then slides and stretches that scale until the dark lines line up with well-known ones such as calcium H and K, hydrogen, sodium and the oxygen bands of Earth's air. Because drawings show where lines are but not how strong they are, pictures are matched on the pattern of lines only, and the answer is a good guess rather than a measurement. You can correct the wavelength scale by hand if your picture has one.
Text files need a column of wavelengths and a column of brightness; headers, extra columns (errors, sky), quoted values and decimal commas are fine, and JSON or VOTable exports work too. Wavelengths can be in ångströms, nanometers, microns or log₁₀ ångströms; the lab works out which from their size. FITS files can be 1D images with a wavelength solution, LAMOST-style stacked images, or tables with wavelength and flux columns, such as SDSS spectra; .gz files are unzipped in the browser. Nothing is uploaded to a server.
References
- Ballesteros, F. J. 2012, EPL 97, 34008: temperature from B−V color.
- Wyman, C., Sloan, P.-P. & Shirley, P. 2013, JCGT 2(2): fitted color-matching functions used for star colors.
- DeMeo, F. E. et al. 2009, Icarus 202, 160: the Bus-DeMeo asteroid taxonomy.
- Ivezić, Ž. et al. 2001, AJ 122, 2749: asteroid colors in the Sloan Digital Sky Survey.
- Fischer, D. A. & Valenti, J. 2005, ApJ 622, 1102: the planet–metallicity correlation.
- Valdes, F. et al. 2004, ApJS 152, 251: the Indo-US library of coudé feed stellar spectra.
- Star templates: SDSS spEigenStar-55734 from the SDSS idlspec2d pipeline. Example star: SDSS DR17, plate 2904, MJD 54574, fiber 109. Funding for SDSS has been provided by the Alfred P. Sloan Foundation, the participating institutions, the National Science Foundation and the U.S. Department of Energy; see sdss.org.
Code: spectra/ in the SpaceSift repository. Everything runs in your browser.