Main

We observed two transits of the ‘hot Saturn’ planet WASP-96b (planetary mass Mp = (0.48 ± 0.03)MJ, where MJ is the mass of Jupiter, planetary radius Rp = (1.20 ± 0.06)RJ, where RJ is the radius of Jupiter, and equilibrium temperature Teq = 1,285 ± 40 K)13 on 2017 July 29 and August 22 ut in photometric conditions, using the 8.2-m Unit Telescope 1 of the Very Large Telescope, with the FORS2 spectrograph. Data were collected in the multi-object-spectroscopy mode using grisms 600B (blue) and 600RI (red) on the first and second nights, respectively, which, when combined, cover the wavelength range 3,600–8,200 Å. We used a mask consisting of two broad slits centred on the target and on a reference star of similar brightness. Broad slits spanning 22′′ along the dispersion and 120′′ along the spatial (perpendicular) axis were used to minimize slit losses due to seeing variations and guiding imperfections.

For each transit, we produced wavelength-integrated ‘white’ and spectroscopic light curves for WASP-96 and the reference star by integrating the flux of each spectrum along the dispersion axis. We corrected the light curves for extinction caused by the Earth’s atmosphere by dividing the flux of the target by the flux of the reference star. We modelled the transit and systematic effects of the white-light curves by treating the data as a Gaussian process and assuming quadratic limb darkening for the star. The transit parameters—mid-time Tmid, orbital inclination i, normalized semi-major axis a/R * , the planet-to-star radius ratio Rp/R * and the two limb-darkening coefficients u1 and u2—were allowed to vary in the fit to each of the two white-light curves, while the orbital period was held fixed to the previously determined value. The white-light curves and results from the modelling are shown in Extended Data Fig. 1 and Extended Data Table 1.

To obtain the transmission spectrum, we produced 28 and 35 spectroscopic light curves, from the blue and red grisms, respectively, with a width of 160 Å. Wavelength-independent systematics were corrected following standard practice, as detailed in the Methods. We allowed only Rp/R * and u1 to vary. The rest of the system parameters were fixed to their weighted mean values from the analysis of the two white-light curves, while the quadratic limb-darkening coefficients u2 were fixed to their theoretical values. To account for systematics, we marginalized over a grid of polynomials, where the latter consisted of terms up to second order in air mass and drift of the spectrum across the detector along both the dispersion and cross-dispersion axes. The resulting time series are shown in Extended Data Figs. 2 and 3.

The measured wavelength-dependent relative planet radii are shown in Fig. 1, which comprises the transmission spectrum of WASP-96b. The spectrum reveals the absorption signature of the pressure-broadened sodium D line with wings covering about 6 atmospheric pressure scale heights (one scale height corresponds to about 610 km, assuming Teq = 1,285 K), in a wavelength range of around 5,000–7,500 Å, and a slope at near-ultraviolet wavelengths due to Rayleigh scattering by molecular hydrogen. The radius measurements around the potassium feature show no obvious broadened line wing shape or larger absorption at the line cores.

Fig. 1: Transmission spectrum of WASP-96b compared to models.
figure 1

a, Comparison of the FORS2 observations (black dots with 1σ vertical error bars; the horizontal bars indicate spectral bin widths) with clear3,16, cloudy and hazy one-dimensional forward atmospheric models at solar abundance14 (continuous lines). The two best-fit models assume a clear atmosphere with different line broadening shapes for Na and K (see text for details). Models with hazes or clouds (magenta and blue) predict much smaller and narrower absorption features. b, Similar to a, but showing the best-fit model obtained from the retrieval analysis22 (red line) binned to the data resolution (red dots), with the 1σ, 2σ and 3σ confidence intervals (dark blue to pale blue regions).

To interpret the measured transmission spectrum, we first compare it with clear, cloudy and hazy atmospheric models with solar abundances from ref. 14. We find that cloud-free models assuming chemical equilibrium best fitted the 49 data points, giving χ2 = 49 and χ2 = 50 for a total of 48 degrees of freedom. Models with clouds and hazes, that is, 100× enhanced-Rayleigh scattering cross-section (haze) and 100× enhanced wavelength-independent (cloud) opacity, give χ2 values of 69 and 76 respectively, and are disfavoured at about 3σ and about 5σ confidence, respectively (Fig. 1). Further details are provided in Methods.

