Measuring Tracers of Planet Formation in the Atmosphere of WASP-77A b: Substellar O/H and C/H Ratios, with a Stellar C/O Ratio and a Potentially Superstellar Ti/H Ratio

We present a comprehensive atmospheric retrieval study of the hot Jupiter WASP-77A b using eclipse observations from the Hubble Space Telescope (HST) and JWST. Using atmospheric retrievals, the spectral features of H2O, CO, and TiO are identified, with volume mixing ratios estimated at log10(VMR) = −4.40 −0.11+0.14 , −4.44 −0.28+0.34 , and −6.40 −0.23+0.22 , respectively. We derive the atmospheric C-to-O ratio—a key planetary formation tracer—to be C/O = 0.54 ± 0.12, which is consistent with both the stellar host value and previous studies of the planet’s atmosphere, suggesting a relatively close-in formation. Computing other elemental ratios (i.e., C/H, O/H, and Ti/H), we conclude that the general enrichment of the atmosphere (i.e., metallicity) is substellar, depleted in C and O, but that Ti appears slightly superstellar. A low C and O content could be obtained, in combination with a stellar C/O ratio if the planet formed outside of the CO2 snow line before migrating inwards. Meanwhile, a superstellar Ti/H could be obtained by late contamination from refractory rich planetesimals. While broadly in agreement with previous works, we do find some differences and discuss these while also highlighting the need for homogeneous analyses when comparative exoplanetology is conducted.


INTRODUCTION
Despite being a rare outcome of planetary formation, numerous hot Jupiters have been detected due to the transit technique being biased toward large planets on short orbits.As their size and temperature are favourable for atmospheric characterisation, most atmospheric observational studies using space-based instruments have focused on this class of objects.With the advent of the spatial scanning technique (McCullough & MacKenty 2012), the Wide Field Camera 3 (WFC3) on board the Hubble Space Telescope (HST) has enabled around one hundred of those planets to be characterised via transit (e.g., Tsiaras et al. 2018;Pinhas et al. 2019;Cubillos & Blecic 2021;Kawashima & Min 2021;Edwards et al. 2023) and eclipse (e.g., Mansfield et al. 2021;Changeat et al.Corresponding author: Billy Edwards b.edwards@sron.nl2022) spectroscopy, enabling the search for trends in their atmospheric composition.
More recently, JWST has become the premier facility for space-based exoplanet spectroscopy.The four instruments on board JWST offer a wider simultaneous wavelength coverage than was previously available as well as access to previously uncharted spectral regions.Early studies of giant exoplanets have successfully used each of these JWST instruments for transit (e.g., Dyrek et al. 2023;Feinstein et al. 2023), eclipse (e.g., Bean et al. 2023;Coulombe et al. 2023) and phase-curve observations (e.g., Bell et al. 2023).
Here, we conduct a comprehensive retrieval study on WASP-77A b, an inflated hot Jupiter in a wide binary system (Maxted et al. 2013), using data from HST and JWST.The planet orbits WASP-77A, a G8V star.WASP-77 B, a fainter K-dwarf companion to WASP-77A, is separated by 3".WASP-77A b has been previously observed in emission with the ground-based high-resolution Immersion GRating INfrared Spectrometer (IGRINS) on Gemini-South (covering wavelengths from λ ∈ [1.45, 2.55] µm).Those observa-tions led to tight constraints on the atmospheric metallicity (log 10 (M/H) = -0.48+0.15  −0.13 ) and the carbon-to-oxygen ratio (C/O = 0.59±0.08)through the measurement of the atmospheric H 2 O and CO abundances (Line et al. 2021).Hence, the data suggested a metal-poor atmosphere and a solar C/O ratio.
Low-resolution eclipse observations from the HST Wide Field Camera 3 (WFC3) G141 grism complemented this picture, showing a clear water absorption feature at λ = 1.4 µm (Changeat et al. 2022;Mansfield et al. 2022) and indicating a dayside positive lapse rate (i.e., a decreasing with altitude thermal structure).The data, however, did not precisely constrain the H 2 O abundance, nor was it possible to clearly infer the amount of CO in the atmosphere, even when combining it with photometric data from Spitzer (Mansfield et al. 2022).
As part of the GTO-1274 programme, an eclipse of WASP-77A b was captured using the Near-InfraRed Spectrometer (NIRSpec) on JWST.August et al. (2023) analysed this data using chemical equilibrium retrievals, concluding that the data was best-fit by a sub-solar metallicity (log 10 (M/H) = -0.91 +0.24  −0.16 ) and a low C/O ratio (0.36 +0.10 −0.09 ) atmospheres.These results roughly agreed with the conclusions from the Gemini data, but the preferred models were not able to fit the HST WFC3 spectrum from Mansfield et al. (2022).However, the spectrum from Mansfield et al. ( 2022) is visually at odds with one obtained by Changeat et al. (2022), despite being derived from the same HST data.
In this work we explore the atmospheric properties of WASP-77A b, focusing on the recovery of key planetary formation tracers.We use information from the novel eclipse observations by JWST-NIRSpec (August et al. 2023), attempting to reconcile the tension between the different HST reductions (Changeat et al. 2022;Mansfield et al. 2022) to provide a comprehensive interpretation of WASP-77A b's atmosphere.In Section 2 we describe the data used in this study and our retrieval setup.We present our results in Section 3 and discuss their implications in Section 4.

