# The atmospheric composition of the ultra-hot Jupiter WASP-178 b observed with ESPRESSO

Y. C. Damasceno, J. V. Seidel, B. Prinoth, A. Psaridi, E. Esparza-Borges, M. Stangret, N. C. Santos, M. R. Zapatero-Osorio, Y. Alibert, R. Allart, et al.

► To cite this version:

Y. C. Damasceno, J. V. Seidel, B. Prinoth, A. Psaridi, E. Esparza-Borges, et al. The atmospheric composition of the ultra-hot Jupiter WASP-178 b observed with ESPRESSO. Astronomy & Astrophysics - A&A, 2024, 689, 10.1051/0004-6361/202450119. insu-04836815

HAL Id: insu-04836815

https://insu.hal.science/insu-04836815v1

Submitted on 15 Dec 2024

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# The atmospheric composition of the ultra-hot Jupiter WASP-178 b observed with ESPRESSO*

Y. C. Damasceno<sup>1,2,3</sup> ID, J. V. Seidel<sup>3,***</sup> ID, B. Prinoth<sup>3,4</sup> ID, A. Psaridi<sup>5</sup> ID, E. Esparza-Borges<sup>6,7</sup> ID,

M. Stangret<sup>8</sup> ID, N. C. Santos<sup>1,2</sup> ID, M. R. Zapatero-Osorio<sup>9</sup> ID, Y. Alibert<sup>10</sup> ID, R. Allart<sup>11,5</sup>,<sup>***</sup> ID, T. Azevedo Silva<sup>1,2</sup> ID,
M. Cointepas<sup>5,12</sup>, A. R. Costa Silva<sup>1,2,5</sup> ID, E. Cristo<sup>1,2</sup> ID, P. Di Marcantonio<sup>13</sup> ID, D. Ehrenreich<sup>5,14</sup> ID,

J. I. González Hernández<sup>6,7</sup> ID, E. Herrero-Cisneros<sup>15</sup> ID, M. Lendl<sup>5</sup> ID, J. Lillo-Box<sup>16</sup> ID, C. J. A. P. Martins<sup>1,17</sup> ID,
G. Micela<sup>18</sup> ID, E. Pallé<sup>6,7</sup> ID, S. G. Sousa<sup>1</sup> ID, M. Steiner<sup>5</sup> ID, V. Vaulato<sup>5</sup> ID, Y. Zhao<sup>5</sup> ID, and F. Pepe<sup>5</sup> ID

Received 25 March 2024 / Accepted 3 June 2024

## ABSTRACT

**Context.** Ultra-hot Jupiters (UHJ) have emerged as ideal testbeds for new techniques for studying exoplanet atmospheres. Only a limited number of them are currently well studied, however.

**Aims.** We search for atmospheric constituents for the UHJ WASP-178 b with two ESPRESSO transits. Additionally, we show parallel photometry that we used to obtain updated and precise stellar, planetary, and orbital parameters.

**Methods.** The two transits we obtained were analysed with narrow-band transmission spectroscopy and with the cross-correlation technique to provide detections at different altitude levels. We focused on searching for Na I, Hα, Hβ, Hγ, Mg I, and Li I lines in narrow-band data, as well as Fe I and Fe II, and attempted to confirm Mg I with the cross-correlation technique. We corrected for the Rossiter-McLaughlin effect and regions with a low signal-to-noise ratio due to Na I absorption in the interstellar medium. We then verified our results via bootstrapping.

**Results.** We report the resolved line detections of Na I (5.5σ and 5.4σ), Hα (13σ), Hβ (7.1σ), and tentatively Mg I (4.6σ). With a cross-correlation, we confirm the Mg I detection (7.8σ and 5.8σ), and we additionally report the detections of Fe I (12σ and 10σ) and Fe II (11σ and 8.4σ) on both nights separately. The detection of Mg I remains tentative, however, because the results on the two nights differ. The results also differ compared with the properties derived from the narrow-band data.

**Conclusions.** None of our resolved spectral lines probing the middle to upper atmosphere shows significant shifts relative to the planetary rest frame. Hα and Hβ exhibit a respective line broadening of 39.6 ± 2.1 km s⁻<fnref n="1" /> and 27.6 ± 4.6 km s⁻<fnref n="1" />, however, indicating the onset of possible escape. WASP-178 b differs from similar UHJ by its lack of strong atmospheric dynamics in the upper atmosphere. The broadening seen for Fe I (15.66 ± 0.58 km s⁻<fnref n="1" />) and Fe II (11.32 ± 0.52 km s⁻<fnref n="1" />) might indicate the presence of winds in the mid-atmosphere, however. Future studies of the impact of the flux variability caused by the host star activity might shed more light on the subject. Previous work indicated the presence of SiO cloud-precursors in the atmosphere of WASP-178 b and a lack of Mg I and Fe II. However, our results suggest that a scenario in which the planetary atmosphere is dominated by Mg I and Fe II is more likely. In light of our results, we encourage future observations to further elucidate these atmospheric properties.

**Key words.** methods: data analysis – techniques: spectroscopic – planets and satellites: atmospheres – planets and satellites: individual: WASP-178 b

<footnote n="1">¹ Instituto de Astrofísica e Ciências do Espaço, Universidade do Porto, CAUP, Rua das Estrelas, 4150-762 Porto, Portugal
e-mail: yuricd2001@gmail.com</footnote>

<footnote n="2">² Departamento de Física e Astronomia, Faculdade de Ciências, Universidade do Porto, Rua do Campo Alegre, 4169-007 Porto, Portugal</footnote>

<footnote n="3">³ European Southern Observatory, Alonso de Córdova 3107, Vitacura, Región Metropolitana, Chile</footnote>

<footnote n="4">⁴ Lund Observatory, Division of Astrophysics, Department of Physics, Lund University, Box 118, 221 00 Lund, Sweden</footnote>

<footnote n="5">⁵ Observatoire de Genève, Département d'Astronomie, Université de Genève, Chemin Pegasi 51, 1290 Versoix, Switzerland</footnote>

<footnote n="6">⁶ Instituto de Astrofísica de Canarias, 38200 La Laguna, Tenerife, Spain</footnote>

<footnote n="7">⁷ Departamento de Astrofísica, Universidad de La Laguna, 38206 La Laguna, Tenerife, Spain</footnote>

<footnote n="8">⁸ INAF – Osservatorio Astronomico di Padova, Vicolo dell’Osservatorio 5, 35122 Padova, Italy</footnote>

<footnote n="9">⁹ Centro de Astrobiología, CSIC-INTA, Camino Bajo del Castillo s/n, 28692 Villanueva de la Cañada, Madrid, Spain</footnote>

<footnote n="10">¹⁰ Center for Space and Habitability, University of Bern, Gesellsschaftsstr. 6, 3012 Bern, Switzerland</footnote>

<footnote n="11">¹¹ Département de Physique, Institut Trottier de Recherche sur les Exoplanètes, Université de Montréal, Montréal, Québec, H3T 1J4, Canada</footnote>

<footnote n="12">¹² Univ. Grenoble Alpes, CNRS, IPAG, 38000 Grenoble, France</footnote>

<footnote n="13">¹³ INAF – Osservatorio Astronomico di Trieste, via G. B. Tiepolo 11, 34143, Trieste, Italy</footnote>

<footnote n="14">¹⁴ Centre Vie dans l'Univers, Faculté des sciences de l'Université de Genève, Quai Ernest-Ansermet 30, 1205 Geneva, Switzerland</footnote>

<footnote n="15">¹⁵ Centro de Astrobiología, CSIC-INTA, Crta. Ajalvir km 4, 28850 Torrejón de Ardoz, Madrid, Spain</footnote>

<footnote n="16">¹⁶ Centro de Astrobiología (CAB, CSIC-INTA), ESAC campus, 28692, Villanueva de la Cañada (Madrid), Spain</footnote>

<footnote n="17">¹⁷ Centro de Astrofísica da Universidade do Porto, Rua das Estrelas, 4150-762 Porto, Portugal</footnote>

<footnote n="18">¹⁸ INAF – Osservatorio Astronomico di Palermo, Piazza del Parlamento 1, 90134 Palermo, Italy</footnote>

<footnote>* Based on Guaranteed Time Observations collected at the European Southern Observatory under ESO programme 1104.C-0350 by the ESPRESSO Consortium.</footnote>

<footnote>** ESO Fellow.</footnote>

<footnote>*** Trottier Postdoctoral Fellow.</footnote>
# 1. Introduction