The wing shape of atomic absorption lines is a result of the combined contribution of the quantum mechanical (natural), thermal (or Doppler) and collisional (or pressure) broadening mechanisms15. Measurements of the shape of pressure-broadened line wings can provide important constraints on the interaction potentials used in the theory of stellar and sub-stellar atmospheres16,17. Although such constraints have been obtained from Na and K absorption lines in the spectra of brown dwarfs18,19, the actual shape of the profiles for exoplanets remains unconstrained. To assess the detection of sodium line-broadening we compared the spectrum to models with no broadened lines. Compared to the best-fit clear-atmosphere model, the narrow-line model is found to be rejected at the 5.8σ confidence level. This is in contrast to WASP-39b, WASP-17b and HD209458b, which have previously been classified as having the clearest atmospheres of the known exoplanets. The latter transmission spectra are well explained with narrow alkali features, implying that the broad absorption wings are masked by clouds and hazes4,5,20,21.

The broad sodium feature measured for WASP-96b therefore provides a unique opportunity to constrain the pressure-broadened line shape for an exoplanet atmosphere. We compared the observed spectrum to two cloud-free models, assuming alkali line-wing shapes from refs 3,16. We find each of them to be statistically consistent with the data, although the wing profile of ref. 3 is marginally preferred (Fig. 1, red and orange models).

To further interpret the physical properties of WASP-96b’s atmosphere, we performed a retrieval analysis of the data using the one-dimensional radiative–convective ATMO model22. We assumed an isothermal atmosphere and allowed the temperature, radius, opacity from clouds and hazes and the elemental abundances of Na and K to vary. In addition, Li is expected to add opacity at about 6,650 Å, which is covered by three of our measurements. Throughout this Letter, we adopt the astronomical scale of logarithmic abundances of ref. 23, where hydrogen (H) is defined to be logεH = 12. The abundance of a particular element X is defined as logεX = log(NX/NH) + 12, where NX and NH are the number densities of elements X and H. Our retrieval analysis finds negligible contributions from cloud or haze opacity, which indicates that the atmosphere of WASP-96b is free of clouds and hazes at the pressures being probed at the limb. The best-fit transmission spectrum includes opacity from Na, Li, K and Rayleigh scattering (Fig. 1). We obtain a tight constraint of logεNa = \({6.9}_{-0.4}^{+0.6}\) on the sodium abundance, which is in agreement with the solar abundance as well as with the measured sodium abundance in the WASP-96 host star (Fig. 2). The best-fit model gives χ2 = 39 for 42 degrees of freedom.

Fig. 2: Retrieved atmospheric properties for WASP-96b.
figure 2

Histograms of the marginalized posterior distributions from a free retrieval. a, b, Negligible opacity from clouds and hazes comprises the evidence for a clear atmosphere at the limb of the planet. ce, Retrieved elemental abundances in the scale of ref. 23, which ranges from 0 to 12 with the abundance of hydrogen logεH = 12. The abundance of Na, logεNa = \({6.9}_{-0.4}^{+0.6}\), is the only constrained quantity (c). The vertical continuous and dotted lines indicate the mean abundances and 1σ uncertainties, respectively. Shown are the elemental abundances with the uncertainties of the host star (dotted lines in blue regions) and the Sun (dash-dotted lines in grey regions25).

The current data do not support detections of K or Li, as the minimum χ2 value when excluding the two species is only slightly higher than when they are included (Δχ2 = 2). However, we include the two species in our retrieval model to marginalize the Na abundance over the possibility of their presence and estimate upper limits on their abundances. The abundances of K and Li are also found to depend on the assumed profile shape of the Na feature. We find an atmospheric temperature of T = \({\text{1,710}}_{-200}^{+150}\,\text{K}\), which is somewhat higher, compared with the planet’s equilibrium temperature of Teq = 1,285 ± 40 K under the assumption of zero albedo and uniform day–night heat redistribution13.

Heavy-element abundance measurements are important to constrain formation mechanisms of gas-giant exoplanets. According to the core-accretion paradigm, as the planet mass decreases, the atmospheric metallicity increases24,25. Giant planets accrete H/He-dominated gas as they form, so they also accrete planetesimals26 that enrich their H/He envelopes in metals. A low-mass H/He envelope has a smaller amount of gas for these metals to be mixed into, leading to a higher metal enrichment compared to the parent star. This is also the scenario for Solar System gas giants, where metallicity has been constrained from methane (CH4) abundance from in situ or infrared spectroscopy27,28,29,30, showing increasing enrichment of heavy elements with decreasing mass (Fig. 3). Measurements of H2O abundances have been used to constrain atmospheric metallicities for a small sample of exoplanets10,11,12. The measured molecular abundances are used as proxies to atmospheric metallicities, assuming chemical equilibrium conditions. Using our measurement of the absolute sodium abundance of WASP-96b, we estimate an atmospheric metallicity of Zp/Zʘ = \({2.3}_{-1.7}^{+8.9}\), that is, log(Zp/Zʘ) = \({0.4}_{-0.5}^{+0.7}\). This is consistent with the heavy-element abundance of the host star Z*/Zʘ = 1.4 ± 0.7, which we estimate using the relation Z*/Zʘ = 10[Fe/H] where [Fe/H] = 0.14 ± 0.19. While our WASP-96b measurement is consistent with the Solar System mass-metallicity trend (see Fig. 3), we note that additional high-precision constraints would be necessary to further support or refute a trend for exoplanets.