METHODOLOGY
The emission spectrum of WASP-77A b has been captured at low-resolution (i.e., R < 5000) by both HST and JWST.The HST data were taken with the WFC3 G141 grism, giving a spectral coverage of λ ∈ [1.1, 1.6] µm.In the main text, we focus on the reduction from Changeat et al. (2022) but discuss its robustness in Appendix A, comparing their methodology against that of Mansfield et al. (2022).The JWST data was acquired with the NIRSpec instrument using the Bright Object Time-Series (BOTS) mode, with the G395H grating and F290LP filter combination.The spectrum analysed in our study is from August et al. (2023) and covers λ ∈ [2.674, 3.716] µm (NRS1) and λ ∈ [3.827, 5.173 µm (NRS2).More details on the observational setups and data reduction procedure can be found in each of these studies.
We invert the atmospheric properties of WASP-77A b from the observed spectra using the publicly available Bayesian retrieval suite TauREx 3.1 (Al-Refaie et al. 2021, 2022) 1 .We assume WASP-77A b possesses a primary atmosphere with a solar helium-to-hydrogen ratio (He/H 2 = 0.17).The atmosphere is modelled between p ∈ [10 −4 , 10 6 ] Pa using 100 plane-parallel layers uniformly partitioned in log-space.The radiative contributions of the relevant molecules, Collision Induced Absorption (CIA) from H 2 -H 2 (Abel et al. 2011;Fletcher et al. 2018) and H 2 -He (Abel et al. 2012), and Rayleigh scattering (Cox 2015) are included in the model.Stellar and planetary parameters are taken from Maxted et al. (2013), with the host-star emission being modeled by a PHOENIX spectrum (Allard et al. 2012).
We perform two types of retrievals: 1) retrievals where each molecular species is independently fitted for (referred to as free retrievals), and 2) retrievals that assume a gas mixture at chemical equilibrium via Gibbs free energy minimisation (referred to as equilibrium retrievals).
2) Equilibrium retrievals: We use the code GGchem (Woitke et al. 2018) via the TauREx 3 plugin system (Al-Refaie et al. 2022) to model the atmospheric chemistry of WASP-77A b.The free chemical parameters are: atmospheric metallicity (M/H), the C/O ratio, and the Ti/O ratio.The Ti/O ratio is included following Changeat et al. (2022), who noted an apparent population-wide refractory enrichment for hot Jupiter planets, leading to poor fits of HST WFC3 spectra when assuming solar Ti/O ratio.For those retrievals, the priors are also uniform with log 10 (M/H) For all our retrievals, we employed a parametric Npoint temperature-pressure (T − p) profile.
For HST, recovering absolute transit or eclipse depths is difficult due to its strong instrument systematics (e.g., Guo et al. 2020;Changeat et al. 2022;Edwards et al. 2023).To mitigate for this in retrievals that combine spectral from different instruments, one can fit for an additional mean offset (e.g., Yip et al. 2021) to attempt to alleviate any biases.In our retrievals, we always allow the HST WFC3 G141 spectrum to be shifted relative to the JWST NIRSpec spectrum due to its stronger systematics and the potential residual contamination from WASP-77B when deriving the spectrum (Changeat et al. 2022;Mansfield et al. 2022).In the highresolution mode, the NIRSpec data are split across two detectors (NRS1 and NRS2).As there could be offsets between these spectra, we also allow for the NRS2 spectrum to be offset with respect to the NRS1 spectrum 2 .For both offsets, the bounds for the offset (∆) are set to be extremely broad with ∆ ∈ [−500, +500] ppm.
We explore the parameter space using the nested sampling algorithm MultiNest (Feroz et al. 2009;Buchner et al. 2014) with 1000 live points and an evidence tolerance of 0.5.
The free chemical retrievals serve to derive elemental ratios for WASP-77A b, which are then compared with the host-star values.With respect to solar values, Polanski et al. (2022) measured C/H = -0.02,O/H = 0.06, and Ti/H = 0.01.Using the solar abundance for these elements (Asplund et al. 2009), these yield C/O = 0.46 and Ti/O = 1.6×10 −4 .We compare those values to the derived/fitted ratios from our retrievals.In Section 4.3, we discuss the implication of comparing to the stellar abundances derived in other studies.