Ultra-hot Jupiters (UHJ) are defined as Jupiter-like planets with equilibrium temperatures above 2000 K. They have emerged as ideal testbeds within the exoplanet community. Due to their close-in orbit around their host star, their atmospheres tend to be dissociated into atoms or are even ionised, proportioning a bloated atmosphere where the depth and width of the absorptions can be translated into height and velocity distribution. The inspection of multiple elements that sit in different regions of the atmosphere allows for the holistic exploration of the chemistry, temperature-pressure profile, and atmospheric dynamics of these planets directly from data. A range of modelling and retrieval techniques were either benchmarked or matured using data from UHJ, for instance, the detection of a wide variety of chemical species (Hoeijmakers et al. 2019; Prinoth et al. 2022), the retrieval of abundances (Gandhi et al. 2022; Gibson et al. 2022; Pelletier et al. 2023), the observation of emission features (Pino et al. 2020, 2022), and the observation of atmospheric dynamics (Borsa et al. 2019; Ehrenreich et al. 2020; Seidel et al. 2021, 2023). However, due to their extreme conditions, only a handful of suitable targets for atmospheric characterisation fall into the category of UHJs. Among the dozens of UHJ whose atmospheres have already been observed, the most canonically studied are WASP-121 b (Delrez et al. 2016; Azevedo Silva et al. 2022; Seidel et al. 2023), WASP-76 b (West et al. 2016; Tabernero et al. 2021), WASP-189 b (Lendl et al. 2020b; Stangret et al. 2022; Prinoth et al. 2022), and the hottest exoplanet to date, KELT-9 b (Gaudi et al. 2017; Hoeijmakers et al. 2018; Wyttenbach et al. 2020; Borsato et al. 2023). WASP-178 b has an equilibrium temperature of 2470 ± 60 K, with a planetary radius of $1.81 ± 0.09 R_J$, a mass of $1.66 ± 0.12 M_J$, and an insolation of $5550_{-630}^{+1250} S_⊕$ (Hellier et al. 2019; Rodríguez Martínez et al. 2020) (see Fig. 1, WASP-178 b is marked as a black star). For context, this places WASP-178 b between WASP-121 b and WASP-76 b in terms of insolation. However, differing from these two targets, WASP-178 is the second hottest star known to date to host an exoplanet, a type A1 IV-V star with an effective stellar temperature of $9350 ± 150 K$ (Hellier et al. 2019) and with an apparent magnitude in the visible band of 9.95.

WASP-178 b has been studied previously with the CHaracterising Exoplanets Satellite (CHEOPS) and the Transiting Exoplanet Survey Satellite (TESS) and was found to be in a near pole-on geometry, and the rotation period of the star is similar to the orbital period of the planet (Pagano et al. 2024). Pagano et al. (2024) found efficient heat transport from the day to the night side, thus observationally challenging the current theory that heat transport by zonal winds becomes less efficient with increasing equilibrium temperature (e.g Perez-Becker & Showman 2013; Komacek et al. 2017; Schwartz et al. 2017; Parmentier & Crossfield 2018). Additionally, WASP-178 b was observed with HST/WFC3/UVIS<fnref n="1" />, and one of the largest near ultraviolet (NUV) spectral features to date (Lothringer et al. 2022). No transit asymmetry was found by Lothringer et al. (2022), indicating that signals are present on both terminators. Photochemical hazes are ruled out due to a lack of scattering slope, and the observed spectral features can be explained by either SiO at solar abundance or by an atmosphere that is dominated by Mg I and Fe II at super-solar abundances without SiO. Surprisingly, Lothringer et al. (2022) report non-detections for Fe I and Fe II.

In this work, we present two transit observations of WASP-178 b obtained with the Echelle SPectrograph for Rocky Exoplanets and Stable Spectroscopic Observations spectrograph (ESPRESSO). The manuscript is structured as follows: in Sect. 2 we report the data quality of the two transits and our data reduction, and Sect. 3 analyses the parallel photometry taken with the EulerCam at the Swiss 1.2m Euler telescope. Sections 4 and 5 show the narrow-band and cross-correlation transmission analysis and detections, respectively, which are then placed into context with the literature in Sect. 6.

# 2. ESPRESSO observations and data analysis

We observed the WASP-178 system and captured two full transits of the UHJ WASP-178 b. The target was observed with ESPRESSO (Pepe et al. 2021) in HR21 mode ($R \approx 140.000$), which is installed at the ESO VLT telescopes at the Paranal Observatory in Chile. The transits were observed on the nights of 2021 May 3 and 2021 July 9 with the UT4 and UT2 telescopes, respectively. Both observations were performed with fibre A on the target and fibre B on the sky to monitor telluric emission.

On the first night, 48 spectra were taken. The first 13 spectra had an exposure time of 300 s. Because of a consistently high seeing, the remaining 35 spectra had exposure times of 500 s. On the second night, 61 spectra were taken, all with an exposure time of 300 s. In total, the two nights resulted in 109 spectra, 58 of which were taken in-transit, and 51 spectra were out of transit. In both nights, the transits were observed from start to finish. The first night presented a higher signal-to-noise ratio (S/N) consistency. The airmass, seeing, and S/N of each exposure are shown in Fig. 2 and in Table 1. The S/N shown in both is that of the spectral order 116. The spectra were reduced using the ESPRESSO data reduction pipeline (DRS version 3.0.0), queried from the DACE<fnref n="2" /> platform, and the orders were extracted and corrected for the blaze function. We worked in the narrow band with the S2D blaze-corrected and sky-subtracted spectra. We focused on the paired orders containing the Na I doublet (116 and 117), the Hα line (138 and 139), the Hβ line (70 and 71), the Hγ line (40 and 41), the Mg I b triplet (86 and 87), and the Li I resonant line (142 and 143). We also searched throughout the entire wavelength range of ESPRESSO for Fe I, Fe II, and Mg I in cross-correlation using the S2D spectra without blaze correction or sky subtraction.

## 2.1. Data reduction

The spectra from both transits, as reduced via the ESPRESSO DRS, are given in the reference frame of the Solar System barycentre, and the wavelength is given in air and corrected for the blaze.

The second night of observations was affected by clouds, resulting in seven exposures with low S/N (≤15). As a consequence, we discarded these spectra. This left a total of 102 spectra, 55 in-transit and the remaining 47 out of transit. The data reduction done by the ESPRESSO DRS corrects for most cosmic rays, but a few are still present in the reduced data. In each exposure, we rejected the remaining cosmic rays using a $6\sigma$ clipping routine on the flux difference between adjacent wavelength bins. The rejected points were then replaced by the mean of the six nearest values. Between all exposures from both nights, we replaced a total of 24 data points in orders 50 and 51, 54 points in orders 70 and 71, 24 points in orders 86 and 87, 75 points in orders 70 and 71.

<footnote n="1">¹ Hubble Space Telescope/Wide Field Camera 3/Ultraviolet Imaging Spectrograph.</footnote>

<footnote n="2">² https://dace.unige.ch/</footnote>
<table><caption>**Table 1.** Overview of the two transit observations for WASP-178 b.</caption><thead><tr><th>Date</th><th># Spectra <sup>(1)</sup></th><th>Exp. time [s]</th><th>Airmass</th><th>Seeing</th><th>S/N #116</th></tr></thead><tbody><tr><td>2021-03-05</td><td>48 (23/25)</td><td>300 and 500</td><td>1.55 - 1.05 - 1.30</td><td>1-1.7</td><td>27-71</td></tr><tr><td>2021-07-09</td><td>61 (35/26) <sup>(2)</sup></td><td>300</td><td>1.08 - 1.05 - 2.05</td><td>0.4-1.2</td><td>0-64 <sup>(3)</sup></td></tr></tbody></table>

**Notes.** <sup>(1)</sup>The in- and out-of-transit spectra are listed in parentheses, respectively. <sup>(2)</sup>Seven spectra were discarded due to low S/N, leaving 32 in-transit and 22 out-of-transit spectra. <sup>(3)</sup>After the low S/N spectra were removed, the lowest S/N value was 18.

<figure><img src="image_2.png" /><figcaption>**Fig. 1.** Exoplanets in the radius vs insolation plot, in terms of Earth's values. The UHJ WASP-178 b is marked with a black star. WASP-121 b, WASP-76 b, and WASP-189 b, mentioned in the introduction, are marked as orange stars.</figcaption></figure>

<figure><img src="image_3.png" /><figcaption>**Fig. 2.** Conditions of the first (blue markers) and second (orange markers) observed transits showing the airmass (top panel), seeing (middle panel), and the S/N (bottom panel) for each exposure. The S/N was calculated from the Na I D doublet orders. The dashed black lines show the beginning and end of transit. The dashed red line marks the S/N = 15 threshold, below which exposures were discarded. The circular markers correspond to 300 s exposures, and the lighter shaded triangular markers are used for 500 s exposures.</figcaption></figure>

in orders 116 and 117, 65 points in orders 138 and 139, and 75 points in orders 142 and 143. This means that overall, less than 0.0002% of the reduced data in these orders were affected.

## 2.2. Telluric correction

Ground-based observations are subject to contamination from Earth's atmosphere. Telluric contamination is time variable and depends on the airmass and water-vapour column in the line of sight. We performed the telluric correction using *molecfit* version 1.5.1 (Smette et al. 2015; Kausch et al. 2015), an ESO software developed for modelling the Earth's spectral features for ground-based observations. This approach to telluric absorption correction has been used in the exoplanetary field in high-resolution spectroscopy data, such as spectra from the High Accuracy Radial velocity Planet Searcher (HARPS) (Allart et al. 2017) and from ESPRESSO (Allart et al. 2020; Tabernero et al. 2021; Seidel et al. 2022). For further details on the *molecfit* application to exoplanet spectra, we refer to Allart et al. (2017).

In the spectral range probed by ESPRESSO, the elements that cause most of the contamination are H₂O, O₂, and O₃. Considering the orders addressed in this work, we only included the contributions from H₂O when we computed the telluric model spectra because O₃ affects the visible wavelength range via broadband absorption and the O₂ lines were masked for the cross-correlation analysis. The telluric model for H₂O was fitted on the wavelength range near the sodium doublet, in orders 115 and 116. In these orders, the telluric lines are weak, and the fitting region therefore had to be carefully selected such that it did not include any stellar features. The fitted telluric model was then applied to all orders. For the spectral regions studied in the narrow band, this correction was sufficient, while for the cross-correlation analysis, we corrected for O₂ by masking its respective features. Figure 3 shows the mean spectrum over all exposures, normalised for better visibility, before and after the telluric correction, as well as the model telluric spectrum. Figure 3 shows that the telluric lines are corrected down to the noise level. We additionally verified from fibre B that no emission from telluric sodium was present during our observations.