Fig. 3: Mass–metallicity diagram for Solar System planets and exoplanets.
figure 3

Methane (CH4) and water (H2O) are the two absorbing constituents used to constrain the atmospheric metallicity of Solar System planets (blue bars) and hot gas giant exoplanets (orange squares with grey error bars), respectively. Absorption lines from atomic Na (red triangles and error bars) can provide another proxy for exoplanet atmospheric metallicity, by combining three Hubble Space Telescope (HST) and two Very Large Telescope (VLT) transits for WASP-39b. With its detected and resolved pressure-broadened Na line wings, WASP-96b is the first transiting exoplanet for which high-precision atmospheric metallicity has been constrained using data only from the ground. Each error bar corresponds to the 1σ uncertainty. The blue line indicates a fit to the Solar System gas giants (pale blue symbols indicate Solar System planets).

WASP-96b is the first exoplanet for which the pressure-broadened wings of an atomic absorption line (Na i) have been observed, probing deeper layers of the atmosphere at the limb. This observation has also enabled a precise atmospheric abundance constraint, using ground-based data alone. Our result demonstrates that combined with near-ultraviolet data, the Na absorption feature at approximately 5,890 Å is a valuable probe of exoplanet metallicities accessible to ground-based telescopes over a wavelength region largely free of contamination by telluric lines. WASP-96b is the first gas giant of approximately 20 exoplanets so far characterized in transmission, to our knowledge, to have a broad atomic absorption feature detected. This demonstrates the important role a future ground-based optical spectrograph, optimized for transmission spectroscopy, could play. With the clearest atmosphere of any exoplanet characterized so far, WASP-96b will be an important target for the upcoming James Webb Space Telescope.

Methods

Observations

We observed two transits of WASP-96b with the FOcal Reducer and Spectrograph (FORS2)31 attached on the Unit Telescope 1 (Antu) of the VLT at the European Southern Observatory on Cerro Paranal in Chile as part of Large Program 199.C-0467 (Principal Investigator N.N.). We used an observing setup and strategy similar to our VLT FORS2 Comparative Transmission Spectroscopy of WASP-39b and WASP-31b22,32.

During the two transits, we monitored the flux of WASP-96 and one reference star at photometric conditions. The reference star, known as 2MASS 00041885-4716309, is the only bright source in the FORS2 field of view and is located at an angular separation of 5.3′ away from the target. Fortunately, the reference is of similar colour and brightness, which reduced the effect of differential colour extinction. For example, the magnitude differences (target minus reference) from the PPMXL33 catalogue are ΔB = −0.46, ΔR = −0.49 and ΔI = −0.5. We observed both transits with the same slit mask and the red detector (Massachusetts Institute of Technology), which is a mosaic of two chips. We positioned the instrument field of view such that each detector imaged one source. The field of view was monitored without guiding interruptions during the full observing campaigns. To improve the duty cycle, we made use of the fastest available read-out mode (200 kHz, about 30 s). On both nights, we ensured that the Longitudinal Atmospheric Dispersion Corrector was in its neutral position, that is, inactive.

During the first night, we used the dispersive element GRIS600B (hereafter blue and 600B), which covers the spectral wavelength range λ = 3,600–6,200 Å at a resolving power of Rλλ = 600. The field of view rose from an air mass of 1.43 to 1.08 and was set at an airmass of 1.16. The seeing oscillated around 0.5′′ during the first 3.5 h and gradually increased to 1.2′′ at the end of the observation. We collected a total of 89 exposures for about 5 h with integration times adjusted between 120 s and 230 s.

During the second night, we exploited the dispersive element GRIS600RI (hereafter red and 600RI), which covers the range 5,400–8,200 Å, in combination with the GG435 filter, to isolate the first order. The field of view rose from an air mass of 1.23 to 1.08 and was set at an airmass of 1.36. The seeing varied between 0.3′′ and 0.5′′ as measured from the cross-dispersion profiles of the spectra. We monitored WASP-96 and the reference star for about 5 h 20 min and collected a total of 233 spectra with integration times between 30 s and 80 s.

Calibrations and data reduction

We performed data reduction and analysis using a customized Interactive Data Language (IDL) pipeline22. We started by subtracting a bias frame and by applying a flat field correction to the raw images. We computed a master bias and flat field by obtaining the median of 100 individual frames. Cosmic rays were identified and corrected following the routine detailed in ref. 34. We extracted one-dimensional spectra using the Image Reduction and Analysis Facility (IRAF)’s APALL task. To trace the stars, we used a fit of a Chebyshev polynomial of two parameters. We performed background correction by subtracting the median background from the stellar spectrum for each wavelength, computed from a box located away from the spectral trace. We found that aperture radii of 14 and 12 pixels and sky regions 21 to 72 pixels (where the zero point is the middle of the spectrum special profile) and 23 to 74 pixels minimize the dispersion of the out-of-transit flux of the band-integrated white light curves for the blue and red observations, respectively.

