An artist's rendering shows the HR 8799 planetary system at an early stage in its evolution, with HR 8799c in the foreground. That giant planet orbits its parent star at a distance comparable to Pluto's distance from our sun.

"The big surprise was actually that we could do it," one of the study's co-authors, Travis Barman of the Lowell Observatory in Arizona, told reporters. "We can actually see the individual lines of these molecules. ... I personally felt like we would not be able to do what we have done."

This isn't the first time scientists have studied the atmosphere of HR 8799c, a planet about seven times as massive as Jupiter that orbits a star 130 light-years from Earth. The HR 8799 system is special because astronomers can actually pick up the light of several giant planets that orbit outside the glare of their parent star. HR 8799c, for example, follows an orbit similar to the one Pluto traces around our own sun.

That's what makes it possible for astronomers to get the "chemical fingerprint" of the planet's atmosphere. One team did it three years ago with an instrument on the European Southern Observatory's Very Large Telescope in Chile. Another team reported just this week that they did it for four planets in the HR 8799 system using an instrument known as Project 1640 on the Palomar Observatory's Hale Telescope in California.

Higher resolutionBarman and his colleagues said they used the OSIRIS spectrograph on the Keck II telescope in Hawaii to produce a chemical fingerprint with enough resolution to determine which chemicals were present in the atmosphere, and which were not.

They found that the planet had a cloudy atmosphere containing water vapor and carbon monoxide — but not methane, as some researchers had previously suspected. Methane is an ingredient in the atmospheres of our own solar system's giant planets.

RC-HIA / C. Marois / Keck Observatory

This is one of the discovery images of the HR 8799 planetary system, obtained by the Keck II telescope using the adaptive optics system and NIRC2 Near-Infrared Imager. The rectangle indicates the field-of view of the OSIRIS instrument, centered on HR 8799c.

HR 8799c isn't a likely candidate to harbor life as we know it. It's far too gassy and hot, with a surface temperature of 1,800 degrees Fahrenheit, or 1,000 degrees Celsius. But the same spectroscopic method could theoretically be used to analyze the atmospheres of Earthlike planets for signs of life — if the telescope could be made big enough.

"If you wanted to do an Earth-sized planet, you really need a spacecraft, and you really need a very dedicated spacecraft that was designed only for that purpose," said another co-author of the Science study, Bruce Macintosh of the Lawrence Livermore National Laboratory in California.

Barman said it might be possible to detect variations in the surface brightness of extrasolar planets using next-generation, ground-based instruments such as the Gemini Planet Imager. "We might be able to do that within the next few years," he said.

How were planets formed?The researchers said the readings from OSIRIS also could provide insights into how the planetary system was formed. Theorists have proposed two scenarios for the formation of planets from the disk of gas and dust surrounding an infant star. In the core-accretion scenario, planets form gradually as solid cores grow massive enough to start taking on envelopes of gas from the disk. In the gravitational-instability scenario, planets form almost instantly as parts of the disk collapse on themselves.

"For the first time, we can actually make a statement, a suggestion about the way the system might have formed, which is an extremely difficult thing to do observationally," said the study's lead author, Quinn Konopacky, an astronomer at the University of Toronto's Dunlap Institute for Astronomy and Astrophysics.

The ratio of carbon to oxygen was higher than would have been expected if the planet shared the composition of its parent star and protoplanetary disk. That might have happened because the disk's gas cooled gradually over time, forming water ice that depleted the oxygen from the gas that remained. This is the way most astronomers believe our own solar system formed.

"Once the solid cores grew large enough, their gravity quickly attracted surrounding gas to become the massive planets we see today," Konopacky said in a news release. "Since that gas had lost some of its oxygen, the planet ends up with less oxygen and less water than if it had formed through a gravitational instability."

Not all astronomers think the case is that clear-cut, however. Alan Boss, a theoretical astrophysicist at the Washington-based Carnegie Institution for Science, told NBC News that giant planets as far away from their parent stars as HR 8799c were more likely to be formed through gravitational instability than through core accretion.

In any case, Boss said he doubted that the readings from OSIRIS could rule out either scenario for planetary formation, since so much depends on the details of a particular theory. "Theorists are clever," he said. "It's hard to paint them into a corner."