RESULTS
The joint WFC3+NIRSpec fit shows evidence for three molecules: H 2 O, CO, and TiO.The preferred abundances for these species are log 10 (H 2 O) = -4.58+0.16  −0.13 , log 10 (CO) = -4.51+0.28  −0.26 , and log 10 (TiO) = -6.52 +0.22 −0.23 .The molecular features are seen in absorption, indicating a positive lapse rate (see Figure 1) with no evidence for a stratosphere.The free retrieval prefers the application of a small offset (∆ = -39 +22 −20 ppm and -56 +36 −33 ppm) to the WFC3 and NRS2 spectra but, as shown by the posterior distributions in Figure 2, these parameters do not have a strong correlation with the molecular abundances.
Using the retrieved abundances of H 2 O, CO, and TiO, we compute the following ratios to 1σ: C/O = 0.54±0.12and log 10 (Ti/O) = -2.30+0.20  −0.23 .Therefore, the planetary C/O ratio is compatible both with that of WASP-77A (C/O = 0.46, Polanski et al. 2022), and the solar value (0.55, Asplund et al. 2009).However, we find the Ti/O ratio to be much higher for the planet than for the host star (log 10 (Ti/O) = -3.79,Polanski et al. 2022).
We also determine the elemental ratios with respect to hydrogen.For C/H and Ti/H, only the CO abundance and the TiO abundance are used, respectively.For O/H, all three molecules are used.These ratios were normalised to the solar values from Asplund et al. (2009) and the stellar values from Polanski et al. (2022).
We find that C/H and O/H are both clearly sub-stellar, with C/H = 0.06 +0.06 −0.03 ×stellar and O/H = 0.06 +0.04 −0.02 ×stellar.However, we find a slightly super-stellar Ti/H ratio: Ti/H = 1.77 +1.15  −0.72 ×stellar.The apparent enrichment in titanium compared to the stellar value is far smaller when considering Ti/H than Ti/O, due to the simultaneous sub-stellar prevalence of oxygen.All these ratios are given in Table 1, which can be found in Appendix B.
As our retrievals indicate a depletion in carbon and oxygen for WASP-77A b's atmosphere, the metallicity when calculated from these elements is also sub-stellar with (C+O)/H = 0.06 +0.04 −0.02 ×stellar.However, this contrasts with the retrieved abundance of Ti that is suggestive of a super-stellar Ti/H ratio.Nevertheless, accounting for Ti in the metallicity by using (C+O+Ti)/H makes little difference due to the low abundance of Ti compared to the other elements (see Table 1).
While the free retrieval to both datasets is our preferred approach due to its unassuming nature, we use additional retrievals to explore the robustness of our results.
Firstly, we conduct an equilibrium retrieval on the joint dataset, finding similar, though slightly lower, C/O and Ti/O ratios to the free retrieval: C/O = 0.49 +0.11  −0.10 and log 10 (Ti/O) = -2.12+0.21 −0.23 .Comparing the metallicity (M/H) again shows excellent agreement, with log 10 (M/H) = -1.08 +0.19  −0.17 (M/H = 0.09±0.03×stellar).Hence, free and equilibrium retrievals on the WFC3+NIRSpec data show a consistent picture, strongly suggesting that WASP-77A b hosts a low metallicity atmosphere, a conclusion which is in line with previous studies.They also both suggest a slight enrichment of Ti.
Secondly, both free and equilibrium retrievals are performed on the NIRSpec spectrum alone.As the spectral features of CO and H 2 O are prominent in the NIRSpec spectrum, the free retrieval infers similar abundances for those molecules to the combined fit.Hence, the derived C/O ratio remains similar, suggesting that the NIRSpec data drive our conclusions for these species.The equilibrium retrieval finds a similar metallicity but a lower C/O ratio.However, as TiO does not have broadband spectral features in the NIRSpec G395 spectral range, both free and equilibrium retrievals could not place constraints on TiO.Therefore, the Ti/O ratio remains unconstrained in the NIRSpec-only retrievals.Comparisons of all these retrievals are shown in Figure 2, including the derived elemental ratios.Each model led to a C/O ratio that was consistent to 1σ with the stellar value (Polanski et al. 2022) and to a definitively sub-stellar metallicity.The retrievals that included both NIRSpec and WFC3 data were consistent with an atmosphere enriched in titanium when compared to the host star.