We performed a wavelength calibration of the extracted stellar spectra using spectra of an emission lamp, obtained after each of the two transit observations with a mask identical to the science mask, but with slit widths of 1′′. We established a wavelength solution for each of the two stars with a low-order Chebyshev polynomial fit to the centres of a dozen lines, which we identified by performing a Gaussian fit. To account for displacements during the course of each observation and relative to the reference star, we placed the extracted spectra on a common Doppler-corrected rest frame through cross-correlation. All spectra were found to drift in the dispersion direction to no more than 2.5 pixels, with instrument gravity flexure being the most likely reason.

Example spectra of WASP-96 and the reference star are shown in Extended Data Fig. 1. We achieved typical signal-to-noise ratios of 315 and 280 per pixel for the central wavelength of the blue grism and 313 and 257 for the red grism, respectively. We then used the extracted spectra to produce band-integrated white and spectroscopic light curves for each source and transit by summing up the flux along the dispersion axis in each bandpass.

White-light curve analysis

We produced white-light curves from 4,013 Å to 6,173 Å and from 5,293 Å to 8,333 Å for the blue and red observations, respectively. We corrected the raw flux of the target by dividing by the raw flux of the reference star. This correction removes the contribution of Earth’s atmospheric transparency variations, as demonstrated in Extended Data Fig. 1. We modelled the white light transits and instrumental systematics simultaneously by treating the data as a Gaussian process35,36,37. We performed the Gaussian process analysis using the Python Gaussian process library George38,39,40,41. Under the Gaussian process assumption, the data likelihood is a multivariate normal distribution with a mean function μ describing the deterministic transit signal and a covariance matrix K that accounts for stochastic correlations (that is, poorly constrained systematics) in the data:

$$p({\boldsymbol{f}}\,|\,{\boldsymbol{\theta }},\gamma )={\mathscr{N}}(\mu ,K)$$

where p is the probability density function, f is a vector containing the flux measurements, θ is a vector containing the mean function parameters, γ is a function containing the covariance parameters and \({\mathscr{N}}\) is a multivariate normal distribution. We defined the mean function μ as follows:

$$\mu ({\boldsymbol{t}},\hat{{\boldsymbol{t}}};{c}_{0},{c}_{1},{\boldsymbol{\theta }})=[{c}_{0}+{c}_{1}\hat{{\boldsymbol{t}}}]T({\boldsymbol{t}};{\boldsymbol{\theta }})$$

where t is a vector of all central exposure time stamps in Julian Date, \(\hat{{\boldsymbol{t}}}\) is a vector containing all standardized times, that is, with subtracted mean exposure time and divided by the standard deviation, c0 and c1 describe a linear baseline trend, T(θ) is an analytical expression describing the transit and \({\boldsymbol{\theta }}=(i,a/{R}_{\ast },{T}_{{\rm{m}}{\rm{i}}{\rm{d}}},{R}_{{\rm{p}}}/{R}_{\ast },{u}_{1},{u}_{2})\), where i is the orbital inclination, a/R * is the normalized semi-major axis, Tmid is the central transit time, Rp/R * is the planet-to-star radius ratio, and u1 and u2 are the linear and quadratic limb darkening coefficients. To obtain an analytical transit model T(θ), we used the formulae found in ref. 42. We fixed the orbital period to its value from ref. 13 and fitted for the remaining system parameters.

We accounted for the stellar limb-darkening by adopting the two-parameter (u1u2) quadratic law and computed the values of the coefficients using a three-dimensional stellar atmosphere model grid43. In these calculations, we adopted the closest match to the effective temperature, surface gravity and metallicity of the exoplanet host star found in ref. 13. The choice of a quadratic versus a more complex law (such as a four-parameter nonlinear law44) was motivated by the study of refs 45,46, in which the two-parameter law has been shown to introduce negligible bias on the measured properties of transiting systems similar to WASP-96. In addition, the quadratic law requires a much shorter computational time to determine the relevant transit light curve. We computed the theoretical limb-darkening by fitting the limb-darkened intensities of the three-dimensional stellar atmosphere models, factored by the throughputs of the blue and red grisms.