## 2.3. Na I absorption in the interstellar medium

Near the stellar Na I Fraunhofer lines, we identified three additional absorption features. The stellar lines are shifted by -23.43 ± 0.02 km s⁻¹ with respect to the Solar System barycentre rest frame, which is consistent with the expected system velocity reported in Hellier et al. (2019), considering the 0.5 km s⁻¹ bin size of ESPRESSO. During the first transit, the three rightmost lines are shifted by -10.41 ± 0.02, 4.10 ± 0.09, and 14.72 ± 0.01 km s⁻¹, and on the second transit, the velocities are -10.42 ± 0.03, 3.88 ± 0.12, and 14.72 ± 0.01 km s⁻¹. The
<figure><img src="image_4.png" /></figure>

**Fig. 3.** Mean spectrum before (solid black line) and after (solid green line) the telluric correction, for the first night of observations in the Earth's rest frame. The telluric model averaged over all exposures is represented by the dashed blue line.

line centres were estimated through a least-squares Gaussian fit. Each pair of lines was shifted equally from the expected position of the doublet on both nights, indicating they are not of telluric origin. In Fig. 4 the spectrum portions near the sodium doublet are shown in velocity space with respect to each of the doublet lines. Because these lines follow the stellar features, they are likely caused by separate interstellar medium (ISM) clouds with different radial velocities.

We treated the ISM lines the same way as the stellar lines by including them in the master out-of-transit spectrum. Due to the very low S/N around the deepest ISM line, we masked a 0.22 Å band around its line centre. The masked values were replaced with the local continuum, which was determined as the mean of the 1 Å band towards the red of the mask since the adjacent points towards the blue contain another ISM absorption line. Based on the calculated planet and star velocities, no planetary sodium absorption feature is expected to cross the masked region in any of the exposures. This process is therefore not expected to affect the results.

## 2.4. Modelling the Rossiter-McLaughlin effect

The Rossiter-McLaughlin (RM) effect (Holt 1893; Rossiter 1924; McLaughlin 1924) is a result of the non-uniformity throughout the stellar surface, with contributions from the limb darkening and stellar rotation, which affects the in-transit data as the planet passes through different portions of the stellar disk (Casasayas-Barris et al. 2020). This effect can be measured from the radial velocities (RVs) as they deviate from the Keplerian motion of the star during a transit. The exact pattern imprinted on the RVs and the spectra depends on the orbit architecture as well as on the stellar and planetary parameters (Triaud 2018).

We studied the obliquity of the system by analysing the RM signal imprinted on the RV measurements and measuring the sky-projected spin-orbit angle $\lambda$. We combined the RV measurements of both transits using a 14.4 min binning and extracted the RM signal by subtracting a linear fit from the out-of-transit RVs. The approach used by the ESPRESSO DRS pipeline to measure the RV is based on the fitting of a Gaussian to the cross-correlation function (CCF) (find this technique detailed in Baranne et al. 1996; Pepe et al. 2002). Accordingly, we analysed the RM signal using a Python implementation of AROME<fnref n="3" /> (Boué et al. 2013). This code was specially designed to model the RV data extracted by the CCF approach. Based on AROME

<figure><img src="image_5.png" /></figure>

**Fig. 4.** Average normalised spectrum for the first (solid blue line) and second (solid yellow line) transits, showing the vicinity of the sodium D2 (top panel) and D1 (bottom panel) lines. The yellow line is additionally offset for better visibility. The spectrum is shown as a function of the Doppler velocity with reference to the rest-frame wavelength of each line in the Solar System barycentre.

<footnote n="3">³ AROME code is publicly available at http://www.astro.up.pt/resources/arome/</footnote>
<figure><img src="image_6.png" /></figure>

**Fig. 5.** Rossiter-McLaughlin signal imprinted on the first transit (green crosses), second transit (blue crosses), and combined (black dots) RV time series. Additionally, we show in the top panel the best RM model from the ARoME + emcee fitting (magenta) and models within $1\sigma$ (light pink). The bottom panel contains the residuals of the combined RV time series.

models and the parameters from Hellier et al. (2019), we performed a Markov chain Monte Carlo (MCMC) fitting of the RM signal with emcee (Foreman-Mackey et al. 2013) using 11 chains of 5000 steps each. During the fitting, we left the mid-transit time ($T_0$), the sky-projected spin-orbit angle ($\lambda$), and the projected stellar rotational velocity ($v \sin i$) as free parameters. We imposed wide uniform priors on the three free parameters: $-0.02 \text{ days} < T_0 < 0.02 \text{ days}$, $-90 \text{ deg} < \lambda < 160 \text{ deg}$, and $-60 \text{ km s}^{-1} < v \sin i < 60 \text{ km s}^{-1}$. Additionally, we fixed the remaining planetary, stellar, and instrumental parameters in the fitting, including the limb-darkening coefficients that were estimated through LDTk (Parviainen & Aigrain 2015).

As a result of the RM analysis, we found WASP-178 b to be a misaligned planet, measuring $\lambda = 105.7_{-4.2}^{+3.6} \text{ deg}$, which is consistent with the value presented in Rodríguez Martínez et al. (2020) within the $3\sigma$ level. We show the best-fit RM model and RM models within $1\sigma$ in Fig. 5. We present the posterior distributions from the fitting in Fig. 6. The stellar $v \sin i_*$ result shows a $3\sigma$ difference from the literature value of $8.2 \pm 0.6 \text{ km s}^{-1}$ (Hellier et al. 2019), which can be associated with the use of updated system parameters. The effect of this difference in the RM profiles is small and therefore has no notable impact on our results. The unusually low rotational velocity for a spectral type A star might be explained if we are observing it on a near pole-on position. This hypothesis was posed in Rodríguez Martínez et al. (2020) and was supported by results in Pagano et al. (2024).

We corrected for the RM effect using the code StarRotator<fnref n="4" />, which estimates the star's spectrum during a transit via numerical integration of the stellar disk, allowing us to obtain a model for the stellar spectrum behind the planet at each phase. We generated the simulated star in a 400 × 400 grid without differential rotation and considered the limb-darkening coefficients determined from the simultaneous photometry. The model spectra were taken from the PHOENIX database (Husser et al. 2013) for each observed phase of the transit and included the centre-to-limb variations with a quadratic limb-darkening law. The RM effect at each input phase was obtained by dividing

<figure><img src="image_7.png" /></figure>

**Fig. 6.** Resulting posterior distributions for the three free ($T_0$, $\lambda$, and $v \sin i$) parameters from the RM fitting.

the in-transit spectra by the out-of-transit spectra and convolving with the instrumental resolution (considered 140.000 for the ESPRESSO mode). We used the stellar and planetary parameters listed in Table 2, except for $T_{\text{eff}}$, log($g$), and [Fe/H], which we rounded up to the nearest allowed values, 9400 K, 4.5 dex (in cgs units) and 0.0 dex (in solar metallicity), respectively. The resulting residuals were then used to correct for the RM effect on all in-transit exposures.

### 3. Simultaneous photometry with EulerCam

We observed four full transits of WASP-178 b with the Euler-Cam instrument (Lendl et al. 2012) installed on the 1.2 m Euler telescope in La Silla. The transits were observed in the r' - Gunn filter on 2021 May 3, 2021 June 29, 2021 July 9, and 2023 April 2 with exposure times of 110 s, 40 s, 42 s, and 33 s, respectively. On the nights of 2021 May 3 and 2021 July 9, the transits were obtained simultaneously with ESPRESSO. We reduced the data with the standard bias subtraction and flat correction procedure. The light curves were extracted using relative aperture photometry with apertures ranging from 30 to 44 pixels. The choice of reference stars and aperture size minimizes the root mean square (RMS) scatter in the out-of-transit portion.

Since the photometric data are affected by correlated noise due to observational, instrumental, or stellar effects, we used a combination of first- and second-order polynomial baseline models in different variables (time, FWHM, airmass, coordinate shifts, and sky background). The best combination of variables for each data set was established using the Bayesian information criterion (Table 3). We detrended the light curves and derived the system parameters using CONAN (Lendl et al. 2020a), an MCMC framework. Uniform priors were used to fit $R_p/R_*$, $b$, $T_0$, $P$, and $T_{14}$. The quadratic limb-darkening coefficients and their uncertainties were derived using the code LDCU<fnref n="5" /> (Deline et al. 2022).

<footnote n="4">⁴ https://github.com/Hoeijmakers/StarRotator</footnote>