Potential implications for planet formation
Elemental ratios -such as those derived in this studyhave long been proposed as potential tracers of planetary formation and evolution.The most widely considered tracers are the bulk metallicity (i.e., M/H) and the C/O ratio (e.g., Öberg et al. 2011;Mordasini et al. 2016;Madhusudhan et al. 2017;Eistrup et al. 2018;Cridland et al. 2019), although more recently, other tracers -such as S/O, N/O (e.g., Turrini et al. 2021;Pacetti et al. 2022;Ohno & Fortney 2023a,b), or refractory-to-O (labelled R/O: Lothringer et al. 2021) -have also been suggested to break the degeneracy in current formation models.
Suggestions of super-stellar metallicities for close-in giant planets from observational studies (e.g., Thorngren et al. 2016;Fortney et al. 2020;Bean et al. 2023;Feinstein et al. 2023) have motivated a growing body of works to explain their formation by forming far out in the protoplanetary disk before undergoing extensive disk migration, which is cou-pled with the efficient accretion of planetesimals and gasenriched materials at the disk snow-lines (Booth et al. 2017;Hasegawa et al. 2018;Shibata et al. 2020;Turrini et al. 2021;Pacetti et al. 2022;Khorshid et al. 2022;Schneider & Bitsch 2021).However, this picture does not fully explain the diversity of hot Jupiter compositions, with evidence for sub-stellar O/H exoplanets and trends for high refractory content also being found (Changeat et al. 2022).Clearly, WASP-77A b does not appear to be enriched in volatiles (O and C) relative to its host star but could possess a high R/O ratio (here probed by Ti/O), thus suggesting an alternative pathway to its formation.
The roughly stellar C/O suggested by our retrievals implies that WASP-77A b might have formed around the H 2 O/CO 2 ice lines (i.e, relatively close-in formation), as one would expect an enriched C/O ratio (>0.8, Öberg et al. 2011;Madhusudhan et al. 2017) if significant accretion had occurred beyond the snow lines.However, for these lower C/O ratios, models also usually predict super-stellar C and O abundances (e.g.Schneider & Bitsch 2021), which we do not find here: our estimate of the C/H ratio, for instance, is far below the stellar ratio as well as that of the Solar System gas giants (Atreya et al. 2016).A low C and O content could be obtained if the planet formed mainly from gas (e.g., from gravitational instabilities rather than core accretion), but this is believed to only occur far out in the protoplanetary disk.One formation pathway that could explain a low C and O content, combined with a stellar C/O ratio, is if WASP-77A b planet formed exterior to the CO 2 evaporation front and only crossed the CO 2 snow line, which is located at around 15 AU, very late in its evolution (Bitsch et al. 2022).
A high R/O ratio (e.g., here Ti/O) also implies a close-in formation rather than extensive migration after the disk dispersal and could indicate complex interactions at the snow lines involving evaporating pebbles (Schneider & Bitsch 2021;Bitsch et al. 2022).As our retrievals suggest a low prevalence of oxygen and carbon with a potentially superstellar abundance of titanium (i.e., a high R/H ratio), WASP-77A b could be well explained by a formation around the CO 2 ice line with late enrichment of its atmosphere by rockrich planetesimals (Lothringer et al. 2021;Bitsch et al. 2022).Data that allow us to constrain other R/O ratios (e.g., Si/O via SiO) may yield further insights into the formation pathway for this planet by independently measuring the enrichment of those elements as well as adding sensitivity to additional oxygen reservoirs, reducing the chance of an oxygen deficit in our calculations (Fonte et al. 2023).