The covariance matrix is defined as \(K={\sigma }_{i}^{2}{\delta }_{ij}+{k}_{ij}\), where σ i are the photon noise uncertainties, δ ij is the Kronecker delta function and k ij is a covariance function. We assumed the white noise term σw was the same for all data points and allowed it to vary as a free parameter. For the covariance function, we chose to use the Matérn ν = 3/2 kernel with the spectral dispersion and cross-dispersion drifts x and y as input variables, and the full-width at half-maximum (FWHM) measured from the cross-dispersion profiles of the two-dimensional spectra and the speed of the rotation angle z (see Extended Data Fig. 4). As with the linear time term, we also standardized the input parameters before the light curve fitting. We chose to use the dispersion and cross-dispersion drifts for both observations, and combined them with the FWHM for the blue data and the speed of the rotation angle for the red data, respectively. Our choice was justified based on the fact that those combinations of input parameters gave well behaved residuals. The covariance function was then defined as:

$${k}_{ij}={A}^{2}(1+\sqrt{3}{D}_{ij})\exp (\hspace{-2pt}-\hspace{-2pt}\sqrt{3}{D}_{ij})$$

where A is the characteristic correlation amplitude and

$${D}_{ij}=\sqrt{\frac{{({\hat{{\boldsymbol{x}}}}_{i}-{\hat{{\boldsymbol{x}}}}_{j})}^{2}}{{\tau }_{x}^{2}}+\frac{{({\hat{{\boldsymbol{y}}}}_{i}-{\hat{{\boldsymbol{y}}}}_{j})}^{2}}{{\tau }_{y}^{2}}+\frac{{({\hat{{\boldsymbol{z}}}}_{i}-{\hat{{\boldsymbol{z}}}}_{j})}^{2}}{{\tau }_{z}^{2}}}$$

where τ x , τ y and τ z are the correlation length scales and the hatted variables are standardized. We allowed parameters \({\boldsymbol{X}}=({c}_{0},{c}_{1},{T}_{{\rm{m}}{\rm{i}}{\rm{d}}},i,a/{R}_{\ast },{R}_{{\rm{p}}}/{R}_{\ast },{u}_{1},{u}_{2})\) and \({\boldsymbol{Y}}=(A,{\tau }_{x},{\tau }_{y},{\tau }_{z})\) to vary and fixed the orbital period P to its literature value13. We adopted uniform priors for X and log-uniform priors for Y.

To marginalize the posterior distribution \(p(\theta ,\gamma \,|\,f)\propto p(f\,|\,\theta ,\gamma )p(\theta ,\gamma )\) we made use of the Markov chain Monte Carlo software package emcee40. We identified the maximum likelihood solution using the Levenberg–Marquardt least-squares algorithm47 and initialized three groups of 150 walkers close to that maximum. We run groups one and two for 350 samples and the third group had 4,500 samples. Before running for the second group we re-sampled the positions of the walkers in a narrow space around the position of the best walker from the first run. This extra re-sampling step was useful because otherwise some of the walkers can start in a low-likelihood area of parameter space and require more computational time to converge. Transit models for each of the two observations computed using the marginalized posterior distributions are shown in Extended Data Fig. 1 and the relevant parameter values are reported in Extended Data Table 1. We find residual dispersion of 79 and 203 parts per million for the blue and red light curves, respectively. Both values are found to be within 80% of the theoretical photon noise limit.

We computed the weighted mean values of the orbital inclination and semi-major axis and repeated the fits. In the second fit we allowed only the planet-to-star radius ratio Rp/R * and the two limb darkening coefficients u1 and u2 to vary, while the orbital inclination and semi-major axis were held fixed to the weighted mean values and the central times were fixed to the values determined from the first fit.

Spectroscopic light curve analysis

We produced spectroscopic light curves by summing the flux of the target and reference star in bands with a width of 160 Å. The sodium D lines at 5,890 Å and 5,896 Å fall inside the spectral range of each grism, within their overlapping region of 5,300–6,200 Å. We centred the set of bins for each night on the sodium line, which gave the advantage of obtaining two radius measurements identical in wavelength coverage within that overlapping region. We merged two pairs of bins, covering the O2 A and B bands from 7,594 Å to 7,621 Å and from 6,867 Å to 6,884 Å, respectively, to increase the signal-to-noise ratio of the corresponding light curves. The very first band in the blue grism was also enlarged with the same motivation. With these customizations we produced a total of 63 light curves.

Common mode factors

The FORS2 spectroscopic light curves are known to exhibit wavelength-independent (common mode) systematic effects, as demonstrated from our Comparative Transmission Spectroscopy studies22,32 and other FORS2 results48,49,50. This makes the instrument outstanding for transmission spectroscopy, with enormous potential to explore the diversity of exoplanet atmospheres. We established the wavelength-independent systematic effects using the band-integrated white-light curves for each of the two nights. We simply divided the white-light transit light curves by a transit model. We computed the transit model using the weighted mean values of the orbital inclination and normalized semi-major axis from both nights and assumed the central times found from the white-light analysis. The values for the relative radius and the limb-darkening coefficients were identified by repeating the Gaussian process fit where the transit central time, orbital inclination and semi-major axis were held fixed to the weighted-mean values. The fitted relative radii and limb-darkening coefficients are reported at the end of Extended Data Table 1. The common mode factors for each night are shown in Extended Data Fig. 1 along with a schematic explanation of the full white-light curve analysis.