<footnote n="5">⁵ https://github.com/delinea/LDCU</footnote>
<table><caption>**Table 2.** Summary of the stellar and planetary parameters of the WASP-178 system.</caption><thead><tr><th colspan="2">WASP-178 System parameters</th></tr></thead><tbody><tr><td>RA<sub>2000</sub></td><td>15:09:04.89</td><td>[4]</td></tr><tr><td>Dec<sub>2000</sub></td><td>-42:42:17.8</td><td>[4]</td></tr><tr><td>Parallax p [mas]</td><td>2.3119 ± 0.0600</td><td>[4]</td></tr><tr><td>Magnitude [V<sub>mag</sub>]</td><td>9.95</td><td>[4]</td></tr><tr><td>Systemic velocity (v<sub>sys</sub>) [km s<sup>-1</sup>]</td><td>-23.908 ± 0.007</td><td>[2]</td></tr><tr><th colspan="2">Stellar parameters</th></tr><tr><td>Star radius (R<sub>*</sub>) [R<sub>☉</sub>]</td><td>1.772 ± 0.020</td><td>[3]</td></tr><tr><td>Star mass (M<sub>*</sub>) [M<sub>☉</sub>]</td><td>2.169<sup>+0.083</sup><sub>-0.089</sub></td><td>[3]</td></tr><tr><td>Proj. rot. velocity (v sin i) [km s<sup>-1</sup>]</td><td>10.48<sup>+0.63</sup><sub>-0.56</sub></td><td>[1]</td></tr><tr><td>Age [Gyr]</td><td>0.05<sup>+0.06</sup><sub>-0.05</sub></td><td>[3]</td></tr><tr><td>Effective Temperature (T<sub>eff</sub>) [K]</td><td>9350 ± 150</td><td>[2]</td></tr><tr><td>Surface gravity (log g<sub>*</sub>) [log g<sub>☉</sub>]</td><td>4.35 ± 0.15</td><td>[2]</td></tr><tr><td>Metallicity ([Fe/H]) [[Fe/H]<sub>☉</sub>]</td><td>0.21 ± 0.16</td><td>[2]</td></tr><tr><th colspan="2">Planetary parameters</th></tr><tr><td>Planet radius (R<sub>p</sub>) [R<sub>⊕</sub>]</td><td>1.796 ± 0.022</td><td>[1]</td></tr><tr><td>Planet mass (M<sub>p</sub>) [M<sub>⊕</sub>]</td><td>1.66 ± 0.12</td><td>[2]</td></tr><tr><td>Eq. temperature (T<sub>eq</sub>) [K]</td><td>2470 ± 60</td><td>[2]</td></tr><tr><td>Density (ρ) [g cm<sup>-3</sup>]</td><td>0.632 ± 0.051</td><td>[1]</td></tr><tr><td>Surface gravity (log g<sub>p</sub>) [cgs]</td><td>3.106 ± 0.033</td><td>[1]</td></tr><tr><th colspan="2">Orbital and transit parameters</th></tr><tr><td>Transit centre time (T<sub>0</sub>) [HJD (UTC)]</td><td>2459338.19728<sup>+0.00007</sup><sub>-0.00015</sub></td><td>[1]</td></tr><tr><td>Period (P) [d]</td><td>3.3448371<sup>+0.0000010</sup><sub>-0.0000011</sub></td><td>[1]</td></tr><tr><td>Orbital semi-major axis (a) [au]</td><td>0.0561<sup>+0.0005</sup><sub>-0.0013</sub></td><td>[1]</td></tr><tr><td>Scaled semi-major axis (a/R<sub>*</sub>)</td><td>7.00<sup>+0.03</sup><sub>-0.13</sub></td><td>[1]</td></tr><tr><td>Orbital inclination (i) [°]</td><td>85.50<sup>+0.09</sup><sub>-0.29</sub></td><td>[1]</td></tr><tr><td>Projected orbital obliquity (λ) [°]</td><td>105.7<sup>+3.6</sup><sub>-4.2</sub></td><td>[1]</td></tr><tr><td>Impact parameter (b)</td><td>0.549<sup>+0.025</sup><sub>-0.008</sub></td><td>[1]</td></tr><tr><td>Eclipse duration (T<sub>14</sub>) [h]</td><td>3.532<sup>+0.019</sup><sub>-0.004</sub></td><td>[1]</td></tr><tr><td>Radius ratio (R<sub>p</sub>/R<sub>*</sub>)</td><td>0.10716<sup>+0.00047</sup><sub>-0.00039</sub></td><td>[1]</td></tr><tr><td>RV semi-amplitude (K<sub>*</sub>) [km s<sup>-1</sup>]</td><td>0.139 ± 0.009</td><td>[2]</td></tr><tr><td>Eccentricity (e)</td><td>0 (fixed)</td><td>—</td></tr><tr><th colspan="2">Derived parameters</th></tr><tr><td>Planetary orbital velocity (v<sub>orb</sub>) [km s<sup>-1</sup>]</td><td>182.3 ± 2.6</td><td></td></tr><tr><td>Approx. scale height (H) [km]</td><td>732 ± 59</td><td></td></tr><tr><td>Transit depth of H (δF/F) [×10<sup>-5</sup>]</td><td>13.1 ± 1.1</td><td></td></tr></tbody></table>

**Notes.** [1] This work; [2] Hellier et al. (2019); [3] Pagano et al. (2024); [4] Gaia Collaboration (2018).

based on the stellar parameters derived by Hellier et al. (2019) and fitted using Gaussian priors. We also accounted for additional white noise by including a jitter term for each light curve. The set of planetary and stellar parameters we obtained and used are listed in Table 2. The EulerCam light curves, together with their best-fit models, are presented in Fig. 7.

On the day of the second ESPRESSO transit (2021 July 9), we noticed a deviation from the light-curve fitted model starting around the end of ingress. This pattern can be caused by the passage of the planet in front of a spot on the surface of the star. Although WASP-178 is an A-type star, for which no magnetic activity is expected, these stars may still present some level of magnetic activity phenomena (Rackham et al. 2019). In order to safeguard from the influence of a possible active region, the five

<table><caption>**Table 3.** Summary of the EulerCam light curves.</caption><thead><tr><th>Date</th><th>Aperture (pixels)</th><th>Detrending</th></tr></thead><tbody><tr><td>2021-05-03</td><td>44</td><td>p(x<sup>2</sup> + y + FWHM<sup>2</sup>)</td></tr><tr><td>2021-07-09</td><td>30</td><td>p(t<sup>2</sup> + x<sup>2</sup> + y + FWHM + sky<sup>2</sup>)</td></tr><tr><td>2021-06-29</td><td>30</td><td>p(t<sup>2</sup> + FWHM<sup>2</sup>)</td></tr><tr><td>2023-04-02</td><td>30</td><td>p(AM<sup>2</sup> + x + y + FWHM + sky)</td></tr></tbody></table>

**Notes.** The notation of the baseline models for *p(j<sup>i</sup>)* refers to a polynomial of degree *i* in parameter *j* (t is the time, AM is the airmass, FWHM is the stellar FWHM, and sky is the sky background). The notation of GPs refers to Gaussian processes.

affected in-transit spectra between -0.054 and -0.030 days from the transit centre were discarded from the analysis. Without these exposures, the S/N of the second transit transmission spectrum in the Na I doublet drops from 402 to 386, while for the first transit, we reach an S/N of 456 in these orders.

## 4. Transmission spectroscopy of WASP-178 b

To construct the transmission spectrum, we combined the out-of-transit spectra in the stellar rest frame into the master-out spectrum, which contains the mean stellar spectrum. The master-out as well as the RM model were divided out of the in-transit data, leaving behind the signal of the planetary atmosphere. These spectra were then shifted to the planetary rest frame and combined into the transmission spectrum. We executed this process for each night separately to evaluate any variations between them. No significant difference was noted between the transmission spectra of the two nights, and they were therefore combined to form a transmission with a higher S/N. For more details of the method we followed, we refer to Wyttenbach et al. (2015) and Seidel et al. (2019).

It is known that the coudé train optics of ESPRESSO leave interference patterns on the data in the form of pseudo-sinusoidal waves (Allart et al. 2020; Tabernero et al. 2021; Sedaghati et al. 2021). These interference patterns are most prominent after the stellar out-of-transit spectrum is removed, and they are a conjunction of a high-frequency wave (~1 Å period) and a lower frequency wave (~30 Å period). The higher-frequency wiggles have a smaller amplitude and can be neglected as they are hidden in the noise. On the other hand, the lower-frequency wiggles present a significant effect on the transmission spectra around the Na I doublet. We corrected for this trend by masking the sodium lines and using a cubic spline fit to the over-binned (×600) transmission spectrum of each transit. The effect of the wiggles was not noticeable in the remaining orders addressed in this work.

### 4.1. Transmission line fitting

The transmission lines were binned and fitted with Gaussian profiles using a Bayesian MCMC approach. In Figs. 8–11, the transmission lines for the Na I doublet, Hα, Hβ, and the Mg I b1 lines are shown, respectively, with their best-fit profile. In the case of the Li I and Hγ lines, no signal was identified, as we can verify from Figs. 12–13. The resulting line fit parameters are shown in Table 4. We used the central wavelength and FWHM of the fitted Gaussians to derive the equivalent line centre shift and broadening in terms of velocity. The detection level was
<figure><img src="image_8.png" /><figcaption>Fig. 7. Four detrended EulerCam transit observations of WASP-178 b with an offset of 0.02 for visibility. In the top panel, the data are represented by the grey points and the best-fit model is represented by the red lines. The corresponding date is displayed above each set. The blue points correspond to the ×20 binned data. The bottom panel contains the residuals for each night relative to the dashed black line, in the same order.</figcaption></figure>

computed as the ratio of the fitted line amplitude and its positive uncertainty, obtained from the probability distribution of the parameters, propagated with the false-positive probability. This is discussed further in Sect. 4.2.

We related the absorption line depths with the area covered by the respective element and translated the line profiles to equivalent heights and velocity distributions. This is shown in Figs. A.1–A.4. For the Na I doublet, we co-added the lines in velocity space with respect to their expected position. We also illustrate the instrumental broadening and the escape velocity, $v_{esc}$, with height $h$ above the opaque planetary disk, calculated

via Eq. (1), for comparison,

$$v_{esc} = \sqrt{\frac{2GM_p}{(R_p + h)}} \quad (1)$$