Strength of the TiO Detection
Evidence for TiO has been found in the HST WFC3 emission spectra of several other planets (e.g., Haynes et al. 2015;Edwards et al. 2020;Changeat & Edwards 2021).However, these claims have sometimes been disputed by independent analyses (e.g., Jacobs et al. 2022) or by non-detections via high-resolution spectroscopy (e.g., Merritt et al. 2020;Kasper et al. 2021).For WASP-77A b, the high-resolution study by Line et al. (2021) did not consider TiO, likely due to the lack of sensitivity of their data to this molecule due to the observed wavelengths (λ ∈ [1.43, 2.42] µm).
Often, the "detection" of optical absorbers with WFC3 G141 stems from only one or two data points.However, for WASP-77A b, the detection is supported by two features: one below λ = 1.15 µm (i.e., at the edge of the WFC3 G141 bandpass) and a second at λ ∈ [1.23, 1.28] µm (see Figure 3).Performing an equilibrium retrieval which assumes a solar Ti/O ratio smooths the TiO absorption features in those regions and leads to a poorer fit of the WFC3 data, with ∆ln(E) = 6.8 in favour of the model with super-solar Ti/O (i.e., a 4.2σ preference).Note that, since the data strongly favours a substellar O/H ratio that is driven by the more precise NIRSpec data, a solar Ti/O ratio enforces a distinctly sub-stellar Ti/H ratio, when our preferred enhanced Ti model is only slightly super-solar.Therefore, this suggests Ti/H may be a more relevant marker of planetary formation processes than Ti/O.
While the Bayesian evidence points toward the presence of TiO, the combination of this molecule and a lack of a stratosphere is unexpected for highly-irradiated atmospheres.TiO, and other oxides and hydrides, are strong absorbers of visible light and are therefore expected to cause thermal inversion (e.g., Hubeny et al. 2003) by the deposition of stellar energy at high altitudes.Cold traps, where the temperature profile dips below the condensation curve of a molecule, have been suggested as a way of sequestering TiO from the atmosphere (e.g., Spiegel et al. 2009;Beatty et al. 2017).Usually, these models predict the cold-trap to lie between a deeper, warmer atmospheric layer where TiO is present and the stratosphere where again temperatures are hot enough for TiO to avoid condensation.While we do not detect evidence for a thermal inversion, the large uncertainty in the T − p profile at high altitudes (i.e., p < 100 Pa) does not strongly rule out the presence of one either.

Comparisons to other works and implications for comparative planetology
Multiple studies have made independent inferences for the dayside chemistry and thermal structure of WASP-77A b using several instruments.Prior studies of the high-resolution Gemini observations (Line et al. 2021) and the JWST NIR-Spec data (August et al. 2023) both suggested an atmosphere depleted in carbon and oxygen.However, they slightly disagreed on the value of the C/O ratio.These studies, as well as those of the HST WFC3 spectrum (Changeat et al. 2022;Mansfield et al. 2022), find a T − p profile with a positive lapse rate.Our joint fit to the HST and JWST data leads to the same general conclusions though with some differences that are worth discussing.
In Figure 4, we compare the molecular abundances and elemental ratios inferred from the WFC3+NIRSpec joint free fit to those from these previous works.Our retrieved abundances of H 2 O and CO are significantly lower than those reported in Line et al. (2021).Hence, while both works support the conclusion that the atmosphere of WASP-77A b is depleted in C and O, the level of depletion is somewhat different.
Additionally, the preferred C/O ratio from our retrievals lies between those derived by Line et al. (2021) and August et al. (2023), agreeing with both to within 1σ.The differ- ence with August et al. (2023) comes from the addition of the WFC3 data.When performing the chemical equilibrium retrieval on only the NIRSpec data, we also obtain a lower C/O ratio (0.40±0.1) though it is still within 1σ of the stellar value from Polanski et al. (2022).August et al. (2023) noted that a reasonable joint fit with the WFC3 data from Mansfield et al. (2022) could not be achieved.As we find no such issue with the spectrum from Changeat et al. (2022), we explore the cause of this in Appendix A.
Furthermore, it is worth noting that Line et al. (2021) analysed the IGRINS data with two different retrieval codes: CHIMERA (Line et al. 2013) and HyDRA-H (Gandhi et al. 2019).The C/O ratio using their CO and H 2 O abundances (ED Fig. 6) from these fits are 0.59 and 0.38, respectively.Hence, while their main result claims that WASP-77A b has a solar C/O ratio, their secondary result finds a sub-solar C/O ratio that agrees with the JWST NIRSpec-only analyses from this work and August et al. (2023).
Using the main results of Line et al. (2021), studies have implied that WASP-77A b must have formed far out in the disk beyond the H 2 O ice line (Reggiani et al. 2022;Khorshid et al. 2023).Such a formation was inferred based upon substellar carbon and oxygen abundances and a super-stellar C/O ratio, a condition which Öberg et al. (2011) suggested as a unique signature of this formation process.However, in our work, and in that of August et al. (2023), the C/O is not found to be definitively super-stellar and is instead consistent with, or below, the stellar value.If such findings are confirmed (i.e, stellar C/O but depletion in C and O), different planetary formation and evolution mechanisms are required to explain the existence of WASP-77A b.
Furthermore, disagreement can occur depending upon the study from which the stellar abundances are taken.Several works have analysed the host star (Kolecki & Wang 2022;Polanski et al. 2022;Reggiani et al. 2022) and their conclusions also do not always agree.As shown in Figure 4, the C/O ratios for WASP-77A differ between studies,3 , as do the C/H and O/H ratios.Hence, the inferences made about the planet's formation will clearly change depending upon the study from which the stellar proprieties are derived as well as the atmospheric study of WASP-77A b.As such, it becomes extremely difficult to exactly pinpoint the formation scenario for WASP-77A b.These differences, and thus issues, are highlighted in Figure 5 which shows the deviation from the stellar C/O ratio depending on different datasets and analyses for WASP-77A and WASP-77A b.
Clearly, studying a single planet alone will not be sufficient to place strict constraints on the dominant formation and evolutionary pathway for hot Jupiters.Instead, by observing many objects, correlations can be sought between their bulk parameters and the atmospheric chemistry, thereby perhaps shedding light on the processes that dominate their formation at a population level.Such comparative planetology has been a long-held desire within the field of exoplanetary atmospheres (e.g., Cowan & Agol 2011;Tessenyi et al. 2012).Population studies of exoplanet atmospheres have been conducted with HST and Spitzer (e.g., Pinhas et al. 2019;Baxter et al. 2020;Kawashima & Min 2021;Changeat et al. 2022;Edwards et al. 2023), comparisons are already being made between the inferences of JWST data for different planets (e.g., August et al. 2023;Bean et al. 2023), and future missions are being constructed specifically for this task (e.g., Tinetti et al. 2018;Stotesbury et al. 2022).Thus far, most population studies have utilised heterogeneous datasets, comparing the implied chemistry from a variety of studies and instruments.However, without homogeneity, one may invoke a correlation that exists purely because of the sensitivity of the datasets used: it is clear from this study, as well as those from the literature (e.g., Pinhas et al. 2019;Pluriel et al. 2020), that different datasets can lead to different atmospheric compositions for the same planet.While it is clear that homogeneity will be the key to comparative planetology, we note that homogeneity is by no means a guarantee of success: biases will no doubt still be present, and the data will never be sensitive to all species.