Spectroscopic light curve fits

We modelled the spectroscopic light curves using a two-component function that takes into account the systematics and transit simultaneously. The transit model was computed using the analytical formulae of ref. 42, as for the white-light curve, but in the fits we allowed only the relative planet radius Rp/R * and the linear limb-darkening coefficient u1 to vary. Fitting only for the linear limb-darkening coefficient is standard practice for ground-based observations and has proved generally to perform well51,52,53,54,55,56. Similar to our WASP-39b study with FORS222, we also fitted for both limb-darkening coefficients and found that the uncertainty of u2 is large and consistent with the theoretical prediction. We interpret this as an indication for insufficient constraining power of the data for the nonlinear coefficient. However, as the transmission spectra did not substantially change we chose to fix u2 and to fit only for u1. Prior to fitting the spectroscopic light curves, we removed the common mode factors from each night by dividing each of the spectroscopic light curves by the corresponding common-mode light curve of the same night. We accounted for the systematics using a low-order polynomial (up to second degree with no cross terms) of dispersion and cross-dispersion drift, air mass, FWHM variations and the rate of change of the rotator angle (Extended Data Fig. 4). We produced all possible combinations of detrending variables and performed separate fits with each combination with the systematics function included in the two-component model. For each attempted function, we computed the Akaike Information Criterion57 to estimate the statistical weight of the model depending on the number of degrees of freedom. We marginalized the resulting relative radii and linear limb-darkening coefficient following ref. 58. We chose to rely on the Akaike Information Criterion instead of other information criteria, for example, the Bayesian Information Criterion59, because the Akaike Information Criterion selects more complex models, resulting in more conservative error estimates. We note that a marginalization over multiple systematics functions relies on the assumption of equal prior weights for each tested model. This assumption is valid for simple polynomial expansions of basis parameters, like the ones in our study. We found systematics models parameterized with linear air mass, dispersion drift and FWHM terms to result in the highest statistical weight.

Prior to each fit, we set the uncertainties of each spectrophotometric channel to values that are based on the expected photon noise with additional component from readout noise. We determined best-fit models using a Levenberg–Marquardt least-squares algorithm and rescaled the uncertainties of the fitted parameters with the dispersion of the residuals. All residual outliers larger than 3σ were excluded from the analysis. We found that for each spectroscopic light curve fewer than three data points were removed. We also assessed the levels of correlated residual red noise, following the methodology of ref. 60 by modelling the binned variance with the \({\sigma }^{2}={\sigma }_{{\rm{w}}}^{2}/N+{\sigma }_{{\rm{r}}}^{2}\) relation, where σw is the uncorrelated white noise component, N is the number of measurements in the bin and σr is the red noise component. We find white and red noise dispersion in the range 400–1,000 and 20–80 parts per million, respectively.

The measured wavelength-dependent relative radii and corresponding light curves are given in Fig. 1, Extended Data Figs. 25, and Extended Data Table 2 and comprise the transmission spectrum of WASP-96b. We used the overlapping wavelength region to combine the two observations and computed the weighted mean of both datasets. We detect a marginally significant 1.4σ difference in the transit depths of the light curves from the two observations of (7.2 ± 5.2) × 10−4. This level of variation is consistent with the photometric variability, associated with the active regions on the star surface with variability of σ < 9.2 × 10−4 (ref. 13).

Modelling of the atmosphere of WASP-96b

First we compare the observed transmission spectrum to the models based on ref. 16, which included a self-consistent treatment of radiative transfer and chemical equilibrium of neutral and ionic species. Chemical mixing ratios and opacities were computed assuming solar metallicity and local chemical equilibrium, accounting for condensation and thermal ionization but not photoionization61,62,63. Transmission spectra were also calculated using one-dimensional T-P profiles for the dayside, as well as an overall cooler planetary-averaged profile.

In addition to the atmospheric models of a clear atmosphere, a simplified treatment of the scattering and absorption have been incorporated in those models to simulate the effect of small particle haze aerosols and large particle cloud condensates at optical and near-infrared wavelengths. In the case of haze, Rayleigh scattering opacity (σ = σ0(λ/λ0)−4) has been assumed with a cross-section which was 1,000 × the cross-section of molecular hydrogen gas (σ0 = 5.31 × 10−27 cm2 at λ0 = 3,500 Å; ref. 61). To include the effects of a flat cloud deck we included a wavelength-independent cross-section, which was a factor of 100× the cross-section of molecular hydrogen gas at λ0 = 3,500 Å (see Fig. 1).