With the detection of two of the hydrogen Balmer series lines, we are able to estimate the temperature in the thermosphere layer. This can be done through Boltzmann's equation, using the $H\alpha$ and $H\beta$ lines to estimate the ratio of hydrogen atoms in the second and third excited states. Since we do not have the true continuum of the planetary spectrum, we may use the equivalent widths measured from the transmission spectrum as a probe for the ratio of the electronic levels.

## 4.2. Bootstrap analysis

We performed a bootstrap analysis through empirical Monte Carlo (EMC) methods to assess the possibility that the absorption features are induced by spurious signals or systematic errors, and quantified it through the false-positive probability. We followed the approach in Redfield et al. (2008) by comparing the results achieved from three simulated scenarios: in-in, out-out, and in-out. In all scenarios, we sampled with repetition exposures to form virtual in-transit and out-of-transit sets, each with 18 spectra. In the out-out scenario, both virtual sets contain spectra sampled from the real out-of-transit set, while the opposite was done for the in-in scenario. The third scenario was the in-out, where the virtual in-transit and out-of-transit sets contained real in-transit and out-of-transit spectra, respectively.

In each of the scenarios, we built the transmission spectrum following the steps discussed previously and computed the relative depth of the central wavelength passband in comparison to adjacent red and blue passbands. We defined central passbands with widths of 12 Å around the centre of the Na I doublet, 10 Å around the $H\alpha$ line, and 6 Å around the $H\beta$ and Mg I b1 lines. The red and blue passbands were defined with widths of 6 Å for the sodium doublet, the $H\beta$ and the Mg I b1 lines, and of 10 Å for the $H\alpha$ line.

We performed 10 000 iterations of the in-in, out-out, and in-out scenarios on each night separately and built the transmission spectra. The relative depth distributions are shown in Figs. B.1–B.2 for the Na I doublet, the $H\alpha$, $H\beta$, and Mg I b1 lines. We fitted a Gaussian profile to each of the distributions and record the in-out absorption depth, the standard deviation of the out-out distribution, $\sigma_{out-out}$, and the false-positive probability in Table 5. The false-positive probability was derived from $\sigma_{out-out}$ and quantifies the possibility of a spurious detection from other than the planet's atmosphere, since the out-out scenario is composed of out-of-transit spectra alone. If the signal observed in the transmission spectrum is of planetary origin, we expect the distributions to be centred around zero, with the in-out distribution shifted.

In all cases, the in-in and out-out scenarios are centred around 0.0%. They deviate by 0.005% at most, as expected. The in-out scenarios for the Na I doublet and $H\alpha$ deviate by more than –0.19 and –0.14%, respectively, indicating that the signals are of planetary origin. The case for the $H\beta$ line shows a similar result, although with a relatively smaller deviation. For the Mg I b1 line, we cannot make this conclusion since the in-out distributions are drifted by an order of magnitude less from 0.0%, indicating that there is little to no absorption. In addition, the in-out distribution on the second night shows a positive shift, which corresponds to an emission signal. This is another indication that these results
<table><caption>**Table 4.** Median values of the Gaussian fit parameters and 68% confidence intervals from the probability distribution for the narrow-band detections.</caption><thead><tr><th></th><th>Amplitude [%]</th><th>FWHM [Å]</th><th>Centre [Å]</th><th>V<sub>FWHM</sub> [km s<sup>-1</sup>]</th><th>Centre shift [km s<sup>-1</sup>]</th><th>Detection</th></tr></thead><tbody><tr><td>Na I D2</td><td>-0.338<sup>+0.053</sup><sub>-0.056</sub></td><td>0.186<sup>+0.044</sup><sub>-0.036</sub></td><td>5889.953<sup>+0.013</sup><sub>-0.012</sub></td><td>9.5<sup>+2.2</sup><sub>-1.8</sub></td><td>0.14<sup>+0.65</sup><sub>-0.60</sub></td><td>5.5σ</td></tr><tr><td>Na I D1</td><td>-0.314<sup>+0.049</sup><sub>-0.055</sub></td><td>0.160<sup>+0.037</sup><sub>-0.034</sub></td><td>5895.966<sup>+0.012</sup><sub>-0.014</sub></td><td>8.1<sup>+1.8</sup><sub>-1.7</sub></td><td>2.18<sup>+0.65</sup><sub>-0.79</sub></td><td>5.4σ</td></tr><tr><td>Hα</td><td>-0.717<sup>+0.038</sup><sub>-0.039</sub></td><td>0.866<sup>+0.047</sup><sub>-0.044</sub></td><td>6562.724<sup>+0.022</sup><sub>-0.023</sub></td><td>39.6<sup>+2.1</sup><sub>-2.0</sub></td><td>-3.5<sup>+1.0</sup><sub>-1.0</sub></td><td>13σ</td></tr><tr><td>Hβ</td><td>-0.462<sup>+0.060</sup><sub>-0.062</sub></td><td>0.447<sup>+0.075</sup><sub>-0.065</sub></td><td>4861.338<sup>+0.032</sup><sub>-0.028</sub></td><td>27.6<sup>+4.6</sup><sub>-4.0</sub></td><td>0.3<sup>+1.9</sup><sub>-1.7</sub></td><td>7.1σ</td></tr><tr><td>Mg I b1</td><td>-0.200<sup>+0.030</sup><sub>-0.031</sub></td><td>0.477<sup>+0.092</sup><sub>-0.081</sub></td><td>5183.427<sup>+0.034</sup><sub>-0.038</sub></td><td>27.6<sup>+5.3</sup><sub>-4.7</sub></td><td>-10.2<sup>+2.0</sup><sub>-2.2</sub></td><td>4.6σ</td></tr><tr><td>Li I resonant line</td><td>...</td><td>...</td><td>...</td><td>...</td><td>...</td><td>&lt;3 σ</td></tr><tr><td>Hγ</td><td>...</td><td>...</td><td>...</td><td>...</td><td>...</td><td>&lt;3 σ</td></tr></tbody></table>

**Notes.** The amplitude [%], FWHM [Å], and centre [Å] were the fitted parameters, and the remaining values were derived. Li I and Hγ were not detected in the narrow-band transmission spectrum, and we therefore did not fit any profile.

<figure><img src="image_9.png" /></figure>

**Fig. 8.** ESPRESSO transmission spectrum of WASP-178 b on the planetary rest frame around the Na I doublet. Top panel: the grey points represent the unbinned data, the blue points represent the data binned by x20 and the Gaussian fit to the sodium doublet lines is shown by the solid red line. The expected line centres are marked by the dashed black lines. Bottom panel: the residuals of the fit are shown, with the black dots corresponding to the binned data.

<figure><img src="image_10.png" /><figcaption>**Fig. 9.** Same as Fig. 8 for the Hα line.</figcaption></figure>

<figure><img src="image_11.png" /><figcaption>**Fig. 10.** Same as Fig. 8 for the Hβ line.</figcaption></figure>

are inconclusive. We took the false-positive probability as the standard deviation of the out-out scenario, corrected to the real number of in- and out-of-transit exposures. We conclude from the bootstrap analysis that the Na I doublet has a false-positive probability of 0.047 and 0.037% for the two transits, respectively. These values are 0.056 and 0.057% for Hα, 0.033 and 0.038% for Hβ, and for Mg I they are 0.043 and 0.041%.

## 5. Cross-correlation analysis

To confirm the detection of Mg I and search for Fe I and Fe II, we further analysed the two transit-time series using the cross-correlation technique (Snellen et al. 2010), following the method in Hoeijmakers et al. (2020). We only included exposures with a sufficiently high S/N (see Sect. 2). We used
<figure><img src="image_12.png" /><figcaption>Fig. 11. Same as Fig. 8 for the Mg I b1 line.</figcaption></figure>

<figure><img src="image_13.png" /><figcaption>Fig. 12. Same as Fig. 8 for the Li I line. The data show no absorption signal in this region.</figcaption></figure>

<figure><img src="image_14.png" /><figcaption>Fig. 13. Same as Fig. 8 for the Hy line. The data show no absorption signal in this region.</figcaption></figure>

tayph<fnref n="6" /> to perform the cross-correlation analysis on the S2D spectra. In particular, we corrected the spectra for telluric contamination by dividing out the best-fit telluric profiles (see Sect. 2) and then performed a velocity correction for the stellar reflex motion, leaving all spectra at a constant velocity shift that is consistent with the systemic velocity. Following Hoeijmakers et al. (2020), we applied a colour correction to the individual orders to account for variations in the broad-band continuum throughout the observations (see Hoeijmakers et al. 2020, for a more detailed discussion), and we rejected outliers by applying an order-by-order sigma-clipping algorithm with a width of 40 px. This algorithm computes a running median absolute deviation over sub-bands, and any value that deviated by more than 5σ from the running median in any given band was masked out, thus rejected, and interpolated. Additionally, we manually flagged columns in the data where the telluric correction left systematic residuals, in particular, in the region of deep O₂ bands, and we rejected the reddest order because Mg I, Fe I, and Fe II are not

expected to absorb significantly at the reddest orders. The rejection of outliers and manual masking affected 4.31 and 13.53% of the pixels in the time series of 2021 May 3 and 2021 July 9, respectively. Using cross-correlation templates from Kitzmann et al. (2023) at a temperature of 2500 (neutrals) and 4000 K (ion), we searched for Mg I, Fe I and Fe II. To fit for the Rossiter-McLaughlin effect, we constructed an empirical model based on the two-dimensional cross-correlation maps for each species individually, fitting a Gaussian with two components similar to Prinoth et al. (2022) and dividing it out (see Fig. D.1). Any residual broad-band variation was removed by a high-pass filter with a width of 100 km s⁻¹. Finally, we converted the two-dimensional cross-correlation maps into Kp-Vsys maps (see Hoeijmakers et al. 2020 and Prinoth et al. 2022 for an extensive discussion). Using the average S/N in Table 1 as a weight, we combined the two Kp-Vsys maps. The results of the cross-correlation analysis for Mg I, Fe I, and Fe II are shown in Fig. 14. At the location of the peak, we extracted the one-dimensional cross-correlation function and fitted a Gaussian to determine the amplitude, centre, and width of the absorption. The fitted parameters are shown in Table 6, along with the shift between the literature Vsys value, which corresponds to the planetary rest frame. The detection level is obtained as the ratio of the fitted signal amplitude and its uncertainty.