CONCLUSIONS
A joint fit to JWST NIRSpec and HST WFC3 spectra of WASP-77A b's atmosphere suggests a depletion in carbon and oxygen with respect to stellar values, albeit with a C/O ratio that remains consistent with the stellar value as well as evidence for a slightly super-stellar Ti/H ratio.From a formation perspective, these results suggest that WASP-77A b may have formed outside of the CO 2 snow line, before migrating inwards and accreting significant rock-rich planetesimals in its atmosphere.Further constraining Ti -as well as other refractory species: Fe, V, Al, etc. -will allow us to more confidently assess the claim for super-solar refractory abundance in WASP-77A b.In this new era, the unprecedented constraints on elemental ratios offered by JWST data should help us narrow down the diversity of formation pathways for hot Jupiter exoplanets.
Lunine; Lunine & Bean 2017).These observations were facilitated by the Space Telescope Science Institute, which is operated by the Association of Universities for Research in Astronomy, Inc., under NASA contract NAS 5-26555.The HST and JWST data presented in this paper were obtained from the Mikulski Archive for Space Telescopes (MAST) at the Space Telescope Science Institute and can be accessed via DOI: 10.17909/bsnh-fz53.We took the NIRSpec spectrum from Table 1 of August et al. (2023) and the WFC3 spectrum from Changeat et al. (2022)  4 .
Software: TauREx3 (Al-Refaie et al. 2021), TauREx GGChem (Woitke et al. 2018;Al-Refaie et al. 2022), Multinest (Feroz et al. 2009;Buchner et al. 2014), Iraclis (Tsiaras et al. 2016b), PyLightcurve (Tsiaras et al. 2016a), Astropy (Astropy Collaboration et al. 2013, 2018, 2022), h5py (Collette 2013), emcee (Foreman-Mackey et al. 2013), Matplotlib (Hunter 2007), Pandas (McKinney 2011), Numpy (Oliphant 2006), SciPy (Virtanen et al. 2020), corner (Foreman-Mackey 2016).Here we discuss the reduction of the HST WFC3 spatial scanning data of the eclipse of WASP-77A b and the complexities caused by WASP-77B, a fainter (by ∼2 magnitudes; Maxted et al. 2013) K-dwarf companion to WASP-77A with a 3" separation.On the detector, the spectra from WASP-77A and WASP-77B overlap, which would adversely affect the recovered emission spectrum for the planet if the contamination is not corrected for. 5Two HST visits were taken under programme GO-16168 (PI: Megan Mansfield;Mansfield et al. 2020), each covering an eclipse.The separation of the stars on the detector was different in each case.Two independent studies using a different methodology to handle the contamination from WASP-77B have previously reduced the emission spectrum of WASP-77A b: Changeat et al. (2022) and Mansfield et al. (2022).Changeat et al. (2022) used Wayne, a specialised WFC3 simulator (Varley et al. 2017;Tsiaras & Ozden 2019), to model the contribution of the secondary star.First, they extracted the high-resolution spectra of each star using Iraclis (Tsiaras et al. 2016b).These spectra, and the observational setup of the real data, were then used as inputs to Wayne, which simulated high-resolution, spatially scanned WFC3 images for each star individually.By determining the flux from each star falling in each spectral bin, they determined the flux ratio between the two stars and applied this as a correction to the eclipse spectrum of WASP-77A b for each visit.
Meanwhile, Mansfield et al. (2022) utilised a different methodology.At the beginning of each visit, a 0.556 s staring mode spectrum was taken with the G141 grism.In this data, the spectra from the stars were not overlapping, so the flux of each star could be independently extracted.They then used these spectra to determine the fluxes of the WASP-77A and WASP-77B in each bandpass and corrected the extracted flux using these.Next, they fitted the corrected light curves to obtain the emission spectrum.In their work, Mansfield et al. (2022) noted that their atmospheric models struggled to explain the spectrum and attempted fits in which they deleted several of the data points in an attempt to improve the fit.
In their work, August et al. (2023) noted a disagreement between the HST WFC3 spectrum from Mansfield et al. (2022) and their atmospheric models derived from the JWST NIRSpec data only.When attempting a joint fit, they found their models poorly fitted the HST data.The issue seemed to stem from the spectral shape of the WFC3 data rather than the absolute eclipse depth.An absolute offset is commonly found when using different models for the systematics seen in HST data, but the spectral shape is generally conserved (Mugnai et al. 2021;Edwards et al. 2023).Therefore, they suggested that perhaps the HST WFC3 data could not be trusted but did not investigate the causes of this discrepancy.
Here, we compare the spectra from Mansfield et al. ( 2022) and Changeat et al. (2022), finding differences in their spectral shape.Given the robustness of the spectral shape to pipeline assumptions when reducing and analysing most HST data, the treatment of the contamination by WASP-77B seems the mostly likely cause of this discrepancy.
Both studies extracted the spectrum using the nondestructive reads rather than the full scan.Extracting WFC3 spatial scan data using the non-destructive reads can be a good way of avoiding contamination from other sources in the field of view.However, given the scan rate used, the separation is not large enough in this case to allow for the spectra to be disentangled in this way.To demonstrate this, Figure 6 shows example extraction apertures from the second visit using this splitting extraction mode for both forward and reverse scans.WASP-77B clearly contaminates the extraction apertures, and so the resulting light curve contains flux from both stars, demonstrating the need for a corrective factor to be applied.
In Figure 7, we show the contaminated eclipse spectrum that is obtained by fitting the light curves of this extraction, as well as the corrected spectrum from Changeat et al. (2022) (i.e, after the contamination factor is applied).We note that the same pipeline, Iraclis, is used to extract and fit the light curves in both cases.A clear difference in the two spectra is seen, both in absolute depth and in spectral shape.Both differences are expected: WASP-77B contributes flux to the aperture, thereby reducing the eclipse depth, and this contribution is wavelength dependent.
In the same plot, we also compare the Iraclis spectra to the one reported by Mansfield et al. (2022), which appears to closely match the contaminated spectrum from Iraclis.The corrected spectrum from Changeat et al. (2022), on the other hand, strongly disagrees with the one from Mansfield et al. (2022).Looking more closely at methodology utilised by Mansfield et al. (2022), one finds that they corrected for the contamination by applying a multiplicative factor to the observed flux (see Equation 1).However, this is incorrect as multiplying both the in-and out-of-eclipse data by the same  The analysis of HST WFC3 data is complex.For instance, due to the geometry of the instrument, the spectrum does not scan perfectly vertically, the scan rate changes with position on the detector, and the forward and reverse scans have different lengths (e.g., McCullough & MacKenty 2012;Tsiaras et al. 2016b,c).Hence, removing the flux contribution of a resolvable background star is also difficult and requires specialised software (e.g., Varley et al. 2017).It remains, of course, impossible to perfectly correct for such contamination.However, the agreement between findings from the HST WFC3 data of Changeat et al. (2022) and the JWST NIRSpec data from August et al. (2023), as well as the ability to jointly fit both datasets, suggest that the methodology employed by Changeat et al. (2022), which accounted for these instrumental complexities, has led to a more trustworthy spectrum.
To further support this statement, we reproduce the joint retrievals presented in the main text using the HST spectrum from Mansfield et al. (2022).In this case, the models cannot explain the spectral shape of the WFC3 data, echoing the results of August et al. (2023).Figure 8 shows the best-fit free retrieval for this spectrum and highlights the strong remaining correlations in the residuals.The retrieval also prefers an unphysically large abundance of FeH (i.e, log 10 (FeH) =  2022) cannot be reconciled with the JWST NIRSpec data.We suggest that the main reason for this is that their reduction did not properly account for the contamination of the companion star, WASP-77B.

