He built a private observatory and did extensive observations of the spectral emission lines and absorption lines of various celestial objects. He was the first to distinguish between nebulas and galaxies by showing that some (like the Orion Nebula) had pure emission spectra characteristic of gas, while others like the Andromeda Galaxy had spectra characteristic of stars.