Virginia Research Institute
Virginia Research Institute
Virtual Laboratory  ·  Built by E2 Innovations
← Back to Virtual Labs | Light and Spectroscopy
Astronomy

Light and Spectroscopy

Almost everything we know about the stars comes from their light. By spreading light into a spectrum we can read a distant object’s temperature, composition, and motion without ever touching it. In this lab you will work with the electromagnetic spectrum, identify an element from its spectral lines, and measure how fast a source is moving toward or away from us using the Doppler shift.

Theory — Light and Spectroscopy

Light is an electromagnetic wave. Its wavelength (λ) and frequency (ν) are linked by the speed of light, and its energy per photon grows with frequency:

Wave and photon relations c = λ ν    (c = 3.00 × 108 m/s)
E = h ν    (h = 6.63 × 10-34 J s)
Shorter wavelength means higher frequency and higher energy.

1. The electromagnetic spectrum

From longest to shortest wavelength: radio, microwave, infrared, visible, ultraviolet, X-ray, and gamma ray. Visible light runs from about 400 nm (violet) to 700 nm (red). Each region carries different information, which is why astronomers observe across the whole spectrum.

2. Three kinds of spectra (Kirchhoff’s laws)

A hot, dense source (like the interior of a star) gives a continuous spectrum, an unbroken rainbow. A hot, thin gas gives an emission spectrum, bright lines at specific wavelengths. A cool, thin gas in front of a continuous source gives an absorption spectrum, dark lines at those same wavelengths. The pattern of lines is a fingerprint of the elements present.

3. Spectral lines as fingerprints

Each element’s electrons can occupy only certain energy levels, so it absorbs and emits only certain wavelengths. Hydrogen, helium, sodium, and every other element have their own line pattern. Matching the observed lines to laboratory patterns tells you what a star is made of.

4. The Doppler shift

If a source moves toward us, its light waves are compressed and the lines shift to shorter wavelengths (blueshift); if it moves away, they stretch to longer wavelengths (redshift). For speeds much less than light, the radial velocity is:

Doppler formula (non-relativistic) v = c × (λ − λ0) / λ0
  λ0 = rest wavelength, λ = observed wavelength
v > 0 means receding (redshift); v < 0 means approaching (blueshift)

Apparatus

Spectroscopy uses instruments to disperse light and record where the lines fall. In the simulation these are modelled, but the spectra correspond to what each instrument would record.

Prism
A glass prism that bends short wavelengths more than long ones, spreading white light into a spectrum.
Diffraction grating
A ruled grating that separates light into a spectrum by interference; used in most modern spectrographs.
Spectroscope
An eyepiece instrument that disperses light so the observer can see the spectral lines directly.
Gas discharge tube
A thin gas excited by electricity, giving a bright-line emission spectrum used as a reference.
Collimator slit
A narrow slit and lens that produce a clean parallel beam so the spectral lines are sharp.
Detector / CCD
A digital detector that records the intensity of light at each wavelength as a measurable spectrum.

Instructions

Work through both tabs. Record your values, and for each task reason or calculate first, then use the button to compare with the simulation.

Part A — Identify the element

Part B — Doppler shift

Part C — 3D Doppler shift and observed wavelength

Simulation

Spectroscopy BenchReason or calculate first, then check against the simulation.

A moving source shifts the wavelengths of its light: λ = λ₀(1 + v/c) (c = 3.00×10⁵ km/s). Moving away (v > 0) stretches the light to longer wavelengths (redshift); moving toward (v < 0) compresses it (blueshift). Drag to orbit the scene. Set λ₀ and the velocity, predict the observed wavelength, then Check — the star drifts along the line of sight and its colour and the spectral line shift with it.

Drag to orbit · scroll to zoom. A star drifts along the line of sight toward or away from the blue observer; its colour and the bright spectral line below shift red or blue with the velocity.

Set the rest wavelength and the source velocity, predict the observed wavelength, then Check.
Table C — your Doppler record
λ₀ (nm)v (km/s)Predicted λComputed λ (nm)

This immersive 3D Doppler view is the main version; the accessible copy delivers the same set-values / predict / check exercise with native controls and screen-reader announcements.

Team Questions

1. A hot, thin gas produces which kind of spectrum?
2. A star’s lines are shifted to longer wavelengths. The star is:
3. Compared with red light, violet light has:

Example Report

Worked example: the speed of a receding star

The hydrogen-alpha line has a rest wavelength λ0 = 656.28 nm. In a star’s spectrum it is observed at λ = 657.60 nm.

The shift is Δλ = 657.60 − 656.28 = 1.32 nm. Apply the Doppler formula:

v = c × Δλ / λ0 = (3.00 × 105 km/s) × (1.32 / 656.28) ≈ 603 km/s.

Because the observed wavelength is longer than the rest value, the line is redshifted, so the star is receding at about 600 km/s. Measuring the shift and computing the velocity is the calculate-then-compare core of the lab.

3D Doppler shift (Table C)

The observed wavelength of a moving source is λ = λ0(1 + v/c) with c = 3.00×105 km/s. Representative values:

λ0 (nm)v (km/s)λ (nm)Shift
656.28+600657.59redshift
656.28−600654.97blueshift
500.00+1500502.50redshift
486.13−300485.64blueshift

A positive velocity lengthens the wavelength (redshift, receding); a negative velocity shortens it (blueshift, approaching), exactly as the Doppler formula predicts.

Practice Questions

1. A line with rest wavelength 500.0 nm is seen at 499.0 nm. The source is:
2. Dark absorption lines in a star’s spectrum are produced by:
3. Which correctly orders the spectrum from longest to shortest wavelength?
© 2026 E2 Innovations LLC / Virginia Research Institute. All rights reserved. Licensed for use on E2 Innovations and VRI sites only — not for redistribution or reuse in other courses. Contact info@e2innovations.ai.