B. TABLE OF RESULTS
Here we present Table 1, which contains the elemental ratios derived in this work.
Table 1.Elemental ratios derived from our joint fit to the HST WFC3 and JWST NIRSpec data using free chemistry.Stellar values (i.e., those for WASP-77A) are taken from Polanski et al. (2022) while the solar abundances are from Asplund et al. (2009).

Figure 1 .
Figure 1.Best-fit free retrieval of the JWST NIRSpec and HST WFC3 data for WASP-77A b.The coloured regions show the individual contribution of three species (H2O, CO, and TiO) and Collision Induced Absorption (CIA), while the inset shows the 1, 2, and 3σ confidence intervals for the retrieved temperature-pressure (T − p) profile.These three species are detected in the HST and JWST data, allowing us to place constraints on elemental ratios for this atmosphere.The best-fit T − p profile has a positive lapse rate (i.e, no evidence for a thermal inversion) in the pressure region probed by our observations (p ∈ [10 5 , 100] Pa).

Figure 2 .
Figure 2. Posterior distributions for the dayside of WASP-77A b.For the free chemistry retrievals, the C/O and Ti/O ratios are derived parameters.Where there are two reported values, they are given as those from the combined JWST NIRSpec and HST WFC3 fit (left) and the JWST NIRSpec only (right).Both free and equilibrium chemistry models, as well as fits to both datasets or just JWST NIRSpec, prefer a roughly stellar C/O ratio.The free and equilibrium retrievals to the combined datasets also prefer a distinctly super-stellar Ti/O ratio.All elemental-to-hydrogen abundances are given with respect to solar values.Again, C/H and O/H are sub-stellar whereas Ti/H is super-stellar.All ratios and abundances are computed in terms of the volume mixing ratio.