As in our previous studies, we obtained the average values of the models within the wavelength bins and fitted these theoretical values to the data with a single parameter responsible for their vertical offset5,22,34. The χ2 and Bayesian Information Criterion statistic quantities were computed for each model with the number of degrees of freedom for each model determined by ν = Nm, where N is the number of measurements and m is the number of free parameters in the fit.

We also compared the observed transmission spectrum around the Na D line from 4,500 Å to 6,800 Å with cloud-free atmosphere models, assuming two individual shapes of the pressure broadened profile. The first profile had the shape detailed in ref. 3 and the second line shape was taken from the formalism of refs 18,26. We find no statistically significant difference between the two with χ2 = 22 and χ2 = 30 for 35 degrees of freedom. Further observations at higher signal-to-noise ratios and resolution will be necessary to distinguish between the two line-wing shapes.

Retrieval analysis

We performed a retrieval8,9,64 analysis using the one-dimensional radiative–convective equilibrium ATMO model24,65,66,67,68. The code includes isotropic multi-gas Rayleigh scattering, H2–H2 and H2–He collision-induced absorption, as well as opacities for all major chemical species taken from the most up-to-date high-temperature sources, including H2, He, H2O, CO2, CO, CH4, Na, K, Li, Rb and Cs66,69. Hazes and clouds are respectively treated as parameterized enhanced Rayleigh scattering and grey opacity70, which is similar to the approach of ref. 16 and is detailed in ref. 69. ATMO uses the correlated-k approximation with the random overlap method to compute the total gaseous mixture opacity, which has been shown to agree well with a full line-by-line treatment66.

We first performed a free retrieval analysis, allowing a fit to the abundances of Na, K and Li, cloud and haze opacity, the planet’s radius and atmospheric temperature. Na, K and Li were included because these elements are expected to add substantial opacity in the wavelength region of our observations. We assumed that these gases are well mixed vertically in the atmosphere.

For all free parameters in our model we adopted uniform priors with the following ranges: 250–3,000 K for the temperature, 1RJ–1.5RJ for the radius, 10−10 to 103 for the cloud and 10−10 to 103 for the haze opacity. For the mixing ratios of chemical species other than H and He we adopted uniform priors between −2 and 12. Our retrieval analysis proceeded by first identifying the minimum χ2 solution using nonlinear least-squares optimization and then marginalizing over the posterior distribution using differential-evolution Markov chain Monte Carlo71. A total of 12 chains for 30,000 steps each were run until the Gelman–Rubin statistic for each free parameter was within 1% of unity, showing that the chains were well mixed and had reached a steady state. We discarded a burn-in phase from all chains corresponding to the step at which all chains had found a χ2 below the median χ2 value of the chain. Finally, we combined the remaining samples into a single chain, forming our posterior distributions. We summarize the results from the free retrieval in Fig. 2.

Elemental abundances of Na and Li were obtained for the host star from high-resolution optical spectroscopy with a typical signal-to-noise ratio of about 100:1, as detailed in ref. 13. Because the K resonance doublet is located outside the red limit of the high-resolution spectra, it was not possible to measure its abundance.

The best-fitting retrieved spectrum suggests a cloud-free atmosphere at the limb with precise sodium abundance consistent with the solar value at about 1σ. The spectrum shows no definitive evidence of the potassium feature. A measurement at around 0.73 μm shows a slightly larger radius, though it is only about 1.8σ above our best-fitting model. Our retrieval analysis shows a marginalized posterior distribution with only an upper bound with median value consistent with the solar value at approximately 2σ confidence (Figs. 1 and 2). This is most probably a consequence of the limited wavelength range, covering only about two-thirds of the potassium feature, as well as the diluting effect of the O2-A band, which partially covers this wavelength regime.

The limited constraining power of the K feature allows for a three-case scenario for the abundance of K in the atmosphere of WASP-96b. In all three cases the atmosphere of the planet is clear at the limb with sodium at solar abundance. In the first scenario, the abundance of potassium is sub-solar, leading to a missing potassium feature in the transmission spectrum. In chemical equilibrium, Na and K can form condensates (such as Na2S and KCl) at temperatures lower than about 1,300 K and 1,000 K, respectively. However, given that the retrieved temperature in the region probed by our observation lies between about 1,300 K and 1,700 K, this is unlikely. In the second scenario, the potassium can be ionized by the ultraviolet radiation of the host star, which would also lead to missing potassium line cores. The pressure-broadened line wings would still be present, because they would originate from deeper layers, where the ultraviolet radiation would be able to penetrate. We estimate the relative sodium-to-potassium ratio from our free retrieval analysis, finding a highly uncertain value, which prevents any definitive conclusion (Extended Data Fig. 6). Future observations of multiple transits could help resolve the two-case scenario. A third scenario would require a stratified atmosphere consisting of a low-altitude potassium layer with cloud cover on top, above which is located a clear atmosphere containing sodium at solar abundance. The sodium layer would need to be deep enough to allow for pressure-broadened line wings in the transmission spectrum.

