WASP-39b, a gas giant about 700 light-years away, is turning out to be quite the exoplanetary treasure.

Earlier this year, WASP-39b was the subject of the first-ever detection of carbon dioxide in the atmosphere of a planet outside the Solar System.

Now, an in-depth analysis of data from the James Webb Space Telescope (JWST) has given us an absolute goldmine of information: the most detailed look at an exoplanet atmosphere yet.

The results include information about WASP-39b's clouds, the first-ever direct detection of photochemistry in an exoplanet atmosphere, and a nearly complete inventory of the atmosphere's chemical contents that reveals tantalizing hints of the exoplanet's formation history.

These epic discoveries have been published in five papers in Nature, and pave the way for the eventual detection of the chemical signatures of life outside the Solar System.

"These early observations are a harbinger of more amazing science to come with JWST," says astrophysicist Laura Kreidberg, director of the Max Planck Institute for Astronomy in Germany.

"We put the telescope through its paces to test the performance, and it was nearly flawless – even better than we hoped."

Since the first exoplanets were discovered in the early 1990s, we've sought to know more about these worlds orbiting alien stars.

But the challenges have been steep ones. Exoplanets can be extremely small and are extremely distant. We've never even seen most of them: We only know of their existence based on the effect they have on their host stars.

One of these effects occurs when the exoplanet passes between us and the star, an event known as a transit. This causes the starlight to slightly dim; periodic dimming events suggest the presence of an orbiting body. We can even tell how big that orbiting body is, based on the dimming and gravitational effects on the star.

And there's something else we can tell, based on transit data. As starlight passes through the atmosphere of the transiting exoplanet, it changes. Some wavelengths on the spectrum are dimmed or brightened, depending on how molecules in the atmosphere absorb and re-emit light.

The signal is faint, but with a powerful enough telescope, and a stack of transits, the changing absorption and emission features on the spectrum can be decoded to determine the contents of an exoplanet's atmosphere.

JWST is the most powerful space telescope ever launched. With three of its four instruments, it obtained detailed infrared spectra from the star WASP-39. Scientists then got to work analyzing the colorful codes.

First up was a census of the molecules present in WASP-39b's atmosphere. In addition to the aforementioned carbon dioxide, the researchers detected water vapor, sodium, and carbon monoxide. There was no detection made of methane, implying that the metallicity of WASP-39b is higher than that of Earth.

The abundance of these elements is also revealing. In particular, the ratio of carbon to oxygen suggests that the exoplanet formed much farther from its host star than its current close-in position, occupying a four-day orbit. And modeling and observation data suggest that the exoplanet's sky is populated by broken clouds – not of water, but of silicates and sulfites.

Finally, the observations revealed the presence of a compound called sulfur dioxide. Here in the Solar System, on rocky worlds such as Venus and Jovian moon Io, sulfur dioxide is the result of volcanic activity. But on gas worlds, sulfur dioxide has a different origin story: It's produced when hydrogen sulfide is broken down by light into its constituent parts, and the resulting sulfur is oxidized.

Photon-induced chemical reactions are known as photochemistry, and they have implications for habitability, the stability of an atmosphere, and the formation of aerosols.

WASP-39b, to be clear, is not likely to be habitable to life as we know it for a whole bunch of reasons, including but not limited to its scorching temperature and gaseous makeup, but the detection of photochemistry is one that has implications for atmospheric studies of other worlds, and understanding the evolution of WASP-39b itself.

Planetary scientists have been gearing up for years for the insights into atmospheres that JWST was expected to provide. With the first detailed exoplanet atmosphere analysis, it seems that the space telescope is going to live up to its promise.

In addition, the teams involved in this research are preparing documentation so other scientists can apply their techniques to future JWST exoplanet observations.

We may not detect the signatures of life in an exoplanet atmosphere with JWST – perhaps an even more powerful telescope will be required to deliver that level of fine detail – but with the analysis of WASP-39b, that discovery is feeling ever more tantalizingly within grasp.

"Data like these," says astronomer Natalie Batalha of the University of California Santa Cruz, "are a game changer."

The research will be published Nature and can be read in preprints here, here, here, here, and here.