To assess whether the signal uniquely stems from in-transit exposures, we conducted a bootstrapping analysis, following the method outlined in Hoeijmakers et al. (2020) in Appendix C.1. This assessment is similar to the approach detailed in Sect. 4.2, but it is executed in velocity space rather than wavelength space. This adaptation takes into account the fact that we considered the average of all lines within the spectrograph wavelength and not single absorption lines. We conducted the bootstrap analysis for each night and each species individually (see Appendix C). The results of this analysis are shown in Table 7.

## 6. Discussion and conclusions

The results from the narrow-band transmission spectroscopy revealed sodium via the detection of the Na I D2 (5.5σ) and D1 (5.4σ) lines and hydrogen via the Hα (13σ) and Hβ (7.1σ) lines, with a tentative detection of the Mg I b1 (4.6σ) line. According to the analysis described in Sect. 4.1, we observe a certain difference in behaviour between the detected elements. The Na I D2 line does not appear to be shifted, with a centre velocity of 0.14 ± 0.65 km s⁻¹, while the D1 line shows a very slight 2.18 ± 0.79 km s⁻¹ redshift (significant below 3σ). Both lines are significantly broader than the instrumental resolution of 2 km s⁻¹, with an FWHM of 9.5 ± 2.2 for the D2 line and 8.1 ± 1.8 km s⁻¹ for the D1 line. We observe a blueshift of -3.5 ± 1.0 km s⁻¹ (significant at 3.5σ) with a broadening of 39.6 ± 2.1 km s⁻¹ for Hα, while Hβ shows no shift and is broadened by 27.6 ± 4.6 km s⁻¹. These values are far above the instrumental resolution, which could serve as an indication for possible atmospheric escape. From inspecting Figs. A.1–A.4, we note that it is possible for hydrogen higher up in the atmosphere to have speeds exceeding the escape velocity, while for sodium and magnesium, this scenario is far less likely. The Mg I b1 line studied in the narrow band shows a considerable blueshift of -10.2 ± 2.2 km s⁻¹. The line FWHM corresponds to a broadening of 27.6 ± 5.3 km s⁻¹, which, similarly to Hα, could be caused by atmospheric dynamics under the caveat of our bootstrapping results in the narrow band. As this line probes the atmosphere in a lower region, where the escape of magnesium is less likely,

<footnote n="6">⁶ https://github.com/Hoeijmakers/tayph</footnote>
<table><caption>**Table 5.** Results from the EMC bootstrap method for the narrow-band results.</caption><thead><tr><th></th><th></th><th>In-out centre [%]</th><th>σ<sub>out-out</sub> [%]</th><th>False-positive probability [%]</th></tr></thead><tbody><tr><td rowspan="2">Na I</td><td>2021 May 03</td><td>-0.19</td><td>0.065</td><td>0.047</td></tr><tr><td>2021 July 09</td><td>-0.19</td><td>0.055</td><td>0.037</td></tr><tr><td rowspan="2">Hα</td><td>2021 May 03</td><td>-0.15</td><td>0.077</td><td>0.056</td></tr><tr><td>2021 July 09</td><td>-0.14</td><td>0.086</td><td>0.057</td></tr><tr><td rowspan="2">Hβ</td><td>2021 May 03</td><td>-0.040</td><td>0.045</td><td>0.033</td></tr><tr><td>2021 July 09</td><td>-0.036</td><td>0.056</td><td>0.038</td></tr><tr><td rowspan="2">Mg I b1</td><td>2021 May 03</td><td>-0.011</td><td>0.059</td><td>0.043</td></tr><tr><td>2021 July 09</td><td>0.012</td><td>0.061</td><td>0.041</td></tr></tbody></table>

<table><caption>**Table 6.** Median values of the Gaussian fit parameters and 68% confidence intervals from the probability distribution for the cross-correlation detections of each night.</caption><thead><tr><th></th><th>Date</th><th>Amplitude [%]</th><th>FWHM [km s<sup>-1</sup>]</th><th>Peak RV [km s<sup>-1</sup>]</th><th>Peak RV-V<sub>sys</sub> shift [km s<sup>-1</sup>]</th><th>Detection</th></tr></thead><tbody><tr><td rowspan="2">Fe I</td><td>2021 May 03</td><td>0.0502 ± 0.0015</td><td>16.53 ± 0.57</td><td>-28.10 ± 0.24</td><td>-4.19 ± 0.24</td><td>12</td></tr><tr><td>2021 July 09</td><td>0.0297 ± 0.0016</td><td>15.36 ± 0.94</td><td>-28.83 ± 0.40</td><td>-4.93 ± 0.40</td><td>10</td></tr><tr><td rowspan="2">Fe II</td><td>2021 May 03</td><td>0.1441 ± 0.0058</td><td>11.32 ± 0.52</td><td>-26.61 ± 0.22</td><td>-2.70 ± 0.22</td><td>11</td></tr><tr><td>2021 July 09</td><td>0.1056 ± 0.0051</td><td>13.33 ± 0.74</td><td>-26.72 ± 0.31</td><td>-2.81 ± 0.31</td><td>8.4</td></tr><tr><td rowspan="2">Mg I</td><td>2021 May 03</td><td>0.154 ± 0.011</td><td>17.9 ± 1.5</td><td>-26.73 ± 0.64</td><td>-2.82 ± 0.64</td><td>7.8</td></tr><tr><td>2021 July 09</td><td>0.138 ± 0.017</td><td>11.4 ± 1.6</td><td>-25.74 ± 0.67</td><td>-1.83 ± 0.67</td><td>5.8</td></tr></tbody></table>

**Notes.** All parameters shown were obtained from the fit to the CCF signal, except for the peak shift (RV-V<sub>sys</sub>) and the detection level.

<table><caption>**Table 7.** Results from the EMC bootstrap method for the cross-correlation results.</caption><thead><tr><th></th><th></th><th>In-out centre [%]</th><th>σ<sub>out-out</sub> [%]</th><th>False-positive probability [%]</th></tr></thead><tbody><tr><td rowspan="2">Fe I</td><td>2021 May 03</td><td>-0.030</td><td>0.0052</td><td>0.0038</td></tr><tr><td>2021 July 09</td><td>-0.023</td><td>0.0040</td><td>0.0025</td></tr><tr><td rowspan="2">Fe II</td><td>2021 May 03</td><td>-0.100</td><td>0.017</td><td>0.012</td></tr><tr><td>2021 July 09</td><td>-0.096</td><td>0.018</td><td>0.011</td></tr><tr><td rowspan="2">Mg I</td><td>2021 May 03</td><td>-0.091</td><td>0.022</td><td>0.016</td></tr><tr><td>2021 July 09</td><td>-0.052</td><td>0.027</td><td>0.017</td></tr></tbody></table>

this result points towards the existence of strong winds in the terminator. Similar atmospheric dynamics are indicated by the broadened absorption features on the hot dayside in emission, which were verified on CRIRES+ data in the near infrared (NIR) (Cont et al. 2024).

We additionally report the non-detection of the Li I resonance line and the Hγ line. The non-detection of Li I is curious because this trace element has been detected in the atmospheres of similar UHJ, such as WASP-121 b (Borsa et al. 2021) and WASP-76 b (Tabernero et al. 2021). A detection of Li I should be made easier by the absence of Li I absorption from the star, yielding a higher S/N in the wavelength range around the line as well as avoiding the RM effect. This might be due to insufficient S/N in our data. We note that Li I absorption was only detected on 4-UT data and not detected on 1-UT data of WASP-121 b for this reason (Borsa et al. 2021). Further observations might help clarify the existence of Li I in the atmosphere of WASP-178 b.

When the data were analysed through the cross-correlation method, we detected Fe I and Fe II in the atmosphere of WASP-178 b with a significance of 12σ and 10σ, respectively, for the first night, and with 11σ and 8.4σ for the second night. The bootstrap analyses of these two species showed that the signal uniquely and uniformly originated from the in-transit exposures (see Appendix C). Similarly, Mg I exhibited a signal in the Kp-Vsys map with a significance of 7.8σ and 5.8σ for the two

transits, although we note that for the second night, the location of the Mg I absorption is observed at a significantly lower Kp. All signals appear to be blueshifted with respect to the expected rest frame velocity by -4.19 ± 0.24 km s<sup>-1</sup> (Fe I), -2.70 ± 0.22 km s<sup>-1</sup> (Fe II), and -1.83 ± 0.67 km s<sup>-1</sup> (Mg I) at least, and they are broadened to a FWHM of 15.36 ± 0.94 km s<sup>-1</sup> (Fe I), 11.32 ± 0.52 km s<sup>-1</sup> (Fe II), and 17.9 ± 1.5 km s<sup>-1</sup> (Mg I). These results indicate atmospheric dynamics in the more central to lower layers, where Fe I sits. Between the detections of Na I, Fe I, Fe II, and Mg I, we observe decreasing broadening and blueshift with height, which might be an indication that the lower layers have stronger dynamics and winds because atmospheric escape is less likely for these elements. However, the disparity between the Mg I signature on both nights through cross-correlation, and with regard to the detection in narrow-band, leaves room for doubting the existence and concrete behaviour of magnesium in the atmosphere of WASP-178 b.

