Interactions between exoplanetary atmospheres and internal properties have long been proposed to be drivers of the inflation mechanisms of gaseous planets and apparent atmospheric chemical disequilibrium conditionsSUP1SUP. However transmission spectra of exoplanets have been limited in their ability to observationally confirm these theories owing to the limited wavelength coverage of the Hubble Space Telescope HST and inferences of single molecules mostly HSUB2SUBO ref. SUP2SUP. In this work we present the panchromatic transmission spectrum of the approximately 750 K lowdensity Neptunesized exoplanet WASP107b using a combination of HST Wide Field Camera 3 WFC3 and JWST NearInfrared Camera NIRCam and MidInfrared Instrument MIRI. From this spectrum we detect spectroscopic features resulting from HSUB2SUBO 21 CHSUB4SUB 5 CO 7 COSUB2SUB 29 SOSUB2SUB 9 and NHSUB3SUB 6. The presence of these molecules enables constraints on the atmospheric metal enrichment MH is 1018 solarSUP3SUP vertical mixing strength logSUB10SUBKSUBzzSUB  8.49.0 cmSUP2SUP sSUP1SUP and internal temperature gt345 K. The high internal temperature is suggestive of tidally driven inflationSUP4SUP acting on a Neptunelike internal structure which can naturally explain the large radius and low density of the planet. These findings suggest that eccentricitydriven tidal heating is a critical process governing atmospheric chemistry and interiorstructure inferences for most of the cool lt1000 K superEarthtoSaturnmass exoplanet population.
['Astrophysics - Earth and Planetary Astrophysics']
A high internal heat flux and large core in a warm Neptune exoplanet
{'A High Internal Heat Flux and Large Core in a Warm Neptune Exoplanet': "Luis Welbanks 1* , Taylor J. Bell 2,3 , Thomas G. Beatty 4 , Michael R. Line 1 , Kazumasa Ohno 5,6 , Jonathan J. Fortney 5 , Everett Schlawin 7 , Thomas P. Greene 3 , Emily Rauscher 8 , Peter McGill 9 , Matthew Murphy 7 , Vivien Parmentier 10 , Yao Tang 5 , Isaac Edelman 2 , Sagnick Mukherjee 5 , Lindsey S. Wiser 1 , Pierre-Olivier Lagage 11 , Achr'ene Dyrek 11 and Kenneth E. Arnold 4  \n1 School of Earth and Space Exploration, Arizona State University, Tempe, AZ, USA. 2 Bay Area Environmental Research Institute, NASA's Ames Research Center, Moffett Field, CA, USA.  \n- 3 Space Science and Astrobiology Division, NASA's Ames Research Center, Moffett Field, CA, USA.  \n4 Department of Astronomy, University of Wisconsin-Madison, Madison, WI, USA. 5 Department of Astronomy and Astrophysics, University of California Santa Cruz, Santa Cruz, CA, USA.  \n6 Division of Science, National Astronomical Observatory of Japan, Tokyo, Japan. 7 Steward Observatory, University of Arizona, Tucson, AZ, USA.  \n8 Department of Astronomy, University of Michigan, Ann Arbor, MI, USA. 9 Space Science Institute, Lawrence Livermore National Laboratory, Livermore, CA, USA. 10 Laboratoire Lagrange, Observatoire de la Cˆote d'Azur, Universit'e Cˆote d'Azur, Nice, France. 11 Universit'e Paris-Saclay, Universit'e Paris Cit'e, CEA, CNRS, AIM, F-91191 Gif-sur-Yvette,  \n- France.  \n*Corresponding author(s). E-mail(s): luis.welbanks@asu.edu  \nInteractions between exoplanetary atmospheres and internal properties have long been hypothesized to be drivers of the inflation mechanisms of gaseous planets and apparent atmospheric chemical disequilibrium conditions 1 . However, transmission spectra of exoplanets has been limited in its ability to observational confirm these theories due to the limited wavelength coverage of HST and inferences of single molecules, mostly H 2 O(ref. 2 ). In this work, we present the panchromatic transmission spectrum of the approximately 750 K, low-density, Neptune-sized exoplanet WASP-107b using a combination of HST WFC3, JWST NIRCam and MIRI. From this spectrum, we detect spectroscopic features due to H 2 O (21 σ ), CH 4 (5 σ ), CO (7 σ ), CO 2 (29 σ ), SO 2 (9 σ ), and NH 3 (6 σ ). The presence of these molecules enable constraints on the atmospheric metal enrichment (M/H is 10-18 × Solar 3 ), vertical mixing strength (log 10 K zz =8.4-9.0 cm 2 s -1 ), and internal temperature ( > 345 K). The high internal temperature is suggestive of tidally-driven inflation 4 acting upon a Neptune-like internal structure, which can naturally explain the planet's large radius and low density. These findings suggest that eccentricity driven tidal heating is a critical process governing atmospheric chemistry and interior structure inferences for a majority of the cool ( < 1,000K) super-Earth-to-Saturn mass exoplanet population.  \nThe mass of WASP-107b is similar to Neptune (1.78 M N ), but its extreme low density is suggestive of a Hydrogen/Helium (H/He) envelope-to-core-mass ratio ( > 85%; ref. 5 ) more like Jupiter/Saturn (around 90%) than like Neptune/Uranus (5-15 % ; ref. 6 ). This high of an envelope mass fraction for such a low mass planet presents challenges to the standard coreaccretion paradigm of planet formation 7 -it is unclear how such a low mass planetary core (inferred to be < 5 M ⊕ ; ref. 5 ) could accrete such a massive gaseous envelope, but then stop short of fully growing into a 'Jupiter' 5 . An alternative hypothesis 4 is that tidal heating could inflate the planetary envelope, reducing the need for such a envelope-to-core-mass ratio.  \nIn addition to mass and radius constraints, measurements of the atmospheric abundances of molecules containing carbon (C), oxygen (O), nitrogen (N), and sulphur (S) can be used to jointly constrain both scenarios. The abundances of molecules in the atmosphere will be set by the intrinsic elemental inventory and the chemical processes primarily driven to disequilibrium induced by transport and photochemistry 8, 9 . The former constrains the partitioning of material between the envelope and core, while the latter is sensitive to the amount of tidal heating, altering the deep atmosphere temperature and consequently, the molecular abundances at their quenched values 1 . One of the key challenges in interpreting exoplanet atmosphere compositions is disentangling the intrinsic elemental inventory from different chemical processes, given the presence (or lack-there-of) of molecular spectral features.  \nInitial reconnaissance spectroscopy with the HST Wide Field Camera-3 (WFC3, 0.8-1.6 µ m) presented 2, 10 a muted water vapor absorption feature (1.4 µ m) and a surprising lack of methane (CH 4 ) absorption (1.6 µ m) - expected to be in abundance under solar elemental abundances and chemical equilibrium at temperatures below approximately 1,000 K (refs. 9, 11 ). The presence of water but lack of methane could indicate either a low carbon-to-oxygen ratio (C/O) envelope or else be due to the quenching of methane at deeper, hotter layers 1, 2 . The constraints on the water abundance were not precise enough to determine the bulk envelope metal enrichment.  \nThe broad wavelength coverage (0.6-28 µ m) offered by JWST provides access to multiple molecular bands of the major C, O, N, and S species,  \ncritical to enabling the precise atmospheric abundance constraints necessary for breaking the aforementioned degeneracies. As part of the MANATEE NIRCam+MIRI GTO program (JWST-GTO1185; ref. 12 ), we collected two new transit observations of WASP-107b using JWST NIRCam's F322W2 (2.4-4.0 µ m) and F444W (3.9-5.0 µ m) filters and grism 13 on 14 January 2023 and 4 July 2023, respectively. We analyzed the JWST/NIRCam observations with three separate data analysis pipelines ( Eureka! 14 , Pegasus (Beatty et al., in prep.), and tshirt 15 ) which all agree well within error (Fig. 1 and Extended Data Fig. 2); we ultimately chose to adopt Eureka! 's analysis for our fiducial NIRCam spectrum when performing atmospheric modelling. In addition, we incorporate recently published JWST/MIRI LRS observations 16 as well as the previously published HST/WFC3 G102 and G141 observations 2, 10 . To ensure a uniform set of orbital and limb-darkening parameters between the many different instruments, we re-analyzed the HST/WFC3 observations using Pegasus and the JWST/MIRI LRS observations using Eureka! . We find that these re-analyzed WFC3 and MIRI/LRS spectra are consistent with the literature spectra aside from a constant offset caused by the improved orbital solution. All together, these data give us a panchromatic dataset with observations spanning 0.8-12.2 µ m, with continuous coverage between 2.45 µ mand 12.2 µ m.  \nAmong the chemical species expected in exoplanet atmospheres 9, 17 (see Methods), the final NIRCam spectrum shown in Figure 2 shows prominent absorption features due to H 2 O (2.5-3.2 µ m, detected at 21 σ ), CO 2 (2.66-2.86 µ m and 4.24.5 µ m, detected at 29 σ ), CO (4.5-4.9 µ m, detected at 7 σ ), and SO 2 (3.94-4.1 µ m, detected at 9 σ ), with weaker features due to CH 4 (3.2-3.5 µ m, detected at 5 σ ) and NH 3 (2.9-3.1 µ m, detected at 6 σ ), with reported detections from the 1-dimensional radiativeconvective-photochemical equilibrium models (1DRCPE) described below. These features are complemented by two additional H 2 O bands in HST/WFC3 (around 1.13 µ m and 1.4 µ m) and another in MIRI (between 5-7 µ m), along with another strong SO 2 feature (7.1-7.7 µ m) and a weak NH 3 feature (10.311 µ m) in MIRI, shown in Figure 3. The panchromatic spectrum exhibits a slight downward slope from blueto-red, indicative of aerosol scattering 18, 19, 20 , and a strong concavity across MIRI, previously attributed to silicate cloud particulate resonance features 16 . The  \nFig. 1 | Spectroscopic and broadband NIRCam lightcurves of the transit of WASP-107b. The raw spectroscopic F322W2 and F444W transit lightcurves are shown in panels a and b after spectral binning (0.015 µ m bins) but without any temporal binning. Masked values (for example, cosmic rays) have been colored black. Even from these raw data, it is possible to visually identify the increased transit depth ≲ 3 µ m primarily caused by H 2 O, from 3.9-4.1 µ m caused by SO 2 , and from 4.3-4.5 µ m caused by CO 2 . The F322W2 broadband (2.45-3.95 µ m) and F444W broadband (3.89-4.97 µ m) transit lightcurves are shown panels c and d with gray points without error bars. Black points with 1 σ error bars show temporally binned data with a cadence of 5 minutes; note that the error bars are typically smaller than the point size. BJD TDB is the date in the Barycentric Julian Date in the Barycentric Dynamical Time system.  \n<!-- image -->  \nFig. 2 | Independent reductions of the transmission spectrum of WASP-107b. a, The NIRCam F322W2 and F444W transmission spectra as reduced by the Eureka! , Pegasus , and tshirt pipelines are shown in different colors at a constant wavelength binning of ∆ λ = 0 . 015 µ m and with 1 σ error bars. All three analyses show clear agreement on the overall shape of the spectrum, with features from H 2 O ( ∼ 2.5-3.5 µ m), CH 4 ( ∼ 3.2-3.8 µ m), SO 2 ( ∼ 3.9-4.1 µ m), and CO 2 ( ∼ 4.2-4.6 µ m) all clearly visible by-eye in each of the reductions. b, The absorption cross sections of the six detected species, many of which are visually identifiable in panel a .  \n<!-- image -->  \npresence of both CO 2 and SO 2 features is indicative of envelope metal enrichment above solar and photochemistry 21 , while the relatively weak CH 4 feature is suggestive of CH 4 depletion 2, 10, 16 .  \nTo rigorously infer the atmospheric composition and internal temperature from the observed transmission spectrum, we employ Bayesian inference with the transmission spectra generated from a suite of 1-dimensional radiative-convective-photochemical equilibrium models (1D-RCPE) 11 (see Methods). This self-consistent method properly captures the degeneracies between the intrinsic atmospheric composition and chemical processes. The final result from this process are samples from a posterior-probability distribution that represents the constraints on T irr , T int , [M/H], C/O, and cloud properties, and an estimate of the Bayesian model evidence, which we use to draw conclusions about WASP-107b's atmosphere. Figure 3 shows that this model setup adequately explains the observed panchromatic spectrum, capturing nearly all of the salient features. From this process we find a metallicity of 10 -18 × solar 3 (at 68 % confidence, median of 12 . 3 × solar) and a sub-solar carbon-tooxygen ratio (C/O = 0 . 33 +0 . 06 -0 . 05 ). Furthermore, the  \nFig. 3 | Interpretation of WASP-107b's transmission spectrum. The observed transmission spectrum of the planet with 1 σ error bars is compared to the best-fit one-dimensional radiative-convective-photochemical equilibrium models (1D-RCPE model, χ 2 /N data =1.4) shown at a spectral resolution of R=300. The colored shaded regions show the contributions from individual gases to the best fit model. The gray dashed line shows the clear atmosphere component of the model, that is, the gas contributions without the presence of clouds or hazes. Panel a shows the broad wavelength spectrum (0.8-12 µ m) of the planet. Panel b shows the fit residuals with the corresponding 2 σ data error envelope. Panel c shows the NIRCam observations, while d shows HST WFC3 spectra and e shows JWST MIRI observations. The HST/WFC3 data are binned at a constant ∆ λ = 0 . 025 µ m, the NIRCam data are binned at ∆ λ = 0 . 015 µ m, and the MIRI data are binned at ∆ λ = 0 . 15025 µ m.  \n<!-- image -->  \nspectrum also requires a high internal temperature (Tint > 345 K at 99 . 7% confidence, while a value of < 100 K would be expected 4 given the planet's low mass and the star's ∼ 3 Gyr age 5 ), and an atmosphere with a strong enough vertical mixing (that is, eddy diffusion, log( K zz ) = 8 . 6 +0 . 4 -0 . 2 ) to quench methane along the deeper (0.25-0.65 bar) and hotter (around 1,1001,300 K) parts of the atmosphere, confirming previous suggestions 2, 16 .  \nWe further validate the interpretation from the self-consistent 1D-RCPE models by performing additional Bayesian inferences using parametric atmospheric models that independently fit for the chemical abundances and vertical pressure-temperature structure of the planetary atmosphere without any assumptions of radiative-convective thermo-chemical equilibrium (called, 'free-retrievals'). Using two independent inference frameworks (Aurora and CHIMERA, see Methods, detection significances from CHIMERA) we confirm the detections of CO 2 (27 σ ), H 2 O (18 σ ), SO 2 (8 σ ), CO (5 σ ), NH 3 (5 σ ), and CH 4 (8 σ ) at strong  \nconfidence in agreement with the 1D-RCPE models. We find that the detection of NH 3 is mostly driven by the NIRCam observations and do not depend solely on the red-edge of the MIRI observations (see Methods). The derived chemical abundances, assumed to be constant with height by these models, are also consistent with the inferred abundance profiles from the 1D-RCPE models (see Fig. 4) and are also suggestive of a metal enriched envelope with depleted CH 4 abundances.  \nThe relatively high internal temperature we infer for WASP-107b is likely caused by tidal heating in the planetary interior. Recent radial-velocity observations measured the planet to have a mildly non-zero orbital eccentricity of e = 0 . 06 ± 0 . 04 (ref. 5 ). Tidal heating relations 22 predict that at this nominal e = 0 . 06 the internal temperature of WASP-107b will be Tint ≈ 350 K for a Neptune-like tidal quality factor of Q = 10 4 . The expected internal temperature from tidal heating drops to Tint ≈ 200 K to Tint ≈ 110 K for Jupiter-like tidal quality factors of Q = 10 5  \nFig. 4 | Inferred molecular volume mixing ratios from WASP107b's transmission spectrum. The retrieved volume mixing rations (that is, abundances) for each detected gas (panels a -f ) are shown from the free-retrieval (gray posterior distributions, with median and 68% confidence error bars) and from the 1D-RCPE grid inference (median and 68% confidence profiles shown as colored pressure-dependent abundance profiles). The black solid lines show expectations for an atmosphere in chemical equilibrium under the inferred [M/H] and C/O. The dotted black lines show expectations for chemical disequilibrium under a cool internal temperature of 200 K. The self-consistent abundance profiles from the 1D-RCPE retrieval for a high internal temperature are generally consistent with the retrieved abundances from the free retrieval within 1 σ . The red horizontal shaded region spans pressures from 1mbar to 10 -5 bar and corresponds to the pressures probed by our observations. The colors of the abundance profiles match the contributions in Figure 3 and the cross-sections in panel b of Figure 2.  \n<!-- image -->  \nto Q = 10 6 . Additional heating of the deep atmosphere may be achieved by vertical and horizontal mixing 23, 24, 25, 26 . If we assume that tidal effects are solely responsible for heating WASP-107b's atmosphere, then our retrieved 3 σ lower limit of Tint > 345 K implies a corresponding 3 σ upper limit on the planet's tidal quality factor of Q < 10 3 . 8 . If WASP107b has a tidal quality factor significantly lower than Neptune ( 10 3 . 9 ≲ Q N ≲ 10 4 . 5 ), 27 this would be consistent with the inference of a large core for the planet, since typical core material for ice giants is expected to have Q ≈ 10 2 , while typical gas envelopes have Q ≈ 10 5 28  \nThe large value of T int implies a much hotter, lower-density H/He envelope that has been previously appreciated. Using state-of-the-art structure models 29 , along with T int = 350 K (the retrieved 3 σ lower limit), we find that the planet's radius can be explained by a model that has > 22 M ⊕ of rock/iron in its interior, here modeled as a distinct core. This ratio of solids to H/He is similar to that of the bulk composition of Uranus and Neptune in our solar system 30 . Our  \nrevised view of the planet is quite different than previous work 5, 31 , as without tidal heating the planet's low bulk density can only be explained by a structure that is mostly H/He with a very small core ( < 5 M ⊕ , ref 5 ), perhaps at odds with core-accretion theory.  \nThe inferred atmospheric metallicity of WASP107b is lower than expectations from the Solar System metal enrichment trend 32 as determined by the CH 4 abundances 33 , which predicts an enhancement of about 32 × solar (see also ref. 34 ). Our results confirm that different elements in a planetary atmosphere can be differently enhanced, as previously suggested by HST observations 32 . Furthermore, our results demonstrate that individual molecules (for example, H 2 O) may not be good bulk metallicity tracers. Instead, JWST broadband spectra as presented here, presents a key opportunity to derive estimates of the bulk atmospheric metal enrichment informed by the measured abundances of several gases and by self-consistently considering the impact of disequilibrium processes arising from interactions between the interior and atmosphere of the planet.  \nThe understanding of vertical mixing in the atmospheres of giant planets and brown dwarfs remains a significant challenge in atmospheric physics 1, 35 . The inferred vertical mixing strength ( K zz ) can be high ( K zz ∼ 10 8 -10 11 cm 2 s -1 , depending on T int ) in convective zones where mixing is driven by convective overturn and mixing length theory can be used, or much more uncertain in radiative zones where the driving mechanism remains unclear 36, 37 . Recent studies of mixing in brown dwarf atmospheres, at temperatures similar to WASP-107b 35, 38 , infer low K zz values of 10 2 -10 5 cm 2 s -1 due to sluggish mixing in deep atmospheric radiative zones where chemical abundances are quenched. Studies of this same phenomenon in Jupiter have long suggested a K zz value of ∼ 10 8 -10 9 cm 2 s -1 , although recent work 39 points to a lower value ( K zz ∼ 10 6 cm 2 s -1 ) as the best explanation for Jupiter's CO and H 2 O abundances, again perhaps due to a deep radiative zone. Overall, the high K zz values implied for WASP-107b are striking in comparison to other objects. This suggests the quenching of chemical abundances in an atmospheric convective zone, with a high internal flux and shallow radiative-convective boundary. This can only be achieved if significant additional internal energy, as from tidal heating, keeps the interior and deep atmosphere much warmer than a standard cooling model would suggest.  \nThe detection of the major C, O, N, and S reservoirs in the spectrum of WASP-107b resulting from the broad wavelength coverage demonstrates the unparalleled capabilities of JWST for the detailed atmospheric characterization of exoplanet atmospheres. The simultaneous constraints on multiple chemical species enables unique solutions for the bulk atmospheric metal enrichment, strength of vertical mixing, and provides strong evidence for a high internal temperature most likely arising from tidal heating due to a small, yet significant, orbital eccentricity. The combination of constraints on atmospheric metallicity and the internal heat flux together provide novel constraints on the relative gas-to-core mass fraction, naturally explaining the low planetary density. These initial constraints on the elemental ratios of C, O, S, and N have the potential to inform the planetary accretion history 40 .  \nThe detection and constraint on the abundance of CH 4 in this warm Saturn adds to the growing number of inferences of this sought-after carbon-bearing species in transiting exoplanets 11, 41 . Furthermore, the low abundance of methane relative to thermochemical expectations confirms its sensitivity to mixing processes and the internal temperature/heat flux 1 , providing a critical atmospheric diagnostic of interior processes and structure. We anticipate that most common type of planets across the galaxy will have elevated internal temperatures arising from tidal heating, and thus should have relative depletions of methane. Of the 262 known cool ( < 1,000 K) 'Neptune-like' 42 planets (with well determined mass and radii), approximately 2/3 have a reported non-zero eccentricity 43 . As with WASP-107b, deciphering the intrinsic nature of these worlds will be critically dependent upon the constraints on the total elemental inventory, the strength of vertical mixing, and the internal temperature. Future studies from the MANATEE program will explore the transmission and emission spectrum of warm exoplanets to further disentangle the effects of disequilibrium chemistry due to interior-atmosphere interactions, photochemistry, and directly link this population to the solar system gas giants and their theorized formation pathways.", 'References': "- 46. Bushouse, H. et al. JWST calibration pipeline (2023). Zenodo, https://doi.org/10.5281/zenodo. 7829329.\n- 47. Ahrer, E.-M. et al. Early Release Science of the exoplanet WASP-39b with JWST NIRCam. Nature 614 (7949), 653-658 (2023).\n- 48. Welbanks, L. et al. A high internal heat flux and large core in a warm neptune exoplanet (2024). Zenodo, https://doi.org/10.5281/zenodo. 10780448.\n- 49. Horne, K. An optimal extraction algorithm for CCD spectroscopy. Publ. Astron. Soc. Pac. 98 , 609-617 (1986).\n- 50. Schlawin, E. et al. JWST Noise Floor. I. Random Error Sources in JWST NIRCam Time Series. Astron. J. 160 (5), 231 (2020).\n- 51. Schlawin, E. et al. JWST NIRCam Defocused Imaging: Photometric Stability Performance and How It Can Sense Mirror Tilts. Publ. Astron. Soc. Pac. 135 (1043), 018001 (2023).\n- 52. Beatty, T. G. et al. Evidence for Atmospheric Cold-trap Processes in the Noninverted Emission Spectrum of Kepler-13Ab Using HST/WFC3. Astron. J. 154 (4), 158 (2017).\n- 53. Bell, T. J. et al. Nightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43b. arXiv e-prints arXiv:2401.13027 (2024).\n- 54. Bouwman, J. et al. Spectroscopic Time Series Performance of the Mid-infrared Instrument on the JWST. Publ. Astron. Soc. Pac. 135 (1045), 038002 (2023).\n- 55. Lomb, N. R. Least-Squares Frequency Analysis of Unequally Spaced Data. Astrophys. Space Sci. 39 (2), 447-462 (1976).\n- 56. Scargle, J. D. Studies in astronomical time series analysis. II. Statistical aspects of spectral analysis of unevenly spaced data. Astrophys. J. 263 , 835853 (1982).  \n- 57. Kendrew, S. et al. The Mid-Infrared Instrument for the James Webb Space Telescope, IV: The Low-Resolution Spectrometer. Publ. Astron. Soc. Pac. 127 (953), 623 (2015).\n- 58. Bell, T. J. et al. A First Look at the JWST MIRI/LRS Phase Curve of WASP-43b. arXiv e-prints arXiv:2301.06350 (2023).\n- 59. Clemens, J. C., Crain, J. A. & Anderson, R. The Goodman spectrograph . (eds Moorwood, A. F. M. & Iye, M.) Ground-based Instrumentation for Astronomy , Vol. 5492 of Society of Photo-Optical Instrumentation Engineers (SPIE) Conference Series , 331-340 (2004).\n- 60. Vogt, S. S. et al. HIRES: the high-resolution echelle spectrometer on the Keck 10-m Telescope . (eds Crawford, D. L. & Craine, E. R.) Instrumentation in Astronomy VIII , Vol. 2198 of Society of Photo-Optical Instrumentation Engineers (SPIE) Conference Series , 362 (1994).\n- 61. Collins, K. A., Kielkopf, J. F., Stassun, K. G. & Hessman, F. V. AstroImageJ: Image Processing and Photometric Extraction for Ultra-precise Astronomical Light Curves. Astron. J. 153 (2), 77 (2017).\n- 62. Beatty, T. G. et al. A Significant Overluminosity in the Transiting Brown Dwarf CWW 89Ab. Astron. J. 156 (4), 168 (2018).\n- 63. Kreidberg, L. batman: BAsic Transit Model cAlculatioN in Python. Publ. Astron. Soc. Pac. 127 (957), 1161 (2015).\n- 64. Foreman-Mackey, D., Hogg, D. W., Lang, D. & Goodman, J. emcee: The MCMC Hammer. Publ. Astron. Soc. Pac. 125 (925), 306 (2013).\n- 65. Luger, R. et al. starry: Analytic Occultation Light Curves. Astron. J. 157 (2), 64 (2019).\n- 66. Kurucz, R.-L. Atlas9 stellar atmosphere programs and 2km/s grid. Kurucz CD-Rom 13 (1993).\n- 67. Bourque, M. et al. The exoplanet characterization toolkit (exoctk) (2021). Zenodo, https://doi.org/ 10.5281/zenodo.4556063.\n- 68. Salvatier, J., Wiecki, T. V. & Fonnesbeck, C. Probabilistic programming in python using pymc3. PeerJ Computer Science 2 , e55 (2016).\n- 69. Gelman, A. & Rubin, D. B. Inference from Iterative Simulation Using Multiple Sequences. Statistical Science 7 , 457-472 (1992).\n- 70. Allan, D. W. Statistics of atomic frequency standards. IEEE Proceedings 54 , 221-230 (1966).\n- 71. Winn, J. N. et al. The Transit Light Curve Project. IX. Evidence for a Smaller Radius of the Exoplanet XO-3b. Astrophys. J. 683 (2), 1076-1084  \n(2008).  \n- 72. Kipping, D. M. Efficient, uninformative sampling of limb darkening coefficients for two-parameter laws. Mon. Not. R. Astron. Soc. 435 (3), 21522160 (2013).\n- 73. Magic, Z., Chiavassa, A., Collet, R. & Asplund, M. The Stagger-grid: A grid of 3D stellar atmosphere models. IV. Limb darkening coefficients. Astron. Astrophys. 573 , A90 (2015).\n- 74. Grant, D. & Wakeford, H. R. Exo-tic/exotic-ld: Exotic-ld v3.0.0 (2022). Zenodo, https://doi.org/ 10.5281/zenodo.7437681.\n- 75. Piskorz, D. et al. Ground- and Space-based Detection of the Thermal Emission Spectrum of the Transiting Hot Jupiter KELT-2Ab. Astron. J. 156 (3), 133 (2018).\n- 76. Mansfield, M. et al. A unique hot Jupiter spectral sequence with evidence for compositional diversity. Nat. Astron. 5 , 1224-1232 (2021).\n- 77. Tsai, S.-M. et al. VULCAN: An Open-source, Validated Chemical Kinetics Python Code for Exoplanetary Atmospheres. Astrophys. J. Suppl. Ser. 228 (2), 20 (2017).\n- 78. Husser, T. O. et al. A new extensive library of PHOENIX stellar atmospheres and synthetic spectra. Astron. Astrophys. 553 , A6 (2013).\n- 79. France, K. et al. The MUSCLES Treasury Survey. I. Motivation and Overview. Astrophys. J. 820 (2), 89 (2016).\n- 80. Youngblood, A. et al. The MUSCLES Treasury Survey. II. Intrinsic LY α and Extreme Ultraviolet Spectra of K and M Dwarfs with Exoplanets*. Astrophys. J. 824 (2), 101 (2016).\n- 81. Loyd, R. O. P. et al. The MUSCLES Treasury Survey. III. X-Ray to Infrared Spectra of 11 M and K Stars Hosting Planets. Astrophys. J. 824 (2), 102 (2016).\n- 82. Welbanks, L. & Madhusudhan, N. On Degeneracies in Retrievals of Exoplanetary Transmission Spectra. Astron. J. 157 (5), 206 (2019).\n- 83. Underwood, D. S. et al. ExoMol molecular line lists - XIV. The rotation-vibration spectrum of hot SO2. Mon. Not. R. Astron. Soc. 459 (4), 3890-3899 (2016).\n- 84. Benneke, B. & Seager, S. How to Distinguish between Cloudy Mini-Neptunes and Water/Volatile-dominated Super-Earths. Astrophys. J. 778 (2), 153 (2013).\n- 85. Gao, P., Wakeford, H. R., Moran, S. E. & Parmentier, V. Aerosols in Exoplanet Atmospheres. J. Geophys. Res.: Planets 126 (4), e06655 (2021).\n- 86. Line, M. R. & Parmentier, V. The Influence of Nonuniform Cloud Cover on Transit Transmission Spectra. Astrophys. J. 820 (1), 78 (2016).\n- 87. Welbanks, L. & Madhusudhan, N. On Atmospheric Retrievals of Exoplanets with Inhomogeneous Terminators. Astrophys. J. 933 (1), 79 (2022).\n- 88. Barstow, J. K. Unveiling cloudy exoplanets: the influence of cloud model choices on retrieval solutions. Mon. Not. R. Astron. Soc. 497 (4), 4183-4195 (2020).\n- 89. Tsiaras, A. et al. A Population Study of Gaseous Exoplanets. Astron. J. 155 (4), 156 (2018).\n- 90. Fisher, C. & Heng, K. Retrieval analysis of 38 WFC3 transmission spectra and resolution of the normalization degeneracy. Mon. Not. R. Astron. Soc. 481 (4), 4698-4727 (2018).\n- 91. Benneke, B. et al. A sub-Neptune exoplanet with a low-metallicity methane-depleted atmosphere and Mie-scattering clouds. Nat. Astron. 3 , 813-821 (2019).\n- 92. Pinhas, A., Rackham, B. V., Madhusudhan, N. & Apai, D. Retrieval of planetary and stellar properties in transmission spectroscopy with AURA. Mon. Not. R. Astron. Soc. 480 (4), 5314-5331 (2018).\n- 93. Welbanks, L. & Madhusudhan, N. Aurora: A Generalized Retrieval Framework for Exoplanetary Transmission Spectra. Astrophys. J. 913 (2), 114 (2021).\n- 94. Grant, D. et al. JWST-TST DREAMS: Quartz Clouds in the Atmosphere of WASP-17b. Astrophys. J. Lett. 956 (2), L29 (2023).\n- 95. Ackerman, A. S. & Marley, M. S. Precipitating Condensation Clouds in Substellar Atmospheres. Astrophys. J. 556 (2), 872-884 (2001).\n- 96. Molli'ere, P. et al. petitRADTRANS. A Python radiative transfer package for exoplanet characterization and retrieval. Astron. Astrophys. 627 , A67 (2019).\n- 97. Wakeford, H. R. & Sing, D. K. Transmission spectral properties of clouds for hot Jupiter exoplanets. Astron. Astrophys. 573 , A122 (2015).\n- 98. Mai, C. & Line, M. R. Exploring Exoplanet Cloud Assumptions in JWST Transmission Spectra. Astrophys. J. 883 (2), 144 (2019).\n- 99. Line, M. R., Knutson, H., Deming, D., Wilkins, A. & Desert, J.-M. A Near-infrared Transmission Spectrum for the Warm Saturn HAT-P-12b. Astrophys. J. 778 (2), 183 (2013).\n- 100. Madhusudhan, N. & Seager, S. A Temperature and Abundance Retrieval Method for Exoplanet Atmospheres. Astrophys. J. 707 (1), 24-39 (2009).\n- 101. Skilling, J. Nested Sampling . (eds Fischer, R., Preuss, R. & Toussaint, U. V.) , Vol. 735 of American Institute of Physics Conference Series , 395-405 (2004).\n- 102. Feroz, F., Hobson, M. P. & Bridges, M. MULTINEST: an efficient and robust Bayesian inference tool for cosmology and particle physics. Mon. Not. R. Astron. Soc. 398 (4), 1601-1614 (2009).\n- 103. Feroz, F., Hobson, M. P., Cameron, E. & Pettitt, A. N. Importance Nested Sampling and the MultiNest Algorithm. The Open Journal of Astrophysics 2 (1), 10 (2019).\n- 104. Rothman, L. S. et al. HITEMP, the hightemperature molecular spectroscopic database. J. Quant. Spectrosc. Radiat. Transf. 111 , 2139-2150 (2010).  \n105. Yurchenko, S. N. & Tennyson, J. ExoMol line lists - IV. The rotation-vibration spectrum of methane up to 1500 K. Mon. Not. R. Astron. Soc. 440 (2), 1649-1661 (2014).  \n- 106. Yurchenko, S. N., Barber, R. J. & Tennyson, J. A variationally computed line list for hot NH 3 . Mon. Not. R. Astron. Soc. 413 , 1828-1834 (2011).  \n107. Underwood, D. S. et al. ExoMol molecular line lists - XIV. The rotation-vibration spectrum of hot SO 2 . Mon. Not. R. Astron. Soc. 459 (4), 38903899 (2016).  \n108. Welbanks, L., McGill, P., Line, M. & Madhusudhan, N. On the Application of Bayesian Leaveone-out Cross-validation to Exoplanet Atmospheric Analysis. Astron. J. 165 (3), 112 (2023).  \n- 109. Vehtari, A. & Ojanen, J. A survey of bayesian predictive methods for model assessment, selection and comparison. Statistics Surveys 6 , 142228 (2012).\n- 110. Vehtari, A., Gelman, A. & Gabry, J. Practical bayesian model evaluation using leave-one-out cross-validation and waic. Statistics and computing 27 (5), 1413-1432 (2017).\n- 111. Vehtari, A., Simpson, D., Gelman, A., Yao, Y. & Gabry, J. Pareto smoothed importance sampling. Journal of Machine Learning Research 25 (72), 1-58 (2024).\n- 112. McGill, P. et al. First semi-empirical test of the white dwarf mass-radius relationship using a single white dwarf via astrometric microlensing. Mon. Not. R. Astron. Soc. 520 (1), 259-280  \n(2023).  \n113. Challener, R. C., Welbanks, L. & McGill, P. Bringing 2D Eclipse Mapping out of the Shadows with Leave-one-out Cross Validation. Astron. J. 166 (6), 251 (2023).  \n114. Gaia Collaboration et al. Gaia Data Release 3. Summary of the content and survey properties. Astron. Astrophys. 674 , A1 (2023).  \n115. Skrutskie, M. F. et al. The Two Micron All Sky Survey (2MASS). Astron. J. 131 (2), 1163-1183 (2006).  \n116. Cutri, R. M. & et al. VizieR Online Data Catalog: AllWISE Data Release (Cutri+ 2013). VizieR Online Data Catalog II/328 (2014).  \n117. Stevens, D. J., Gaudi, B. S. & Stassun, K. G. Measuring Model-independent Masses and Radii of Single-lined Eclipsing Binaries: Analytic Precision Estimates. Astrophys. J. 862 (1), 53 (2018).  \n118. Schlafly, E. F. & Finkbeiner, D. P. Measuring Reddening with Sloan Digital Sky Survey Stellar Spectra and Recalibrating SFD. Astrophys. J. 737 (2), 103 (2011).  \n119. Baraffe, I., Homeier, D., Allard, F. & Chabrier, G. New evolutionary models for pre-main sequence and main sequence low-mass stars down to the hydrogen-burning limit. Astron. Astrophys. 577 , A42 (2015).  \n120. Harris, C. R. et al. Array programming with NumPy. Nature 585 (7825), 357-362 (2020).  \n121. Astropy Collaboration et al. Astropy: A community Python package for astronomy. Astron. Astrophys. 558 , A33 (2013).  \n122. Astropy Collaboration et al. The Astropy Project: Building an Open-science Project and Status of the v2.0 Core Package. Astron. J. 156 (3), 123 (2018).  \n123. Virtanen, P. et al. SciPy 1.0: Fundamental Algorithms for Scientific Computing in Python. Nat. Methods 17 , 261-272 (2020).  \n124. Hunter, J. D. Matplotlib: A 2d graphics environment. Computing in Science & Engineering 9 (3), 90-95 (2007).  \nAcknowledgments. L.W. acknowledges support for this work provided by NASA through the NASA Hubble Fellowship grant #HST-HF2-51496.001-A awarded by the Space Telescope Science Institute, which is operated by the Association of Universities for Research in Astronomy, Inc., for NASA, under contract NAS5-26555. T.P.G. and T.J.B. acknowledge support from NASA JWST WBSs  \n411672.07.04.01.02 and 411672.07.05.05.03.02. P.M. acknowledges that this work was performed under the auspices of the U.S. Department of Energy by Lawrence Livermore National Laboratory under Contract DE-AC52-07NA27344. The document number is LLNL-JRNL-859050. M.R.L. acknowledges NASA XRP award 80NSSC19K0446 and STScI grant HSTAR-16139. M.R.L. and L.W. acknowledge Research Computing at Arizona State University for providing HPCand storage resources that have significantly contributed to the research results reported within this manuscript. L.W. thanks Michiel Min for meaningful conversations. K.O. acknowledges support from JSPS KAKENHI Grant Number JP23K19072. M.M. acknowledges funding from NASA Goddard Spaceflight Center via NASA contract NAS5-02105. A.D. and P-O.L. acknowledge funding support from CNES. We thank Marcia Rieke for allocating the NIRCam time for this program.  \nAuthor Contribution. L.W. led the modeling analysis effort, performed the atmospheric modeling using free-retrievals and 1D-RCPE models, contributed to the theoretical analysis/interpretation of the observations, led the cross-validation analysis, and led the writing of the manuscript. T.J.B. contributed the fiducial Eureka! analyses of the NIRCam and MIRI observations, verified the observing parameters of the NIRCam observations, and contributed to the text. T.G.B. contributed the Pegasus analyses of the HST and NIRCam observations, verified the observing parameters of the NIRCam observations, performed the SED fitting and radius estimation, performed the tidal heating analysis, and contributed to the text. M.R.L. performed the 1D-RCPE simulations, wrote introductory text and methods, and helped sculpt the direction of the manuscript. K.O. provided comments on the manuscript and helped with interpreting the NH3 detection. J.J.F. contributed to the planet structure models, contributed to the interpretation of the internal temperature of the planet, and contributed to the text. E.S. simulated the planet and retrievals before launch, help planned the observation specifications, did the tshirt reduction and light curve fitting, and contributed to the text. T.P.G. selected the planet for observation, designed the observational program, directed some of the analysis, and commented on the manuscript. E.R. provided feedback on the modeling interpretation and provided comments on the manuscript. P.M. contributed the cross-validation analysis and to the text. V.P. provided  \nfeedback throughout the project and helped with the vertical mixing discussion. Y.T. contributed to the planet structure models. M.M. contributed to deriving the planet's orbital parameters and feedback on the text. I.E., S.M., L.S.W., and K.E.A. provided useful discussions throughout the manuscript process. PO.L. designed the MIRI observational program and provided its data. A.D. contributed to the MIRI data analysis.  \nCompeting Interests Statement The authors declare no competing interests.", 'NIRCam Reduction': 'Both of our new NIRCam observations used the BRIGHT2 readout pattern and the SUBGRISM256 subarray, with the F322W2 observations using 7 groups per integration and 1,293 integrations while the F444W observations used 15 groups per integration and 625 integrations. In the subsections below, we will describe the three independent pipelines we used to reduce these NIRCam data.', 'Eureka!': "In Eureka! 's Stage 5, we fitted astrophysical and systematic noise models to our spectroscopic lightcurves. For both NIRCam filters, our systematic noise model consisted of a quadratic trend in time and a linear decorrelation as a function of the spatial position and PSF-width measured during Stage 3. For MIRI/LRS, we used a linear trend in time, an exponential ramp in time, and a linear decorrelation as a function of the spatial position and PSF-width. For all observations, our astrophysical model consisted of a starry 65 transit model with quadratic limb-darkening parameters fixed to an ATLAS model limb-darkening spectra 66 as computed by the Exoplanet Characterization Toolkit (ExoCTK) 67 . We fixed all of our orbital parameters to those of Murphy et al. (in prep.; see the Derivation of Orbital Parameters section above) and adopted a minimally informative prior on the planet-to-star radius ratio.  \nFollowing the recommendations of ref. 53 , we removed the first 800 integrations of the MIRI/LRS observations to remove the worst part of the initial ramp in the lightcurve. We also removed integrations 475-490 from the NIRCam/F444W observations which exhibited a brief spike in noise. We removed no further integrations from the NIRCam/F322W2 observations. Finally, we also fitted a white noise multiplier to account for excess white noise. For all our observations, we used PyMC3 's No U-Turns Sampler 68 using two independent chains, each taking 4,000 tuning  \ndraws and then 3,000 posterior samples with a target acceptance rate of 0.85. We then validated that the chains had converged by ensuring the Gelman-Rubin statistic 69 was at or below 1.1. The 16th, 50th, and 84th percentiles of the posterior samples were then used to estimate the best-fit values and uncertainties for each fitted parameter.  \nFor the NIRCam/F322W2 observations, we find that the white noise is on average about 15% above our estimate of the stellar photon-limited noise floor in each channel, while F444W exhibited only white noise only about 7% above the estimated photon limit on average. This excess noise is likely the result of insufficiently corrected 1/ f noise 50 which gets partially converted to white noise in the time-series when spectroscopically binning the lightcurves. For MIRI/LRS, we used the estimated gain of 3.1 electrons/DN from ref. 53, 58 , as the current value of 5.5 electrons/DN used in the CRDS reference files is known to be incorrect. With this estimated gain, we find that our fitted white noise level is only about 10% above the estimated stellar photon noise limit near 5 µ m but climbs steadily to approximately 50% above the limit near 10 µ m and then climbs steeply to around 140% above the limit near 12 µ m. Part of this excess longwavelength white noise is likely due to the impact of background noise as these limits only considered the stellar photon noise. While neither of our NIRCam observations show evidence for residual red-noise in their Allan variance plots 70 , several of our MIRI/LRS channels do show moderate amounts of residual rednoise. Following the β error inflation method developed by ref. 71 , we computed β , the ratio of the median value of our Allan variance plots at 15-23 minute timescales (around WASP-107b's approximately 19minute transit ingress/egress duration) to the value expected for white noise, and multiplied our transmission spectra uncertainties by this amount. This resulted in an increase in the uncertainties by about 50% for wavelengths ≲ 6.5 µ m and 0-30% for longer wavelengths. After this, we arrived at our final 2.4512 µ mtransmission spectra.", 'Pegasus': 'We fit the F322W2 and F444W spectroscopic lightcurves from our Pegasus reduction using a BATMAN 63 transit model. We fixed most of the transit model parameters to the values measured from broadband fits to the JWST data (Murphy et al., in prep.; see the Derivation of Orbital Parameters section  \nabove), leaving only the planet-to-star radius ratio as the only free astrophysical parameter. We also simultaneously fit for a background quadratic trend across each visit, which had two associated slope parameters and a normalization factor. We did not impose a prior on any of these four parameters, and we fit each spectroscopic channel individually. For each channel, we used a quadratic limb-darkening law and fixed the limb-darkening coefficients to the values calculated from the ATLAS model 66 by ExoCTK 67 in the F322W2 and F444W bandpasses. To generate the limb-darkening coefficients we used the spectroscopic stellar properties measured in previous work 5 .  \nTo perform the lightcurve fit in each spectroscopic channel, we performed an initial Nelder-Mead likelihood maximization followed by MCMC likelihood sampling. We initialized the MCMC chains about the maximum likelihood point estimated from the Nelder-Mead maximization. We used the emcee 64 Python package to perform the MCMC sampling, using twenty walkers with a 2,000 step burn-in and a 4,000 step production run. At the end of this process we checked that the Gelman-Rubin statistics was below 1.1 for each parameter in each spectral channel to ensure the MCMC sampling had converged.  \nWe performed two tests to evaluate the goodnessof-fit of our transit modeling in each spectral channel. First, we confirmed that the per-point flux uncertainties the lightcurves were consistent with the standard deviation of the bestfit model residuals. Second, we calculated the Anderson-Darling statistic for the residuals to verify that they followed a Gaussian distribution. Our spectroscopic lightcurve fits did not show any evidence of non-Gaussianity in the residuals.  \nThe estimated depth uncertainties were 1.15 × the photon noise expectation in the F322W2 data and 1.06 × the photon noise expectation in the F444W data.', 'tshirt': 'We followed a similar procedure as previous NIRCam light curve fitting 11 , 47 . We use the starry 65 code to model the lightcurves and pymc3 68 to sample the posterior distributions of the fits. We adopted uninformative priors on the stellar limb darkening with a 2 parameter quadratic law 72 . This allows for comparison of results with the ATLAS stellar limb darkening models. The astrophysical starry model of the lightcurve is multiplied by an second order (quadratic) polynomial baseline to allow for trends  \nfrom instrument and astrophysical stellar variability. We bin the spectra in the time axis to 300 bins for faster lightcurve evaluation with starry . Finally, we include a parameter for the standard deviation of the data to allow for excess noise beyond the theoretical photon and read noise. We sampled the posterior with No U-Turns sampling 68 . We used 3,000 tuning steps, 3,000 sampling steps, and 2 chains with a target acceptance rate of 90%.', 'HST/WFC3 Re-reduction': 'HST previously observed transits of WASP-107b with Wide-Field Camera 3 (WFC3) using the G141 and G102 dispersers. The results of these observations have been reported previously 2, 10 . For consistency with the rest of our data analysis, we re-reduced and re-analyzed these data.  \nThe G141 data cover a single transit of WASP107b on UT 6 June 2017 using five orbits of HST time as a part of HST program GO-14915 (P.I. L. Kreidberg). At the start of each orbit, HST took a single F130N direct image of WASP-107 to establish a wavelength reference, and then the observatory switched to spatially scanned spectroscopic observations using the G141 grism. The full details of the observational setup are described in the original report on the results of this observation 2 .  \nThe shorter wavelength G102 data also cover a single transit of WASP-107b using five orbits of HST time on UT 31 May 2017 as a part of HST program GO-14916 (P.I. J. Spake). Each orbit of the G102 transit observation began with an F126N direct image to create a wavelength reference, and then the G102 grism was used to collect spatially scanned spectroscopy of the WASP-107 system. The complete description of these observations is reported in the original paper describing these data 10 .  \nWe reduced both transit observations using a custom data reduction pipeline that has been described elsewhere 52 and which we briefly summarize here. For each spatially scanned exposure, we began by  \nextracting 1D spectra for each of the individual upthe-ramp samples, accounting for both the residual background light and the slight angle of the scan pattern on the detector. We then summed these individual spectra to create the 1D spectrum from that exposure. We used the wavelength solutions generated from the direct images taken at the start of each orbit to extract spectroscopic lighturves in wavelength bins matching those used in the previous works on these data 2, 10 . These were nine evenly spaced bins from 0.877-1.139 µ m for the G102 data and twenty evenly spaced bins from 1.121-1.629 µ mfor the G141 data. We note that with the updated transit ephemeris for WASP-107b from these observations, we do not see evidence for a starspot crossing in the WFC3 data as was reported previously, 2 nor do we see starspot crossings in the NIRCam or MIRI observations.', 'MIRI Re-reduction': "We decided to independently re-reduce the MIRI/LRS spectra of ref. 16 to ensure the reduction was robust to different reduction choices and to ensure a selfconsistent reduction of the NIRCam and MIRI data. Our Eureka! re-reduction of the MIRI/LRS observations used version 0.9 of the Eureka! pipeline 14 , CRDS version 11.17.0 and context '1097', and jwst package version 1.10.2 (ref. 46 ). Our reduction method generally follows the Eureka! v1 method described by ref. 53 , with some differences and experimental new steps. The Eureka! Control Files and Eureka! Parameter Files we used are available for download from Zenodo (https://doi.org/10.5281/zenodo. 10780448; ref. 48 ), and the important parameters are summarized below.  \nIn our Stage 1 processing, we turned on the firstframe and lastframe steps (which respectively discard the first and last frames in each integration) in the jwst pipeline and increased the jump rejection threshold to 7 σ from 4 σ as we found these changes resulted in reduced scatter in the residuals of our lightcurve fits. We had also considered different combinations of turning on/off the firstframe, lastframe, and RSCD correction steps but found that it was best to turn the firstframe and lastframe steps on and leave the RSCD step off for these data. We also investigated using the default CRDS linearity reference file vs the linearity reference file used by ref. 16 and found that there was no clear impact on our final transmission spectra, so we adopted the linearity reference file used by ref. 16 .  \nAs pointed out by ref. 53 , it appears that narrow wavelength bins result in excessively noisy transmission spectra and underestimated error bars for the MIRI/LRS time-series observation (TSO) commissioning target L168-9b. Ref. 53 hypothesized that this wavelength-correlated noise could be the result of 390 Hz periodic noise observed in some MIRI subarrays (ref. 54 ; private comm., Michael Ressler). This noise appears as structured noise with a period of around 9 rows within an individual group and is likely caused by MIRI's electronics. To investigate the potential impacts of this structured noise on MIRI time-series observations, we developed a experimental 390 Hz noise removal method for the Eureka! pipeline. This method takes advantage of the knowledge that the noise exhibits a fixed waveform with the phase of the periodic noise remaining fixed within an integration but varying between integrations (only varying slightly and with an apparent cycle of 8 integrations); we determined the bestfit waveform using an entire segment of our science observations, and then we freely fit the phase shift of the waveform for each integration. We found that there is significant power in the 1st, 2nd, and 4th harmonics with the 1st harmonic's frequency being exactly 390.625 Hz ( f =1/(256 × 10 µ s); private comm., Michael Ressler). We found that our new algorithm significantly reduced the periodic noise visible in a Lomb-Scargle periodogram 55, 56 at the group level. While performing this 390 Hz noise removal step, we also performed group-level background subtraction (GLBS) for each row in each group (MIRI's dispersion direction is along a column, so rows run in the spatial direction) using the mean value of columns 11-30 and 44-63 (avoiding pixels contaminated by the star); this further removed structured noise from the Lomb-Scargle periodogram. To understand the impact on our final transmission spectra, we also performed another reduction without the GLBS step and another without either the 390 Hz noise removal or GLBS steps.  \nIn Eureka! 's Stage 2, we turned off the photom step as flux-calibrated spectra are not desired for time-series observations. In Stage 3 we performed a double-iteration 5 σ clipping along the time-axis for background pixels, a single iteration of 5 σ clipping along the spatial axis for each wavelength, and integration-level background subtraction using pixel columns 11-61 (excluding pixels within 10 pixels of the spectral trace) for each wavelength. Similar to the  \n<!-- image -->  \nExtended Data Fig. 1 | MIRI/LRS's 390Hz noise signal visualized. a: The background pixel values for part of the second integration of the MIRI/LRS observations of WASP-107b are shown in black points, while our fitted 390 Hz noise signal is shown with a red line. b: The LombScargle periodogram of the pixels in the second group of the second integration before the 390 Hz noise removal and GLBS steps are applied are shown in red, and the periodogram after these two steps are applied is shown in black. The three harmonics used in our cleaning procedure (1st, 2nd, and 4th) are indicated with pale blue vertical lines, while skipped 3rd harmonic is shown with a pale orange vertical line. The clear impact of the 390 Hz noise removal and GLBS steps is seen in the eliminated spikes in the Lomb-Scargle periodogram.  \n<!-- image -->  \nNIRCam spectra, we then performed optimal spectral extraction 49 using the pixels within 4 pixels of the spectral trace using a cleaned median integration to compute our spatial profile (clipping 5 σ outliers along the time axis, smoothing with a 7-pixel wide boxcar filter, and clipping pixels that differed by more than 10 σ with respect to the spatial profile). In Stage 4, we first removed three wavelengths which exhibited excessive noise in their lightcurves. We then binned the spectra a similar binning scheme as that used by ref. 16 (47 spectral bins spanning approximately 512 µ mwith a constant width of 0.15025 µ m); notably, however, we did not use wavelengths below 5 µ m which we expect to be significantly contaminated by light from around 3 µ m (ref. 57 ). We do extend our reduction out 12 µ m as was done by ref. 16 since we do not find evidence for the 'shadowed region effect' reported by refs. 53, 58 in these observations (consistent with the claim that not all observations appear to be affected by this as-yet unexplained phenomenon). Finally, as with NIRCam, we clip 4 σ outliers in the spectrally binned lightcurves compared to a cleaned version computed using a boxcar filter with a width of 20 integrations.", 'Derivation of Orbital Parameters': "All of the light curve fits to the NIRCam, HST, and MIRI data described above fix WASP-107b's orbital parameters to those derived by Murphy et al. (in prep.). We summarize this derivation here.  \nTo precisely determine WASP-107b's orbit, we simultaneously fit observations of three transits of WASP-107b from TESS, one from the Goodman High Throughput Spectrograph 59 (imaging mode, SDSS iband) on the Southern Astrophysical Research Telescope (SOAR), one from JWST/NIRCam F210M (observed simultaneously with our NIRCam F322W2 data), one from Spitzer/IRAC with IRAC's channel 2 (publicly available from Program 13052, PI: M. Werner), and one from JWST/MIRI LRS (broadband, observation described above), as well as radial velocity (RV) observations from CORALIE 44 and Keck/HIRES 5,60 . Together, these transit observations probe a wide range of wavelengths ( ∼ 0.6-12 µ m) and cover a baseline spanning roughly six years, while the radial velocity observations sample WASP107b's entire orbit. We used the default TESS pipeline reduction, reduced the SOAR/Goodman data using AstroImageJ 61 , reduced the NIRCam/F210M data using tshirt (as described above), reduced the Spitzer/IRAC data using a custom photometry pipeline (described in ref. 62 ), and reduced the MIRI/LRS data using Eureka! (as described above). For the RV data, we use the measurements as tabulated in ref. 5 .  \nWe model each of the transits using a batman transit model 63 . For all transit observations except for SOAR/Goodman, we also fit for a background, visit-long linear trend in flux versus time. The SOAR/Goodman data exhibited significant non-linear background trends due to telluric variations during the  \nobservation, which we corrected for using a Gaussian Process model. We fit all the data described above simultaneously using MCMC sampling with emcee 64 , sampling the time of conjunction, orbital period, inclination, semi-major axis, eccentricity, argument of periastron, planet-star radius ratios in each bandpass, quadratic limb-darkening coefficients in each bandpass, RV semi-amplitude and system velocity, and the slope and intercept of each visit's linear background trend. We ran this sampling for 10,500 steps, which was sufficient for each parameter to converge ( > 25x the average auto-correlation times, plus we visually inspected each MCMC walker time series). The best-fit parameter values are given in Murphy et al. (in prep.) and were P = 5.72148722 ± 3 × 10 -7 days, t 0 = 2,459,958.747244 ± 8 . 2 × 10 -6 BJDTDB, i = 89.57 ± 0.03 degrees, a/R ⋆ = 18.05 ± 0.1, e = 0.05 ± 0.01, and ω = -2.3 ± 6.1 degrees.", 'Comparing NIRCam Reductions': "A motivation for conducting three different reductions of the NIRCam data was to check the robustness of our final transmission spectrum against different choices and assumptions made during the image calibration, spectral extraction, and lightcurve fitting stages of our analyses. Generally, we find that all three reductions give the same general transmission spectrum with approximately the same depth uncertainties (Fig. 2 and panel a of Extended Data Fig. 2). The mean depth uncertainty across the entire NIRCam wavelength range is approximately 90 ppm at our constant wavelength ∆ λ = 0 . 015 µ m binning, which is larger than the mean point-to-point difference between the Eureka! and Pegasus spectra (58 ppm) and the Eureka! and tshirt spectra (72 ppm). A χ 2 comparison of the three spectra gives χ 2 / dof = 0 . 74 for Eureka! vs. Pegasus , and χ 2 / dof = 0 . 64 for Eureka! vs. tshirt . The larger difference between Eureka! and tshirt is largely because tshirt 's F322W2 spectrum consistently falls below that of Eureka! and Pegasus at wavelengths longer than ∼ 2.893 µ m; this difference may be caused by tshirt 's ROEBA method since the deviation occurs right at an amplifier boundary (see panel a of Extended Data Fig. 2). In both pipeline comparisons, the small reduced chi-squared values imply a < 0.1 σ likelihood that the spectra are drawn from two different underlying distributions for our 172 degrees of freedom. Since the choice of reduction methods did not significantly impact our final NIRCam spectra, we chose the Eureka! reduction as our fiducial NIRCam spectra for all subsequent atmospheric modelling work.  \nTo further investigate the sensitivity of our results to different limb-darkening assumptions, we also ran four separate fits with our fiducial Eureka! pipeline; namely, fixing our limb-darkening parameters to (1) ATLAS-predicted quadratic law coefficients  \nExtended Data Fig. 2 | Comparison of different NIRCam reductions and limb-darkening choices. a, The NIRCam F322W2 and F444W transmission spectra as reduced by the Eureka! , Pegasus , and tshirt pipelines are shown in different colours after having been smoothed by a 4-point wide boxcar filter. Both the Eureka! and Pegasus reductions fixed limb-darkening coefficients to ATLAS model predictions, while tshirt freely-fit quadratic coefficients. At wavelengths longer than ∼ 2.9 µ m, tshirt 's F322W2 spectrum consistently falls below Eureka! and Pegasus 's spectra; this difference is caused by a combination of tshirt 's ROEBA method (which results in a roughly constant offset across F322W2) and tshirt 's free limb-darkening (which results in a small slope across F322W2). b, A similar plot, demonstrating the minimal impacts of varying limb-darkening choices on our final spectra produced by Eureka! .  \n<!-- image -->  \ncomputed using ExoCTK (refs. 66, 67 ), (2) STAGGERpredicted quadratic law coefficients computed using ExoTiC-LD (refs. 73, 74 ), (3) STAGGER-predicted 4parameter law coefficients computed using ExoTiCLD (refs. 73, 74 ), and (4) freely fitting quadratic law coefficients using the reparameterization of ref. 72 for efficient and physical sampling. As shown in panel b of Extended Data Figure 2, none of these spectra significantly differ from each other. In particular, we find that comparing the transmission spectrum of our fiducial analysis which used the ATLAS quadratic limbdarkening coefficients to fits with limb-darkening choices only results in a reduced chi-squared value of 0.02 for STAGGER's quadratic model, 0.09 for STAGGER 4-parameter model, and 0.28 for the fit with freely-fit reparameterized quadratic limbdarkening coefficients. In all three cases, this means that the differences between the spectra are much less than the uncertainties on the measured depths. We also further disfavour the freely-fit limb-darkening coefficients as these fitted coefficients exhibited substantially more point-to-point scatter than would be expected for a physical limb-darkening spectrum.", 'HST/WFC3': "We fit each of the twenty-nine G102 and G141 spectroscopic transit lightcurves using a BATMAN 63 transit model and standard detrending techniques for WFC3 timeseries data 52 . As with the JWST spectroscopic  \ndata, for these fits, we fixed the transit center time, orbital period, orbital inclination, the scaled semimajor axis, the orbital eccentricity, and the argument of periastron to previously measured values (Murphy et al., in prep.; see the Derivation of Orbital Parameters section above). We also fixed the quadratic limbdarkening coefficients in each spectroscopic channel to the values estimated from the ATLAS limbdarkening model 66 by the Exoplanet Characterization Toolkit 67 . This left the planet-to-star radius ratio as the only free astrophysical parameter. We fit each spectroscopic channel individually.  \nAll the G102 and the G141 lightcurves showed the usual 'fishing-hook' systematic trend within each orbit and the background linear slope typical for WFC3 timeseries observations. We modeled this in each spectral channel as a part of the transit fitting process using an exponential ramp within each individual orbit, and a linear background trend across each visit, of the form  \nF detrend = ( mt V + n ) ( 1 -Ae t O τ ) . (1)  \nHere, t O is the time since the start of each orbit's observations, t V is the time since the start of the visit, and A and τ , and m and n are fitting coefficients for the exponential ramp and linear trend respectively. In addition to fitting the systematics in this way, we also  \ndid not use the data from the first orbit within each visit nor the first exposure from each orbit when fitting the data.  \nTo fit the transit lightcurve in each spectroscopic channel, we first performed a Nelder-Mead likelihood maximization to find an initial bestfit. We then used the emcee 64 Python package to perform an MCMC exploration of the surrounding likelihood space to improve this bestfit estimate. In each channel we used twenty MCMC walkers, each with a 1,000 step burnin followed by a 4,000 step production run. At the end of this we judged the MCMC to have converged by verifying that the Gelman-Rubin statistic for each parameter was below 1.1. We also checked to ensure that the median per-point flux uncertainty matched the standard deviation of the residuals to the bestfit lightcurve model in each channel. We additionally performed an Anderson-Darling test on each channel's residuals to check for non-Gaussianity. The lightcurve residuals in each channel appear well-behaved.  \nWe note that we do not see evidence for a starspot crossing in the third orbit of the G141 transit data, as was suggested previously 2 . Instead, the updated transit ephemeris and orbital properties we measure using the JWST data for WASP-107b serve to shift the start of transit egress slightly earlier at the time of the G141 observations. This accounts for the putative starspot feature in the earlier analyses' residuals. As a result, we do use the data from the third G141 orbit in our fitting. This slightly improves our measured depth uncertainties compared to those previous results.", 'MIRI': "Unfortunately, while our 390 Hz noise removal and GLBS steps remove structured noise from the LombScargle periodogram 55, 56 of the MIRI/LRS grouplevel data, we find that these steps ultimately have a fairly small impact on the final transmission spectra of our science target WASP-107b as well as the MIRI/LRS TSO commissioning target L168-9b. For example, Extended Data Figure 3 shows that the MIRI/LRS observations of L168-9b continue to show excess noise after the 390 Hz noise removal step has been applied. It is possible that the 390 Hz noise removal step does eliminate excess noise for 1 µ mbin sizes, but at that coarse of a resolution there are only 7 bins and there is substantial uncertainty in the estimated standard deviation from the small sample size. In addition, with finer bin size sampling than was used by ref. 53 , we are better able to understand how the  \nexcess noise varies with varying bin size. In particular, while we find that the excess noise decreases with increasing bin size (similarly to what was reported by ref. 53 ), there also appears to be a spike in the excess noise around a bin width of 0.25 µ m; this corresponds to an average spectral bin width of 9 pixels (although the bin width varies with wavelength) which is also the approximate period of the 390 Hz noise. Surprisingly, while this noise spike seems to share an approximate period with the known 390 Hz noise, the 390 Hz noise removal step does not appear to have removed the excess noise in the final transmission spectrum of L168-9b.  \nWe also see very limited impact from both the 390 Hz noise removal and GLBS steps in the WASP107b MIRI/LRS science observations (see Extended Data Fig. 4). Most likely this is because there is fairly minimal curvature in the waveform over a single row (which only spans about 7% of the first harmonic which has the largest amplitude), so the perrow background subtraction step performed on the integration-level data in Stage 3 adequately subtracts this structured noise. It is possible that this 390 Hz noise removal procedure could still be useful to future works which seek to use separate background calibration observations taken before and/or after the science observations instead of computing the background on the science observations themselves, but at present we do not recommend the 390 Hz noise removal procedure be applied to science observations alone due to the minimal impact and high computational cost. That said, it does not appear that our 390 Hz noise removal procedure negatively impacts our results, and we ultimately decide to use it in our fiducial reduction. The impacts of the GLBS step are noticeable but also minor, and it is as-yet unclear whether the noise introduced by estimating the group-level background outweighs the structured noise removed by this step.  \nComparing our fiducial spectrum (with the 390 Hz noise removal and GLBS steps) to the European Consortium's (hereafter referred to as the 'EC') three reductions presented by ref. 16 (see Extended Data Fig. 4) which used the CASCADe and TEATRO pipelines, as well as the Eureka! pipeline, it is again clear that the overall shape of the spectrum is robust to different analysis pipelines and different reduction choices. As pointed out by ref. 16 , the transit depth differences among the EC spectra displays an increasing trend with wavelength with the CASCADe pipeline giving larger depths at longer wavelengths, which they attribute to different to different systematics models  \nExtended Data Fig. 3 | Ademonstration of the underestimation of error bars in the MIRI/LRS observations of L168-9b and the impact of the 390 Hz noise removal step. The median fitted transit depth uncertainties decrease with increasing spectral bin width as would be expected for white noise (blue symbols). Meanwhile, the standard deviation of the L168-9b transmission spectrum is around 2 × the expected noise level in the spectrally unbinned data. The ratio of the standard deviation of the spectrum to the median fitted uncertainty decreases with increasing bin size with the exception of a peak around 0.25 µ m.  \n<!-- image -->  \nwhen fitting the lightcurves. As shown in Extended Data Figure 4, we find fairly similar conclusions with our fiducial spectrum which generally agrees well with the CASCADe spectrum. Looking more closely, it appears our fiducial spectrum has a slightly smaller transit depth around 7.5 µ mandaslightly larger transit depths around 7 µ m and from around 8-10 µ m compared to the three reductions of ref. 16 . This results in our fiducial spectrum having a slightly smaller bump near the ν 3 SO 2 feature and a slightly larger bump near the ν 1 SO 2 feature.", 'Atmospheric Retrievals': "Detailed interpretation of atmospheric spectra requires comparisons with atmospheric radiative transfer models by means of statistical algorithms such as Bayesian inference methods. These data-model inference techniques are commonly known as 'atmospheric retrievals' and enable constraints on the atmospheric properties of an exoplanet such as chemical composition and vertical temperature structure from an observed spectrum. The inference framework computes transmission spectra, generally on the order of millions or tens of millions per inference, from a parametric atmospheric model (that is, a 'forward model')  \nthat solves line-by-line radiative transfer under hydrostatic equilibrium. These atmospheric models generally assume a plane-parallel atmosphere and include parameters that determine the chemical abundances for different chemical gases, the vertical pressuretemperature structure of the planet, and the presence of clouds/hazes as additional sources of opacity in the atmosphere. Below we present the two paradigms in atmospheric modeling employed in this study, spanning a wide range in physico-chemical assumptions.", '1D-RCPE Grid-Retrieval': "In order to produce physically self-consistent solutions we fit the transmission spectrum with a suite of models that impose 1D-radiative convectivephotochemical-equilibrium (1D-RCPE). The coupling between the radiative-convective equilibrium solver (ScCHIMERA 11 , 75, 76 ) and the kinetics code (VULCAN 21 , 77 using the H-O-C-N-S reaction list from ref. 21 ) as well as additional details has been previously described in ref. 11 . The coupled model requires as inputs the incident stellar flux spectrum (T eff =4,425 K, log( g )[c.g.s.]=4.63; ref. 78 ) at the top of the planetary atmosphere (including the UV for photochemistry, using the HD 85512 MUSCLES  \nExtended Data Fig. 4 | A comparison of different reductions of the WASP-107b MIRI/LRS spectra. a: A demonstration of the impact of the 390 Hz noise removal and GLBS steps on our reduction of the WASP-107b MIRI/LRS data. For wavelengths > 10 µ m, the GLBS step ends up slightly reducing the final transmission, while also turning off the 390 Hz noise removal step appears to have no further impact at any wavelength. Error bars show 1 σ uncertainties. b: A comparison of our fiducial reduction with the three reductions presented by ref. 16 , with 1 σ uncertainties. While there are some differences between the four different reductions, the overall shape of the transmission spectrum is robust to differences in reduction choices. c: The per-point differences between different pairs of reductions, which are summarized with a histogram in panel d . With the exception of a single TEATRO point, our reduction agrees with the EC's three reductions at ≲ 3 σ . However, there is some structure to the differences between our reduction and those of the EC, with our reduction giving larger transit depths on average than the EC's from around 8-10 µ m.  \n<!-- image -->  \nspectrum 79, 80, 81 as a proxy, which matches the effective temperature and gravity of WASP-107 well within 1%) which can be scaled via an effective irradiation temperature, an internal temperature to set the deep adiabat, the atmospheric elemental abundances (via metallicity and a C/O as described in ref. 11 ), an eddy diffusivity, and the bulk planet properties, radius and mass. The outputs are the converged 1D temperature and gas volume mixing ratio pressure profiles that can then be 'post-processed' to produce a transmission spectrum. Extended Data Figure 5 highlights select parameter slices through the grid and the subsequent impacts on the spectra.  \nAs this process is computationally expensive owing to the large numbers of converged models required for the Bayesian inference, we generate the grid in stages. First, we generated a course grid in metallicity (0 ≤ [M/H] ≤ 2 in steps of 0.5), C/O (0.1 ≤ C/O ≤ 0.7 in steps of 0.2), internal temperature (100 ≤ T int ≤ 500 in steps of 100 K), and a vertically constant eddy mixing (7 ≤ log 10 K zz ≤ 9 in steps of 1), but at a fixed effective irradiation temperature (at the planetary equilibrium temperature-738 K). We then perform Bayesian inference on the observed spectrum with this course grid as described in ref. 11 (with more details specific to WASP-107b described below). Within the fitting process we also included  \na temperature profile offset free parameter (a simple additive shift to the whole profile) to account for possible variations in temperature between the limb and the planetary dayside which, via the scale height, can influence the feature sizes.  \nThe results of the course grid exercise effectively 'narrowed' the plausible parameter space down at which point we generated a more finely sampled grid (below which the grid spacing had no effect). This 'fine' grid was generated over 0.5 ≤ [M/H] ≤ 1.875 in steps of 0.125), C/O (0.05 ≤ C/O ≤ 0.6 in steps of 0.05), internal temperature (200 ≤ T int ≤ 550 in steps of 50 K), and eddy mixing (7 ≤ log 10 K zz ≤ 10 in steps of 0.5), resulting in 6,048 converged 1D-RCPE models. Based upon the temperature offset parameter from the course grid fit, this fine grid was generated at a cooler irradiation temperature (560 K) in order to more appropriately adjust for changes in the chemistry with temperature. This finer grid (at the new fixed irradiation temperature) was then refit to the data using the same inference procedure and is what we use to inform our primary conclusions. We also tested the effect of temperature by fitting, again, for a temperature profile offset parameter and found that it was consistent with zero at nearly 1 σ (-18 ± 14 K), suggesting that our choice of irradiation temperature for the fine grid resulted in a temperature profile that was consistent with the observed spectrum.  \nWithin the Bayesian inference procedure, as described in ref. 11 , we also fit for, on the-fly, the planetary reference pressure and reference radius (ref. 82 which shift and stretch the planetary spectrum and also affect the zero-point for the planetary gravity with height), an offset for the MIRI spectrum relative to the NIRCam F444 spectrum, the temperature profile offset parameter (described above), an ammonia abundance enhancement factor, a power law haze + gray cloud, and a parametric cloud profile to describe unknown cloud resonance features over the MIRI wavelengths (described more below). Including these and the 1D-RCPE grid parameters results in a total of 17 free parameters. The transmission spectra are generated with R=100,000 absorption cross sections (same line lists cited in ref. 11 , but also now including SO 2 , ref. 83 ) and fit to the data within the PyMultiNest routine, using a total of 500 live points and the default parameters. Gas and cloud detection significances are computed as described in refs. 32 , 84 . Generally the detection of different gases in the 1D-RCPE solution corresponds to a preference for the opacity of the gas in question as a significant  \nExtended Data Table 1 | 1D-RCPE retrieved atmospheric properties. Retrieved parameters (median and 1 σ uncertainties) and their prior ranges are included. log 10 ( α NH 3 ) is the enhancement to the NH 3 abundance profile and ∆ MIRI is the offset  \nbetween the MIRI observations and NIRCAM F444W.  \ncontribution to the spectrum, as only the opacity is removed from the inference and not from the chemistry, as described in ref. 11 . The retrieved parameters and priors are shown in Extended Data Table 1.  \nTo illustrate the sensitivity of our results to the key physical processes that enabled us to arrive at the hot interior solution, we explored perturbations to the atmospheric structure and resultant spectra, shown in Extended Data Figure 5. We perturb the nominal 1D-RCPE solution (given in Extended Data Table 1) by 1) turning off mixing and photochemistry (equilibrium vs. disequilibrium, top row of Extended Data Fig. 5); 2) changing the internal/effective temperature (middle row of Extended Data Fig. 5); and 3) changing the strength of the eddy diffusion (bottom row of Extended Data Fig. 5). Mixing from a hot deep layer (arising from a high T int ) results in a ∼ 3 order-of-magnitude depletion in the methane abundance compared to equilibrium. This has a substantial influence on the spectrum and readily explains the 'muted' methane features. Equilibrium abundances are clearly ruled out by the free retrieval constraints (-6.0 < log 10 CH 4 < -5.6, details below). It is also apparent that T int values lower than ∼ 350 K and a log 10 K zz lower than ∼ 8 struggle to result in the necessary reduction in the methane abundance even with mixing.  \nExtended Data Fig. 5 | Illustration of the effects of the key physical processes on the atmospheric structure (panels a, c, e) and resultant spectra (panels b, d, f) . Panels a and b show the impact of disequilibrium chemical processes (vertical mixing and photochemistry) relative to thermochemical equilibrium. Panels c and d show the influence of changing internal temperature, while the panels e and f show the impact of changing eddy diffusion strength. We only show the vertical abundance profiles (panels a , c , e ) for observable gases that are influenced by these effects (for instance, water is not shown as it not impacted). The observed transit spectrum is shown with grey points with 1 σ error bars in panels b , d , f .  \n<!-- image -->", 'Cloud Parameterization': 'There are two leading modeling paradigms for modeling clouds and hazes in exoplanetary atmospheres: microphysical models and parametric models. The former requires understanding of the nucleation, condensation, evaporation, coagulation, and transport of clouds 85 . The later aims to capture the spectroscopic signature of these condensates and aerosols without any assumptions of the physical and chemical processes that lead to their formation and destruction, attempting to account for their presence as to unbias any inferences of other properties of interest (for  \nexample, volume mixing ratios of different gases or atmospheric metallicity, refs. 18,86, 87, 88 ). Some parametric models have attempted to capture the functional dependence of cloud extinction on wavelength using analytic models 89, 90 or Mie-theory 91, 92, 93, 94 .  \nOf relevance to this work, one of the approaches in ref. 16 to fit the MIRI+HST WFC3 G141 spectra of WASP-107b was to use the eddysed microphysical cloud parameterization 95, 96 for several silicate condensates. Briefly, this cloud framework assumes a balance between upwards turbulent mixing (parameterized with a vertical eddy diffusivity, K zz ) and  \nsedimentation (parameterized with f sed ) of droplets. This balance governs the particle size distribution and abundance with height in the atmosphere (larger droplets deeper towards the cloud base and smaller droplets at higher altitudes). The overall abundance of each cloud species is set by the condensate abundance at base of the cloud. The droplet abundances/profiles along with condensate/droplet optical properties (derived from Mie-Theory) are then used to compute the total cloud extinction. Specifically, they fit for a cloud base pressure, condensate abundance, f sed , and K zz assuming no self-consistency in the location and abundance of the condensates with the chemistry or temperature-profile. They found that SiO 2 best explained the MIRI spectral shape. However, the retrieved location of the cloud base was at relatively low pressures ( ∼ mbars)-at much cooler temperatures and lower pressures than otherwise would be expected from equilibrium condensation chemistry (Extended Data Fig. 6a)-and a highly compact cloud (large droplets).  \nWe initially follow the same eddysed cloud parameterization approach described above (assuming Mie-theory with the indices of refraction from ref. 97 ). While we are able to find satisfactory fits to the MIRI + HST observations (as in ref. 16 ), when applied to the entire broad band spectrum with our NIRCam observations, we were unable to find satisfactory fits.  \nWe also tested the plausibility of silicate clouds (MgSiO 3 , SiO 2 , and Mg 2 SiO 4 ) and salt-sulfide clouds (Na 2 S and KCl) in explaining the broad-band spectrum within the same eddysed 95, 98 framework. We use the 1D-RCPE atmospheric structure from an initial representative fit (T-P profile and chemistry using the nominal composition [M/H]=1.0, C/O=0.3, eddy diffusion coefficient-log K zz =8.5, and a T int =500 K) to self-consistently determine which clouds and where they form along the temperature-profile. We varied f sed between 0.1 (vertically extended clouds) and 1 (compact clouds). Extended Data Figure 6 summarizes the condensate mixing ratios (panel a) and their impact on the spectrum (panel b) for an f sed =0.2. Only the lower f sed values ( < 0 . 5 , more extended clouds) are able to produce a notable impact on the spectrum as higher values result in clouds that are too compact with much of the cloud opacity at too deep of pressures. However, the lower f sed values result in smaller droplets of which produce a more narrow resonance feature than what is needed to fit the MIRI observations. It is the combination of a poor fit to the full broadband spectrum along with the in-plausibility of  \nthe silicate cloud bases to exist at the altitudes probed by the observations that instead prompts us to take a phenomenological approach to the cloud modeling.  \nWe introduce a new parametric treatment to capture the spectroscopic signatures of cloud particulate resonance feature. This approach is motivated by previous efforts to model optical slopes due to hazes as a scaling to Rayleigh-scattering 18 . We model these concave spectroscopic signatures (see Fig. 2 of ref. 16 ) of cloud condensates using a Gaussian function (that is, the composition of an exponential function and a concave quadratic function). The total extinction coefficient is given by a skewed normal distribution of form  \nκ cond. ( λ ) = 2 κ opac. ϕ ( λ -λ 0 ω ) Φ ( ξ λ -λ 0 ω ) (2)  \nwhere κ opac = K cond. n tot is the extinction coefficient for an opacity free parameter K cond. and n tot is the total number density of the atmosphere; ϕ is the standard normal probability density function and Φ is the standard normal cumulative density functions; λ 0 is the wavelength at which the Gaussian is centered (that is, the mean of the Gaussian), ω is the scale parameter (that is, the standard deviation of the Gaussian), and ξ is a shape parameter that controls the skewness of the distribution so that when ξ = 0 the standard normal distribution is recovered.  \nIn both the 1D-RCPE retrievals and free retrievals we incorporate this parametric treatment alongside scalings to the Rayleigh scattering in the optical 18 and optically thick gray clouds as explained in refs. 11 , in a linear combination with a cloud-free model to account for the presence of cloud/haze inhomogeneities 86 . Future studies may investigate the best practices for the parameterization of cloud particulate resonance features.', 'Free Retrieval': "Wefurther explore the atmospheric properties inferred from the spectrum of WASP-107b employing more flexible and agnostic forward models in a Bayesian inference procedure. These, known as 'free retrievals', are methods to retrieve the chemical abundances of different gases, the vertical temperature structure, and the cloud/haze properties on the planetary atmosphere. Compared to the 1D-RCPE Grid-Retrieval explained above, these methods do not assume any physicochemical equilibrium conditions, and instead aim to  \nExtended Data Fig. 6 | Effect of self-consistent microphysical eddysed clouds on the spectrum. Panel a shows the condensate vertical distributions for the major condensate species. The cloud bases, where the condensates first forms, all occur at or below the 100 mbar level with the silicate clouds forming at or below the 1 bar level. Panel b shows the resulting spectrum (with 1 σ error bars) as well as the contribution form each cloud species.  \n<!-- image -->  \ncapture the atmospheric conditions directly through a series of parameters for the chemistry and physical conditions of the atmosphere without expectations of physical consistency. These more flexible approaches provide the opportunity to capture conditions that otherwise would be prohibited by self-consistent models, such as combinations of gases not considered under chemical equilibrium. Nonetheless, caution must be exercised in the interpretation of these free-retrievals as model assumptions may contribute to biased and unphysical atmospheric estimates (see ref. 87 for a discussion). As with the 1D-RCPE Grid-Retrieval above, we simultaneously retrieve on the HST/WFC3 G102 and G141, JWST/NIRCam F322W2 and F444W, and JWST/MIRI observations.  \nWe use two independent free retrieval frameworks in our analysis: Aurora 93 and CHIMERA 99, 86 , 2 . We select the later as our fiducial free retrieval comparison as the radiative transfer code, sources of opacity, and model resolution is the same as in the 1D-RCPE grid-retrieval above, therefore enabling a more direct comparison. The former, Aurora, is used to consider the impact of different sources of opacity than the ones used by CHIMERA, and consider the impact of line-by-line cross-section at higher sampling resolution. We find that our detection significances and conclusions are largely independent of the framework employed, with the details of each analysis described below.  \nCHIMERA solves radiative transfer for a parallelplane atmosphere, under hydrostatic equilibrium, for  \ntransmission geometry. The atmospheric model considers a one-dimensional model atmosphere spanning from ∼ 10 -9 bar to ∼ 100 bar, divided in 100 layers uniformly spaced in logarithmic pressure space. The vertical temperature structure is parameterized following the prescription from ref. 100 . The model simultaneously retrieves the reference pressure and reference radius for the assumed planetary gravity of log 10 ( g ) = 2 . 45 c.g.s.  \nThe atmospheric models assumes uniform mixing ratios for H 2 O, CH 4 , NH 3 , CO, CO 2 , SO 2 , and H 2 S using independent free parameters for each gas' volume mixing ratio. Our choice of chemical species is motivated by those expected in exoplanetary atmospheres at these warm temperatures 9, 17 . As part of our initial analysis we considered the presence of PH 3 since this species may be expected for some substellar objects at these temperatures. Nonetheless, the observations did not place meaningful constraints on the abundance of PH 3 and was not considered in our fiducial run in an effort to limit the number of free parameters in our analysis. The presence of clouds and hazes is considered by utilizing the one-sector parameterization of ref. 93 introducing the combined spectroscopic effect of a optically thick cloud deck with a cloud opacity κ cloud, and hazes following an enhancement to Rayleigh-scattering 18 in a linear combination with a cloud-free atmosphere 86 . Furthermore, we incorporate the effect of unknown cloud resonances (for example, wavelength dependent condensates) as explained above.  \nThe Bayesian inference is performed using nested sampling 101, 102 , via PyMultiNest 45,102, 103 , using 500 live points in the sampling. Each forward model in the sampling was calculated using line-by-line opacity sampling at a spectral resolution of 100,000 and then binned to the resolution of the observations. The line lists considered remain the same as in the 1D-RCPE analysis described above. In total, the sampling is performed over 24 parameters: 7 molecular gases, 6 for the pressure-temperature structure of the planet, 1 for the reference pressure, 1 for the reference radius, 8 for the presence of inhomogeneous clouds and hazes, and 1 for an offset between the JWST MIRI observations and the JWST NIRCam F444W observations.  \nOur second free-retrieval with Aurora 93 follows largely the same model setup as the one explained above with CHIMERA. A detailed description of Aurora's transmission modelling approach is available in ref. 93 . The main differences relative to the retrieval with CHIMERA are: 1) different opacity sources for H 2 O, CO 2 , NH 3 , CH 4 , and H 2 S obtained from refs. 104, 105, 106, 107 ; 2) the use of a free parameter P cloud to account for optically thick clouds instead of κ cloud parameter; and 3) computing the forward models using line-by-line cross section sampling at a spectral resolution of 20,000 instead of 100,000. The retrieved atmospheric properties are generally consistent within the the CHIMERA retrieval at 68 % confidence, and with predictions from the 1D RCPE grid retrieval. The results from this retrieval are also included in Table 2. Supplementary Information Figure 2 shows the equivalent to Figure 4 with the Aurora constraints, and highlights that while the inferences are consistent, the use of lower spectral resolution results in wider constraints in this case.  \nSupplementary Information Figure 1 shows the retrieved transmission spectrum and the contributions of the detected gases in WASP-107b's atmosphere as inferred with Aurora. In both cases, the retrieved volume mixing ratios from the free-retrievals are consistent with the gas profiles from the 1DRCPE inferences, as shown by the posterior distributions from the free retrieval and gas samples from the 1D-RCPE in Figure 4 and Supplementary Information Figure 2. Furthermore, the retrieved vertical pressure-temperature structure of the planet is consistent within the fully parametric free-retrieval and the self-consistent 1D-RCPE as shown in Extended Data Figure 7. The free retrieval with Aurora finds an offset between the JWST MIRI and JWST NIRCam F444W  \nExtended Data Fig. 7 | Comparison of retrieved pressuretemperature structure. The retrieved vertical temperature structures (median, 1 σ , and 2 σ ) from the free-retrieval (Aurora, blue) and the 1D-RCPE (red) are generally in good agreement within their 68% confidence intervals. The dotted line shows the equilibrium temperature of the planet. The observations generally probe pressures lower than ∼ 100 mbar and as low as ∼ few × 10 -5 bar. We include in black the Tint = 200 K profile from Extended Data Figure 5 as an example of lower internal temperatures.  \n<!-- image -->  \nobservations of 282 +49 -41 ppm. A complete summary of the retrieved parameters and their priors is shown in Extended Data Table 2.  \nBoth free retrievals confirm the detections of H 2 O, CH 4 , NH 3 , CO, CO 2 , and SO 2 with detection significances of 5 σ or greater. The reported detection significances in the main text result from the model comparisons with CHIMERA, while the detections with Aurora remain equally significant at 5 σ or greater. Similarly, we find that the fiducial model with optically thick clouds, Rayleigh-enhancement hazes, and wavelength dependent condensates is preferred over a cloud-free atmosphere at 26 σ . Including wavelength dependent condensates is preferred at 13 σ over just including optically thick clouds and Rayleighenhancement hazes. We note that the term 'detection significance' refer to a model preference between a reference model considering all gases and nested models for which each individual species is removed in turn 84, 93 . As such, any quoted detection significance is dependent on the choice of models and choice of model priors. Moreover, the conversion between differences in Bayesian evidence and 'sigma detections' can result in extremely large values (for example, >  \nExtended Data Table 2 | Free-retrieval retrieved atmospheric properties. Retrieved parameters (median and 1 σ uncertainties) and their prior ranges are included.  \n10 σ ) that are difficult to interpret (see ref. 108 for a discussion). For WASP-107b, the agreement in retrieved molecular abundances and confirmation of the strong evidence for the detection of these species regardless of model assumptions (for example, free abundances vs. radiative convective-photochemical-equilibrium) confirms the robustness of the interpretation of the planet's spectrum.", 'Robustness of Ammonia Detection': "To provide scrutiny beyond using Bayesian evidence model selection for the NH 3 detection, we perform Leave-One-Out Cross-Validation (LOO-CV; refs. 109, 110, 111 ) on the models with and without NH 3 from the 1D-RCPE grid retrievals. In LOO-CV, a model is trained on the dataset with one data point left out and then scored according to how it can predict the left out data point (that is, by calculating the expected log predicted density of the left out data point - elpd). This procedure is repeated for all data points  \nallowing the out-of-sample predictive performance of a model to be estimated. The LOO-CV scores for each data point can then be compared between two models highlighting where one model out performs the other 108, 112, 113 and consequently, in this case, which wavelengths and instruments drive the NH 3 detection. Extended Data Figure 8 shows the difference in elpd ( ∆ elpd) per data point in the spectrum of WASP107b for the reference 1D-RCPE model and the model without NH 3 absorption.  \nThe Bayesian model comparison finds a 6 σ detection (that is, model preference) for the model including NH 3 absorption. By performing a LOO-CV analysis of these models, we can determine which data points drive this model preference. We find the inclusion of NH 3 improved the model performance at all wavelengths (for example, there are points with positive ∆elpd at all wavelengths), with a localized region of high performance data points near 3 µ m. Indeed, the points with the highest preference for the model with  \nExtended Data Fig. 8 | The detection of NH 3 in WASP-107b's transmission spectrum is driven by NIRCAM F322W2 observations. The data is color coded by the point-wise difference in expected log posterior predictive density between the reference 1D-RCPE model and the model without NH 3 absorption. Best fit 1D-RCPE model (R=300) is show in gray. Redder data points (larger positive ∆elpd score) are better explained by the reference model including NH 3 absorption. While points with positive ∆elpd are present throughout the entire transmission spectrum, indicating that NH 3 improves the model performance at all wavelengths, the highest scoring points are localized at ∼ 3 µ m where strong NH 3 absorption is visible. The purple shaded regions show areas where the cross-section of NH 3 contributes to 50% or more of the cross-sections detected in WASP-107b, and with visually prominent features. Three data points in the MIRI observations (7.017 µ m, 7.318 µ m, 7.468 µ m) are not included in the analysis as their associated Pareto k value exceeded 0.7. Data points are shown with 1 σ error bars.  \n<!-- image -->  \nNH 3 , those with ∆elpd > 1 , are all between 2 . 9 µ m and 3 . 2 µ m and part of the NIRCam F322W2 observations. After NIRCAM F322W2, the next instrument with with positive ∆elpd scores is HST-WFC3 G141 (9 th highest scoring point), followed by HST-WFC3 G102 (14 th highest scoring point) and NIRCAM F444W (seventeenth highest scoring point). MIRI's highest scoring point is at 10.17 µ m and corresponds to the 25 th highest scoring point with a ∆elpd ∼ 0 . 4 .  \nWe proceed to total the difference in LOO-CV scores (that is, sum( ∆elpd) ) between the models with and without NH 3 over regions where the NH 3 crosssection is dominant (that is, where NH 3 contributes > 50% of the total cross-section). We find that the density of the increased predictive performance (that is, sum( ∆elpd) /# points) is higher, and more than double the value, in regions where NH 3 is dominant than in regions where NH 3 is not the dominant cross-section. This confirms that the detection of NH 3 is significantly improved by the data where significant absorption by the gas is expected.  \nWe also compare two regions in the spectrum where the spectroscopic signatures of NH 3 are visually prominent, these are features at ∼ 3 µ m with NIRCam F322W2 and ∼ 10 µ mwith MIRI. These two features are part of regions where NH 3 contributes > 50% of the total cross-section (see purple shaded regions in Extended Data Fig. 8). The region between 2.9 µ m and 3 . 1 µ m covered by NIRCam F322W2 has an order of magnitude greater density in the increased  \npredictive performance of NH 3 than the 8.6 µ m to 12 µ m region covered by MIRI. Our analysis finds that the detection of NH 3 is more strongly driven by the NIRCam observations rather than the MIRI observations.  \nThe NIRCam F322W2 provide the information necessary to confirm the tentative detection ( ∼ 2 -3 σ ) of NH 3 suggested by ref. 16 using MIRI data alone. Our LOO-CV analysis suggests that definitive detections of NH 3 require resolving the strong spectroscopic feature at ∼ 3 . 0 µ m, and highlight an important advantage of NIRCam over other instruments on JWST that do not have the wavelength coverage or throughput necessary. While NH 3 has a strong spectral feature at ∼ 10 µ m, and the gas' cross-section is dominant at > 8 . 6 µ m, the presence of strong cloud resonance features in the infrared obfuscates the observational ability to strongly detect the gas.", 'Stellar SED Fitting and Absolute Radii': "We used a set of catalog magnitudes for the WASP107 system to fit a model SED to the stellar emission. In conjunction with the Gaia 114 parallax for the system, this allowed us to estimate a stellar radius for the star WASP-107.  \nFor our SED fits, we used catalog 2MASS JHK 115 and AllWISE W1 and W2 116 magnitudes. Our SED model used four different physical parameters: the stellar effective temperature, the stellar radius, the amount of visual extinction to WASP-107, and the  \nsystem's parallax. We assumed log( g ) = 4 . 5 and [Fe / H] = 0 . 0 for the star WASP-107, which are both within 0.1 dex of the surface gravity and metallicity measured previously. 5 In practice, the precise values of log( g ) and [Fe / H] do not significantly affect the results from the SED fit. 117  \nWeimposed a Gaussian prior on Teff. based on previous spectroscopic measurements 5 of Teff. = 4425 ± 70 K with the associated 1 σ uncertainties as the prior width. Similarly, we imposed a Gaussian prior on the parallax to the system using the Gaia DR3 114 parallax of π = 15 . 528 ± 0 . 026 mas. For the amount of visual extinction to WASP-107 we imposed a prior of A V = 0 . 03 ± 0 . 01 , which comes from measurements 118 of the excess reddening towards WASP-107 of E ( B -V ) = 0 . 028 ± 0 . 01 , and assuming R V = 3 . 1 .  \nTo model the SED, we used BHAC15 spectra 119 for the stellar SED. We computed a grid of surface luminosity magnitudes, corresponding to the bandpasses of the catalog magnitudes, for a range of Teff. values. Since the BHAC15 models step by 200 K in Teff, we used cubic spline interpolation to estimate model magnitudes in between the points provided by the model atmospheres. We then scaled the interpolated surface magnitudes for the star by R ∗ /d - where d is the distance to the star - to determine the apparent bolometric flux of the SED at Earth. We then applied a simple R = 3 . 1 extinction law scaled from the value of A V , to determine the extincted bolometric flux of the SED model.  \nThis stellar SED fitting allowed us to measure the radius of the star WASP-107 to be R ∗ = 0 . 67 ± 0 . 01 R ⊙ . We then used the mean value of R p /R ∗ as measured in our joint broadband transit fits to estimate the planetary radius of WASP-107b to be R p = 0 . 939 ± 0 . 019 R J .", 'Data Availability': 'The NIRCam data used in this paper are associated with JWST GTO program 1185 (PI Greene; observations 8 and 9) and will be publicly available from the Mikulski Archive for Space Telescopes (MAST; https://mast.stsci.edu) at the end of their one-year exclusive access period. The MIRI data used in this paper are from JWST GTO program 1280 (PI Lagage; observation 1) and will also be publicly available on MAST at the end of their proprietary period. Additional intermediate results from this work are archived on Zenodo at', 'Code Availability': "We used the following codes to reduce and fit the JWST data: STScI's JWST Calibration pipeline 46 , Eureka! 14 , tshirt 15 , starry 65 , PyMC3 68 , numpy 120 , astropy 121, 122 , scipy 123 , and matplotlib 124 .", 'Additional information': 'Correspondence and requests for materials should be addressed to Luis Welbanks.  \nReprints and permissions information is available at www.nature.com/reprints.', 'Supplementary Information': "Supplementary Fig. 1 | Interpretation of WASP-107b's transmission spectrum using free retrievals with Aurora. The observed transmission spectrum of the planet with 1 σ error bars is compared to the retrieved transmission spectra using the free-retrieval approach. The retrieved median is shown at a spectral resolution of R=300. The best fit model has a χ 2 /N data =1.5. The contributions of the individual detected gases are shown as shaded regions. The gray dashed line shows the clear atmosphere component of the model, that is, the gas contributions without the presence of clouds or hazes. All other elements remain as in Figure 3.  \n<!-- image -->  \nSupplementary Fig. 2 | Inferred molecular volume mixing ratios from WASP-107b's transmission spectrum with the lower resolution retrievals with Aurora . Same as Figure 4 but considering the constraints from the free-retrieval with Aurora, with the retrieved volume mixing rations for each detected gas shown in panels a -f . The use of lower resolution (R=20,000) forward models results in constraints that are consistent with those of our fiducial retrieval with CHIMERA but with wider constraints.  \n<!-- image -->"}