Figure 3 .
Figure3.Comparison of the chemical equilibrium retrieval results when we allow the Ti/O ratio to vary (purple) and when we fix it to solar (yellow).The latter does not provide a good fit to the two highlighted regions, and our retrievals suggest the features in these regions are due to TiO.

Figure 4 .
Figure 4. Comparison between the molecular abundances and elemental ratios found here for WASP-77A b and those found by literature works.No work has previously tried to constrain the Ti/H ratio, so it is not plotted here.We note that M/H refers to (C+O)/H for Line et al. (2021), M/H for August et al. (2023), and (C+O+Ti)/H for the atmospheric constraints from this work as well as the measurements of the enrichment of the host star, WASP-77A.

Figure 5 .
Figure 5.The deviation from stellar C/O ratio for each atmospheric study of WASP-77 A b when considering different stellar abundances.While it is no longer applicable in this case, we also show the comparison to solar abundances as these are the reference values if no stellar measurements have been made.Most studies prefer a sub-stellar (blue squares) or stellar (whiter squares) C/O ratio.The exception is the CHIMERA retrievals from Line et al. (2021) although we note that they are all consistent with all of the stellar values to 1σ due to the large uncertainties on the planetary C/O ratio.

Figure 6 .
Figure 6.Example extraction apertures when splitting the WFC3 data by the non-destructive reads from the reverse (top) and forward (bottom) scans.The extraction is clearly still contaminated by the fainter secondary star.When the light curve from this extraction is fitted, the spectrum (see Figure 7) closely matches that from Mansfield et al. (2022), suggesting that their spectrum is still suffering from contamination.

Figure 7 .
Figure 7.Comparison between different HST WFC3 G141 reductions.The contaminated fit from the extraction shown in Figure 6 matches the spectrum from Mansfield et al. (2022).The spectrum from Changeat et al. (2022), which used Wayne to model the contamination, has similar features but a different slope, being significantly deeper at longer wavelengths.Left: absolute eclipse depth.Right: relative eclipse depth having subtracted the mean depth.factor does not change the eclipse depth.Instead, one should subtract the flux from the contaminating star.The analysis of HST WFC3 data is complex.For instance, due to the geometry of the instrument, the spectrum does not scan perfectly vertically, the scan rate changes with position on the detector, and the forward and reverse scans have different lengths (e.g.,McCullough & MacKenty 2012; Tsiaras  et al. 2016b,c).Hence, removing the flux contribution of a resolvable background star is also difficult and requires specialised software (e.g.,Varley et al. 2017).It remains, of course, impossible to perfectly correct for such contamination.However, the agreement between findings from the HST WFC3 data ofChangeat et al. (2022) and the JWST

Figure 8 .
Figure 8. Best-fit model when jointly fitting the JWST NIRSpec data and HST WFC3 data from Mansfield et al. (2022).The residuals show a clear correlation, indicating a poor fit which is likely due to the contamination present in the spectrum.