Observational astronomers have become very good at analyzing starlight, and recognizing patterns in the lines. The know about where to look for key identifying lines, like the Ha line. This is the line that corresponds to a hydrogen electron dropping from the third excited state to the second excited state. The observed frequency of the Ha line can be Doppler shifted if the star or galaxy is moving toward or away from us. The amount of the Doppler shift can give us a way to calculate the velocity of the star or galaxy. The figure above shows Doppler shifted spectra. The spectrum in the center is from hydrogen gas that is at rest, and is used as a reference for the other spectra. If the lines are shifted left, their wavelengths are longer, and frequencies lower, indicating relative motion away from the observer. The opposite is true when the object is moving toward the observer.