The ratio of the depths of Hα and Hβ is 1.55 ± 0.22, which is similar to results obtained for distinct UHJ, such as WASP-33 b (Cauley et al. 2021) and MASCARA-2 b (Casasayas-Barris et al. 2019). Following these studies, Hγ is expected to have a depth of 0.56 times that of Hα, corresponding to -0.40%, which coincides with the standard deviation of the continuum near the line centre. The noise level verified around the Hγ line core can mask a potential detection, reinforcing the need for observations
<figure><img src="image_15.png" /><figcaption>**Fig. 14.** Cross-correlation analysis results of the first (2021 May 3, top) and second (2021 July 9, bottom) transit. From left to right, we searched for Fe I, Fe II, and Mg I. Top panel: expected velocities (white lines), and the detected location in the *K*<sub>p</sub>-*V*<sub>sys</sub> space (black lines). Bottom panel: extracted one-dimensional cross-correlation function at the detected location (horizontal black line). The dashed red lines show the best-fit Gaussian. The vertical black line shows the expected rest frame velocity, indicating blueshifts for all the detected species.</figcaption></figure>

with a higher S/N. The application of Boltzmann's equation on
Hα and Hβ yielded a temperature of 4875 ± 1750 K in the

thermosphere of WASP-178 b, taking into consideration that it
is determined using the direct ratio of the two Balmer lines,
which only serves as a rough estimate. This value agrees with the pressure-temperature profile obtained in Lothringer et al. (2022).

A previous study conducted with HST/WFC3/UVIS data (Lothringer et al. 2022) in the NUV presented the absence of Fe I in the atmosphere of WASP-178 b and found that the absorption in this band could be explained by SiO at solar abundance or Mg I + Fe II at super-solar abundance. The non-detection of Fe II and Mg II at higher resolution in STIS E230M data led to the conclusion that the atmosphere is likely dominated by SiO. Our detections of Mg I, Fe I, and Fe II in cross-correlation suggest that the most likely scenario would be a Mg I- and Fe II-dominated absorption in the NUV, possibly containing contributions from SiO as well in order to justify the absorption depths observed in this band. Further space-based observations could help to determine the relative abundances of these and other elements and to better interpret these results.

Strong evidence of H₂O and CO was also found on the dayside of WASP-178 b through emission spectroscopy with CRIRES+ (Cont et al. 2024). As a possible scenario to explain both our findings, we propose that H₂O vapour on the nightside dissociates due to the extremely high temperature and irradiation on the dayside, allowing for the detection of hydrogen in the higher layers of the atmosphere via the Hα line. Near the terminator, recombination can occur, forming once again H₂O. Extending this cycle to H₂ would agree with results reported in recent studies (Bell & Cowan 2018; Tan & Komacek 2019; Mansfield et al. 2020; Helling, C. et al. 2021, 2023; Pagano et al. 2024), suggesting that at the high temperatures of UHJ, such as WASP-178 b, dissociation and recombination of H₂ can occur, which might cause winds of ionised particles on the dayside that are driven by the magnetic field of the planet. The presence of such winds would also support the hypothesis that UHJs with high irradiation temperatures present an efficient recirculation from the day- to the nightside (Zhang et al. 2018), as was observed for instance in Seidel et al. (2021, 2023). In a separate study, WASP-178 b was found to have a very high recirculation efficiency (Pagano et al. 2024), which according to global circulation models (GCM) from Kataria et al. (2016) can be associated with the existence of zonal winds. Our results from the transmission spectroscopy show only a slight blueshift in the upper or middle layers of the atmosphere, indicating a lack of strong zonal winds in these layers. This seems to contradict previous predictions because the observed high recirculation efficiency appears to be dissociated with the presence of zonal winds.

WASP-178 b is an interesting case study for atmospheric dynamics and the relation between winds and the efficiency of recirculation in UHJ. We suggest follow-up observations and investigation of this system through the use of both space-based instruments such as JWST and ground-based instruments, in order to better constrain the atmospheric composition of WASP-178 b. Additionally, the application of circulation models would allow for a better constraint of the undergoing atmospheric dynamics, linking it to other hot Jupiter and UHJ observations.

*Acknowledgements.* We thank the anonymous referee for their comments which have improved the manuscript. We thank D. Cont for his fruitful discussion on this target and for sharing a draft of his parallel work on the dayside of this planet. The authors acknowledge the ESPRESSO project team for its effort and dedication in building the ESPRESSO instrument. This work relied on observations collected at the European Southern Observatory. This work has been carried out within the framework of the National Centre of Competence in Research PlanetS supported by the Swiss National Science Foundation under grants 51NF40_182901 and 51NF40_205606. The authors acknowledge the financial support of the SNSF. We acknowledge financial support from the Agencia Estatal de Investigación of the Ministerio de Ciencia e Innovación MCIN/AEI/10.13039/501100011033 and the ERDF “A way of making Europe”

through project PID2021-1256270B-C32, from the Centre of Excellence “Severo Ochoa” award to the Instituto de Astrofísica de Canarias, and from The Fund of the Walter Gyllenberg Foundation. This project has received funding from the Swiss National Science Foundation (SNSF) for project 200021_200726. R.A. is a Trottier Postdoctoral Fellow and acknowledges support from the Trottier Family Foundation. This work was supported in part through a grant from the Fonds de Recherche du Québec - Nature et Technologies (FRQNT). This work was funded by the Institut Trottier de Recherche sur les Exoplanètes (iREX). J.I.G.H., A.S.M., R.R. and C.A.P. acknowledge financial support from the Spanish Ministry of Science and Innovation (MICINN) project PID2020-117493GB-I00. This work was financed by Portuguese funds through FCT (Fundação para a Ciência e a Tecnologia) in the framework of the project 2022.04048.PTDC (Phi in the Sky, DOI 10.54499/2022.04048.PTDC). C.J.M. also acknowledges FCT and POCH/FSE (EC) support through Investigador FCT Contract 2021.01214.CEECIND/CP1658/CT0001 (DOI 10.54499/2021.01214.CEECIND/CP1658/CT0001). F.P.E. and C.L.O. would like to acknowledge the Swiss National Science Foundation (SNSF) for supporting research with ESPRESSO through the SNSF grants nr. 140649, 152721, 166227, 184618 and 215190. The ESPRESSO Instrument Project was partially funded through SNSF’s FLARE Programme for large infrastructures. J.L.-B. was partly funded by grants LCF/BQ/PI20/11760023, Ramón y Cajal fellowship with code RYC2021-031640-I, and the Spanish MCIN/AEI/10.13039/501100011033 grant PID2019-107061GB-C61. E.E.B. acknowledges financial support from the European Union and the State Agency of Investigation of the Spanish Ministry of Science and Innovation (MICINN) under the grant PRE2020-093107 of the Pre-Doc Program for the Training of Doctors (FPI-SO) through FSE funds. A.R.C.S. acknowledges support from the Fundação para a Ciência e a Tecnologia (FCT) and POCH/FSE through the fellowship 2021.07856. B.D. and the research grants UIDB/04434/2020 and UIDP/04434/2020. This work has been carried out within the framework of the NCCR PlanetS supported by the Swiss National Science Foundation under grant 51NF40_205606. This work was co-funded by the European Union (ERC, FIERCE, 101052347). Views and opinions expressed are however those of the authors only and do not necessarily reflect those of the European Union or the European Research Council. Neither the European Union nor the granting authority can be held responsible for them. This work was supported by FCT - Fundação para a Ciência e a Tecnologia through national funds and by FEDER through COMPETE2020 - Programa Operacional Competitividade e Internacionalização by these grants: UIDB/04434/2020; UIDP/04434/2020. E.H.-C. acknowledges support from grant PRE2020-094770 under project PID2019-109522GB-C51 funded by the Spanish Ministry of Science and Innovation / State Agency of Research, MCIN/AEI/10.13039/501100011033, and by ‘ERDF, A way of making Europe’. Y.C.D. and J.V.S. acknowledge support from ESO through an SSDF studentship. M.R.Z.O. acknowledges financial support from the Spanish Ministry for Science, Innovation and Universities via project PID2022-137241NB-C42. M.L. acknowledges support of the Swiss National Science Foundation under grant number PCEFP2_194576.

## References

* Allart, R., Lovis, C., Pino, L., et al. 2017, A&A, 606, A144

* Allart, R., Pino, L., Lovis, C., et al. 2020, A&A, 644, A155

* Azevedo Silva, T., Demangeon, O. D. S., Santos, N. C., et al. 2022, A&A, 666, L10

* Baranne, A., Queloz, D., Mayor, M., et al. 1996, A&AS, 119, 373

* Bell, T. J., & Cowan, N. B. 2018, ApJ, 857, L20

* Borsa, F., Rainer, M., Bonomo, A. S., et al. 2019, A&A, 631, A34

* Borsa, F., Allart, R., Casasayas-Barris, N., et al. 2021, A&A, 645, A24

* Borsato, N. W., Hoeijmakers, H. J., Prinoth, B., et al. 2023, A&A, 673, A158

* Boué, G., Montalto, M., Boisse, I., Oshagh, M., & Santos, N. C. 2013, A&A, 550, A53

* Casasayas-Barris, N., Pallé, E., Yan, F., et al. 2019, A&A, 628, A9

* Casasayas-Barris, N., Pallé, E., Yan, F., et al. 2020, A&A, 635, A206