We note a large degeneracy between the aerosol clouds/hazes and the Na abundance, as higher cloud opacity levels can be fitted with increased Na abundances. This degeneracy can be seen in the posterior distribution of the retrieval (see Extended Data Fig. 8), and the marginalized posterior distributions are shown in Fig. 2 (that is, the distribution shown in Extended Data Fig. 8 integrated along each axis). The degeneracy is accounted for in our retrieval modelling by marginalizing the Na abundance over the other model fit parameters, which includes the effects of clouds and hazes. An aerosol-free model where the near-ultraviolet transmission spectra is dominated by H2 Rayleigh scattering helps us to determine the lower limit to the Na abundance. The upper limit for the Na abundance is sensitive to the line profile shape, as very high aerosol opacity levels probe much lower pressure levels, affecting the line profile. For example, for a clear atmosphere the transmission spectra at 4,000 Å probes pressures of 20 mbar and is dominated by molecular hydrogen at that wavelength. In a model where the haze opacity is 1,000× stronger than molecular hydrogen (the pink haze model shown in Fig. 1), the pressure probed is about 1,000× lower or about 0.02 mbar. These lower pressures affect the calculation of the pressure-broadened sodium line profile. As described in ref. 3, using semi-classical impact theory the half-width of the Lorentzian sodium line core is determined by the effective collision frequency, which itself is a product of the H2-perturber density (among other factors). We find that in the described scenario with very high sodium abundances and high cloud/haze opacities, very low pressures (such as 0.02 mbar) are probed and the sodium line profile becomes too narrow to be able to fit the wide profile seen in the data, even at arbitrarily high abundances.

We acknowledge that the one-dimensional model does not account for horizontal advection, which may affect the composition. This can break the chemical equilibrium condition, leading to horizontally constant non-equilibrium abundances of various species for example, CH4 (ref. 72), which could potentially affect the observed transmission spectrum. However, an analysis of such effects is beyond the scope of the present Letter.

The presence of sodium and potassium in the atmospheric spectra of irradiated gas giant exoplanets has proved puzzling, with some of the spectra showing both or either of the two features without a clear trend associated with the planetary properties5. Primordial abundance variation along with atmospheric processes such as condensation, photochemistry and photoionization have been hypothesized to be responsible for the observed alkali variation. Elemental abundance constraints with ground-based instruments such as FORS2 could help identify the role of some of those processes from statistically large samples of exoplanet spectra.

Exoplanet atmospheric metallicities have been estimated using the scaling relation of atmospheric metallicity with the abundance of detected absorption features. At present, such estimations have been obtained using the 1.4-μm water absorption feature. Recently, ref. 73 obtained such measurement from a combined HST + VLT spectroscopy. We performed a retrieval analysis assuming chemical equilibrium in the atmosphere and determine the metallicity of WASP-96b’s atmosphere, finding consistency with the metallicity of the host star and the mass–metallicity trend established for Solar System giant planets (Fig. 3). We acknowledge that such estimations can largely be inaccurate owing to the metallicity scaling assumption with elemental abundance and round off the precision of the WASP-96b’s metallicity to one significant figure. The current census of exoplanet metallicity measurements exhibits a large scatter across the full mass–metallicity diagram, which hampers definitive conclusion regarding a trend. As in ref. 74 we plot the relative planet-to-star heavy-element enrichment as a function of the planet mass instead of the planet metallicity alone (Extended Data Fig. 7). We convert Zp/Zʘ to Zp/Z * , assuming a scaling approximation with the parent star’s iron abundance of the form Zp/Z *  = 10[Fe/H], where Zʘ = 0.014 and propagate the uncertainty of [Fe/H]. It remains for future work to improve the statistics on the mass–metallicity diagram with additional precise measurements. We therefore consider it premature to propose any trends or emerging patterns or interpretation.

Code availability

Publicly available custom codes were used for the Gaussian process modelling: George (http://dfm.io/george/current/user/gp/) and emcee (http://github.com/dfm/emcee). The Markov chain Monte Carlo retrieval analyses were performed using the publicly available package exofast (http://astroutils.astronomy.ohio-state.edu/exofast). The ATMO code used to compute the atmosphere models is currently proprietary. We have opted not to make the customized IDL codes used to produce the spectra publicly available owing to their undocumented intricacies.

Data availability

The data are within the standard proprietary period of one year and will become publicly available on the European Southern Observatory archive (July and August) in 2018.