* Cauley, P. W., Wang, J., Shkolnik, E. L., et al. 2021, AJ, 161, 152

* Cont, D., Nortmann, L., Yan, F., et al. 2024, A&A, 688, A206

* Deline, A., Hooton, M. J., Lendl, M., et al. 2022, A&A, 659, A74

* Delrez, L., Santerne, A., Almenara, J. M., et al. 2016, MNRAS, 458, 4025

* Ehrenreich, D., Lovis, C., Allart, R., et al. 2020, Nature, 580, 597

* Foreman-Mackey, D., Hogg, D. W., Lang, D., & Goodman, J. 2013, PASP, 125, 306

* Gaia Collaboration (Brown, A. G. A., et al.) 2018, A&A, 616, A1

* Gandhi, S., Kesseli, A., Snellen, I., et al. 2022, MNRAS, 515, 749

* Gaudi, B. S., Stassun, K. G., Collins, K. A., et al. 2017, Nature, 546, 514

* Gibson, N. P., Nugroho, S. K., Lothringer, J., Maguire, C., & Sing, D. K. 2022, MNRAS, 512, 4618

* Hellier, C., Anderson, D. R., Barkaoui, K., et al. 2019, MNRAS, 490, 1479
Helling, C., Worters, M., Samra, D., Molaverdikhani, K., & Iro, N. 2021, A&A, 648, A80

Helling, C., Samra, D., Lewis, D., et al. 2023, A&A, 671, A122

Hoeijmakers, H. J., Ehrenreich, D., Heng, K., et al. 2018, Nature, 560, 453

Hoeijmakers, H. J., Ehrenreich, D., Kitzmann, D., et al. 2019, A&A, 627, A165

Hoeijmakers, H. J., Seidel, J. V., Pino, L., et al. 2020, A&A, 641, A123

Holt, J. R. 1893, A&A, 12, 646

Husser, T. O., Wende-von Berg, S., Dreizler, S., et al. 2013, A&A, 553, A6

Kataria, T., Sing, D. K., Lewis, N. K., et al. 2016, ApJ, 821, 9

Kausch, W., Noll, S., Smette, A., et al. 2015, A&A, 576, A78

Kitzmann, D., Hoeijmakers, H. J., Grimm, S. L., et al. 2023, A&A, 669, A113

Komacek, T. D., Showman, A. P., & Tan, X. 2017, ApJ, 835, 198

Lendl, M., Anderson, D. R., Collier-Cameron, A., et al. 2012, A&A, 544, A72

Lendl, M., Bouchy, F., Gill, S., et al. 2020a, MNRAS, 492, 1761

Lendl, M., Csizmadia, S., Deline, A., et al. 2020b, A&A, 643, A94

Lothringer, J. D., Sing, D. K., Rustamkulov, Z., et al. 2022, Nature, 604, 49

Mansfield, M., Bean, J. L., Stevenson, K. B., et al. 2020, ApJ, 888, L15

McLaughlin, D. B. 1924, ApJ, 60, 22

Pagano, I., Scandariato, G., Singh, V., et al. 2024, A&A, 682, A102

Parmentier, V., & Crossfield, I. J. M. 2018, in Handbook of Exoplanets, eds. H. J. Deeg, & J. A. Belmonte (Berlin: Springer), 116

Parviainen, H., & Aigrain, S. 2015, MNRAS, 453, 3821

Pelletier, S., Benneke, B., Ali-Dib, M., et al. 2023, Nature, 619, 491

Pepe, F., Mayor, M., Galland, F., et al. 2002, A&A, 388, 632

Pepe, F., Cristiani, S., Rebolo, R., et al. 2021, A&A, 645, A96

Perez-Becker, D., & Showman, A. P. 2013, ApJ, 776, 134

Pino, L., Désert, J.-M., Brogi, M., et al. 2020, ApJ, 894, L27

Pino, L., Brogi, M., Désert, J. M., et al. 2022, A&A, 668, A176

Prinoth, B., Hoeijmakers, H. J., Kitzmann, D., et al. 2022, Nat. Astron., 6, 449

Rackham, B. V., Apai, D., & Giampapa, M. S. 2019, AJ, 157, 96

Redfield, S., Endl, M., Cochran, W. D., & Koesterke, L. 2008, ApJ, 673, L87

Rodríguez Martínez, R., Gaudi, B. S., Rodriguez, J. E., et al. 2020, AJ, 160, 111

Rossiter, R. A. 1924, ApJ, 60, 15

Schwartz, J. C., Kashner, Z., Jovmir, D., & Cowan, N. B. 2017, ApJ, 850, 154

Sedaghati, E., MacDonald, R. J., Casasayas-Barris, N., et al. 2021, MNRAS, 505, 435

Seidel, J. V., Ehrenreich, D., Wyttenbach, A., et al. 2019, A&A, 623, A166

Seidel, J. V., Ehrenreich, D., Allart, R., et al. 2021, A&A, 653, A73

Seidel, J. V., Cegla, H. M., Doyle, L., et al. 2022, MNRAS, 513, L15

Seidel, J. V., Borsa, F., Pino, L., et al. 2023, A&A, 673, A125

Smette, A., Sana, H., Noll, S., et al. 2015, A&A, 576, A77

Snellen, I. A. G., de Kok, R. J., de Mooij, E. J. W., & Albrecht, S. 2010, Nature, 465, 1049

Stangret, M., Casasayas-Barris, N., Pallé, E., et al. 2022, A&A, 662, A101

Tabernero, H. M., Zapatero Osorio, M. R., Allart, R., et al. 2021, A&A, 646, A158

Tan, X., & Komacek, T. D. 2019, ApJ, 886, 26

Triaud, A. H. M. J. 2018, in Handbook of Exoplanets, eds. H. J. Deeg, & J. A. Belmonte (Berlin: Springer), 2

West, R. G., Hellier, C., Almenara, J. M., et al. 2016, A&A, 585, A126

Wyttenbach, A., Ehrenreich, D., Lovis, C., Udry, S., & Pepe, F. 2015, A&A, 577, A62

Wyttenbach, A., Mollière, P., Ehrenreich, D., et al. 2020, A&A, 638, A87

Zhang, M., Knutson, H. A., Kataria, T., et al. 2018, AJ, 155, 83
**Appendix A: Velocity-height narrow-band absorptions**

<figure><img src="image_16.png" /></figure>

**Fig. A.1.** Co-added Na I doublet line as a function of the velocity shift from the lines' centre wavelength. The absorption depth was converted to an equivalent radius. *Top panel:* The data is shown by the grey points and the x20 binned data by the blue points. The data was fitted with a Gaussian, shown by the solid red line, while the golden line shows the ESPRESSO line spread function (FWHM = 2 km s⁻¹) and the green dotted line represents the escape velocity. *Bottom panel:* The residuals are presented with the same representation as the top panel.

<figure><img src="image_17.png" /></figure>

**Fig. A.2.** Same as Fig. A.1 for the Hα line.

<figure><img src="image_18.png" /></figure>

**Fig. A.3.** Same as Fig. A.1 for the Hβ line.

<figure><img src="image_19.png" /></figure>

**Fig. A.4.** Same as Fig. A.1 for the Mg I b1 line.
**Appendix B: Bootstrap analysis for the narrow band**

<figure><img src="image_20.png" /></figure>

**Fig. B.1.** Distributions of the empirical Monte Carlo analysis for the 12 Å passband on the Na I doublet (top panels) and 10 Å on Hα (bottom panels), for each of the ESPRESSO transits. The results from the first and second night are displayed in the left and right panels, respectively. The distributions representing the in-in (red bins) and out-out (blue bins) scenarios are centred at zero, corresponding to non-detections, as expected. The in-out distributions (black bins) for Na I and Hα deviate from zero in both transits, indicating a detection of planetary origin. The Gaussian fits to the histograms are shown as dashed lines of the respective colour.
<figure><img src="image_21.png" /></figure>

**Fig. B.2.** Same as Fig. B.1 for the 6 Å passband on the Hβ line (top panels) and on the MgI b1 line (bottom panels). For Hβ, both nights deviate slightly, which hints at a detection, although not as clearly as NaI and Hα. In the case of MgI, the in-out sits close to zero, indicating a lack of planetary signal.
**Appendix C: Bootstrap analysis for the cross-correlation**

<figure><img src="image_22.png" /></figure>

**Fig. C.1.** Distribution of bootstrapping analysis for 20,000 random selections for Mg I, Fe I, Fe II (top to bottom panels) for each night individually based on the cross-correlation results. Similar to Figs. B.1-B.2, the 'in-in' distributions (in red) and 'out-out' distributions (in blue) are supposed to be centred around 0, indicating the absence of the considered species. The 'in-out' distributions (shown in black) indicate the planetary origin of the feature.
**Appendix D: Rossiter-McLaughlin correction for cross-correlation**

<figure><img src="image_23.png" /></figure>

**Fig. D.1.** Rossiter-McLaughlin (RM) correction for Fe I during 2021 May 03. *Top panel:* Two-dimensional cross-correlation function in the rest frame of the system. Transit contact times are indicated in black horizontal dashed lines. The expected trace of the planetary atmosphere is indicated in white. *Middle panel:* Best-fit RM model. *Bottom panel:* Residual after dividing the RM model. The planetary trace is now clearly visible.

<figure><img src="image_24.png" /></figure>

**Fig. D.2.** Same as Fig. D.1 but for Fe II.

<figure><img src="image_25.png" /></figure>

**Fig. D.3.** Same as Fig. D.1 but for Mg I.