Using helium 10830 {\AA} transits to constrain planetary magnetic fields

Planetary magnetic fields can affect the predicted mass loss rate for close-in planets that experience large amounts of UV irradiation. In this work, we present a method to detect the magnetic fields of close-in exoplanets undergoing atmospheric escape using transit spectroscopy at the 10830 Angstrom line of helium. Motivated by previous work on hydrodynamic and magneto-hydrodynamic photoevaporation, we suggest that planets with magnetic fields that are too weak to control the outflow's topology lead to blue-shifted transits due to day-to-night-side flows. In contrast, strong magnetic fields prevent this day-to-night flow, as the gas is forced to follow the magnetic field's roughly dipolar topology. We post-process existing 2D photoevaporation simulations to test this concept, computing synthetic transit profiles in helium. As expected, we find that hydrodynamically dominated outflows lead to blue-shifted transits on the order of the sound speed of the gas. Strong surface magnetic fields lead to unshifted or slightly red-shifted transit profiles. High-resolution observations can distinguish between these profiles; however, eccentricity uncertainties generally mean that we cannot conclusively say velocity shifts are due to the outflow for individual planets. The majority of helium observations are blue-shifted, which could be a tentative indication that close-in planets generally have surface dipole magnetic field strengths $\lesssim 0.1$ gauss. More 3D hydrodynamic and magneto-hydrodynamic are needed to confirm this conclusion robustly.


INTRODUCTION
Planets that reside close to their host stars receive significant amounts of high-energy flux.Photoionization of their upper atmospheres results in heating that can drive mass loss in the form of a hydrodynamic wind (Lammer et al. 2003;Muñoz 2007;Murray-Clay et al. 2009;Owen & Jackson 2012;Kubyshkina et al. 2018).For small, lowmass planets (1 − 4 R ⊕ , ≲ 20 M ⊕ ), photoevaporation can completely strip their primordial hydrogen/helium envelopes, leaving behind a "stripped core" with a bulk composition similar to Earth's (Owen & Wu 2013;Lopez & Fortney 2013).This photoevaporation-driven evolution has been used to explain the lack of short period Neptune sized planets (e.g.Szabó & Kiss 2011;Lundkvist et al. 2016;Owen & Lai 2018), and the bimodal radius distribution of small planets (Fulton et al. 2017;Owen & Wu 2017;Van Eylen et al. 2018;Rogers et al. 2023b).However, other interpretations have been proposed to explain the demographics of close-in, low-mass exoplanets.For example, other mass loss mechanisms such as core-powered mass-loss (e.g, Ginzburg et al. 2018;Gupta & Schlichting 2019) or impactpowered mass-loss (e.g.Wyatt et al. 2020); late time gas accretion in the formation phase (e.g, Lee & Connors 2021;Lee et al. 2022), or separate populations of terrestrial planets and water worlds (e.g, Zeng et al. 2019;Luque & Pallé 2022).
Given this debate, we need to test photoevaporation models using direct observations of atmospheric escape.An unquantified uncer-★ E-mail:ethan.schreyer16@imperial.ac.uk tainty when testing these models is the role that magnetic fields play in controlling the outflow and the mass-loss (e.g.Owen & Adams 2019).The photoevaporation models used to match the observed location of the radius valley have not included magnetic fields (e.g, Owen & Wu 2017;Wu 2019;Rogers & Owen 2021;Rogers et al. 2023a,b).Photoevaporative outflows are highly ionized, so they should be influenced by any planetary magnetic fields.The degree to which the planetary magnetic field controls the outflow is determined by the ratio of magnetic pressure to thermal/ram pressure of the outflow (e.g.Adams 2011).If the magnetic pressure dominates near the planetary surface, then the gas is constrained to the topology imposed by the planet's magnetic field.For this "magnetically controlled" case, analytic and numerical studies have demonstrated that in a region near the equator, the magnetic field lines are closed, and the gas is trapped in a "dead-zone" (e.g, Trammell et al. 2011;Adams 2011;Trammell et al. 2014;Owen & Adams 2014;Khodachenko et al. 2015;Matsakos et al. 2015;Arakcheev et al. 2017).Hence, the gas can only escape near the poles, where the gas pressure can open magnetic field lines and drive a transonic wind.Alternatively, if the thermal/ram pressure dominates everywhere, the gas will open all field lines (dragging the magnetic field with it).In this "hydrodynamic case", the outflow should represent those seen in purely hydrodynamic simulations (e.g, Stone & Proga 2009;Owen & Adams 2014;Khodachenko et al. 2015;Tripathi et al. 2015;Carroll-Nellenback et al. 2016;McCann et al. 2019;Debrecht et al. 2020;Carolan et al. 2021a).
In the magnetically controlled case, only a fraction of the planetary surface supports open field lines, and the mass loss rate is suppressed compared to the hydrodynamic case.2D MHD simulations have suggested that surface magnetic field strengths as low as ∼ 0.3 − 3 Gauss can suppress the mass loss rate of hot Jupiters by an order of magnitude (Trammell et al. 2014;Owen & Adams 2014;Khodachenko et al. 2015).The critical magnetic field strengths required to suppress mass loss rates are smaller or comparable to many of the planetary magnetic field strengths in our Solar System (e.g.Jupiter's dipole moment is ∼4 Gauss, Stevenson 2003;Connerney et al. 2022).Therefore it is important to consider the effects of magnetic fields on escape for exoplanets and understand how to determine their impact observationally.3D MHD simulations that include the stellar wind also found the planetary mass loss rate decreases with planetary magnetic field strength (Khodachenko et al. 2021).However, we note similar simulations run by Carolan et al. (2021b) show the opposite dependence, and the differences are yet to be fully understood.
For lower-mass planets, strong planetary magnetic fields that suppress mass loss could significantly affect their evolution.Owen & Adams (2019) studied the effect that magnetic fields would have on the location of the radius valley.If these planets had surface magnetic field strengths ≳ 3 Gauss at the age of a few hundred Myrs1 , then their cores would need to be ice-rich in order to match the observed radius valley.However, since the planets below the radius gap (that have well-constrained masses) generally have densities consistent with an Earth-like composition (Dressing et al. 2015;Dorn et al. 2018;Van Eylen et al. 2019), they argue that this implies that the lowmass, close-in exoplanet population do not possess strong magnetic fields.Specifically, Owen & Adams (2019) argued that the dynamogenerated fields in the hydrogen/helium envelopes of mini-Neptunes must be weak (B ≲ 0.3 Gauss) at young ages.
Unlike small planets, Hot Jupiters are thought to be stable to atmospheric mass loss independent of whether or not magnetic fields suppress escape (e.g., Hubbard et al. 2007;Owen & Wu 2013;Jin et al. 2014).However, the strength of their magnetic fields is still of much interest.Hot Jupiters have radii larger than expected from interior structure models (Laughlin et al. 2011;Thorngren & Fortney 2018).In order to explain this discrepancy, these planets require an extra source of energy that must be deposited into the interior (e.g, Bodenheimer et al. 2001;Guillot & Showman 2002;Arras & Socrates 2010;Youdin & Mitchell 2010;Batygin & Stevenson 2010;Komacek & Youdin 2017).One popular explanation for this extra energy is Ohmic dissipation, in which the interaction of zonal winds and the planetary magnetic field generate electrical currents that resistively heat the interior (Batygin & Stevenson 2010;Perna et al. 2010;Batygin et al. 2011;Menou 2012;Rauscher & Menou 2013;Ginzburg & Sari 2016).Current modelling suggests that explaining the hot Jupiter radius anomaly in this way requires hot Jupiters to possess sizeable magnetic fields.For example, using 3D MHD simulations of the atmosphere of HD209458b, Rauscher & Menou (2013) argue that the magnetic field must be greater than 3 − 10 Gauss for Ohmic dissipation to be responsible for its inflated radius.For a few hot Jupiters hosting stars, Cauley et al. (2019) found tentative evidence of magnetic star-planet interactions.From variations in the Ca II K line, they inferred these planets to have large magnetic fields ∼ 20-100 Gauss.However, we note that Cauley et al. (2019) caution the detected variability may be unrelated to the presence of a planet, and hence do not constrain planetary magnetic fields.Independently, using a scaling law relating the magnetic energy density to the density and intrinsic luminosity of bodies ranging from Earth to low mass stars, Christensen et al. (2009) estimated the magnetic field of hot Jupiters to have magnetic field strengths of order 20-50 Gauss.In contrast, Grießmeier et al. (2004) argued that tidally locked hot Jupiters should have a much smaller magnetic field than Jupiter due to their slow rotation rate.
To determine whether the effects of magnetic fields need to be accounted for in evolutionary modelling, we need to compare theoretical predictions of "magnetically controlled" and "hydrodynamic" outflows to direct observations of atmospheric escape.Additionally, these observations can be used to put constraints on the magnetic field strength of planets.The two most commonly used lines to directly observe atmospheric escape are Lyman- (e.g., Vidal-Madjar et al. 2003;Lecavelier Des Etangs et al. 2010;Kulow et al. 2014) and He I 10830 Å (e.g., Spake et al. 2018;Allart et al. 2018;Nortmann et al. 2018), which originates from the metastable 2 3  state of helium.Kislyakova et al. (2014); Ben-Jaffel et al. ( 2022) inferred the magnetic field properties of HD209458b and HAT-P-11b respectively, by matching the transit spectrum deduced from 3D outflow models to Lyman- transits.In general, this approach is challenging because absorption in the interstellar medium generally obscures the line core (e.g.Landsman & Simon 1993), and therefore Lyman- transits probe material at high radial velocities and distances far from the planet ≳ 10  where the outflow is affected by the circumstellar environment (e.g Owen et al. 2023).This causes observations to be degenerate with properties of the circumstellar environment, making it difficult to link observations to fundamental planetary quantities, such as the planetary magnetic field strength.
The helium line may provide a better tool in this endeavour.It probes material closer to the planet (e.g, MacLeod & Oklopčić 2022) and observations can be done at high spectral resolution (R≳ 30,000) since it is accessible from the ground.This provides a unique opportunity to study the kinematics of the outflow near the planet.Oklopčić et al. (2020) proposed using spectropolarimetry of this line to detect magnetic fields; however, this method is not currently feasible with 10m class telescopes but may be possible in the future with 30m class telescopes.
Here, we propose a method for detecting the presence of magnetic fields strong enough to control the topology of the outflow using transmission spectroscopy in the 10830 Å line of helium.Motivated by previous HD and MHD simulations, we suggest that "hydrodynamic" outflows (i.e.outflows where the planetary magnetic fields are dynamically unimportant) should lead to blue-shifted transmission spectra due to gas flowing from the hot day side to the cold night side (towards the observer during transit) as a result of pressure gradients from the anisotropic heating.In contrast, strong magnetic fields prevent the day-to-night outflow and cause the gas to move away from the observer during transit.As a result, we suggest that "magnetically controlled" outflows will produce transmission spectra that are (weakly) red-shifted.

THE EFFECT OF MAGNETIC FIELDS ON PHOTOEVAPORATION
In general, the planetary outflow is sensitive to both planet properties and the stellar environment.Following Owen & Adams (2014), one can coarsely partition the outflow into regimes based on the relative strength of the stellar magnetic field, stellar wind ram pressure, planetary magnetic field and planetary wind ram pressure.In this work, we consider regimes where either the ram pressure of the planetary wind or the planetary magnetic field pressure dominates the stellar components close to the planetary surface, where most of the helium absorption occurs.We can estimate whether the outflow is magnetically controlled by considering the dimensionless quantity Λ, which is the ratio of the ram pressure of the wind to the magnetic pressure of the planet.For a planet with a dipolar magnetic field, this ratio is equal to where  is the outflow rate,  0 is the surface magnetic field strength of the body,   is the radius of the body and  is the distance to the centre of the body.When Λ p ≪ 1, the flow is magnetically controlled, and the outflowing gas is forced to follow magnetic field lines.When Λ p ≫ 1, the outflow will drag magnetic field lines and should follow a flow structure similar to a pure hydrodynamic outflow.Using an "energy-limited" outflow (e.g.Baraffe et al. 2004) where we estimate the threshold magnetic field such that magnetic pressure and ram pressure are equal (i.e Λ  = 1).For fiducial parameters appropriate for a typical hot Jupiters, this is:

Post-processing existing simulations
To assess whether "hydrodynamic" and "magnetically controlled" outflows will produce blue-and red-shifted transit spectra, respectively, we want to compare the synthetic transit spectra produced from simulations.There are no 3D radiation-hydrodynamics photoevaporation simulations that include helium and magnetic fields.Given the complexity of post-processing simulations (as detailed in Section 2.2), which would be difficult in 3D, as a first step, we choose to use existing 2D photoevaporation simulations of a hot Jupiter presented in Owen & Adams (2014).These radiation-hydrodynamic simulations did and did not include magnetic fields for the same setup and are ideal for our experiment.To analyze the case where the ram pressure of the planetary outflow dominates over the magnetic field of the planet (Λ p > 1), we use a purely hydrodynamic simulation of the outflow.In the opposite case, where magnetic pressure dominates over ram pressure of the planetary outflow (Λ p < 1), we use MHD simulations of the outflow.
In these simulations, the planet has a dipolar magnetic field.The planetary dipole was chosen to be parallel to the orbital angular momentum vector of the planet.There are currently no constraints on the geometry of the magnetic field of exoplanets.However, since these planets are very close to their host stars, they are often assumed to be tidally locked.Thus, as a starting point, it is sensible to guess that any dynamo-generated magnetic field may be similar to Jupiter's or Saturn's and (almost) points along the rotation axis.
In some of the simulations, an additional component corresponding to the stellar magnetic field was added.This contribution is modelled as a constant field that points along the pole of the planet: where  * controls the relative strength of the stellar and planetary magnetic fields.
The original simulations were performed on a spherical polar grid (, ), which we can convert to Cartesian coordinates (, ), where the  axis points along the line joining the star and the planet and the  axis is parallel to the planet's orbital angular momentum axis.It is important to state that atmospheric escape is generally a 3D process, and therefore, several assumptions need to be made in order to be able to perform sensible 2D simulations.Firstly, the planet needs to be tidally locked to have a constant day and night side.At the same time, rotational effects are ignored.Inside the Hill sphere, these effects are small (Murray-Clay et al. 2009) and can be ignored; however, they are important for shaping the flow on the largest scales (e.g, McCann et al. 2019).Since absorption by helium generally comes from close to the planet, this approximation is reasonable.
In the hydrodynamic case, these approximations mean that the outflow is rotationally symmetric around the line joining the planet to the sub-stellar point.The presence of this magnetic field stops this setup from being rotationally invariant, such that the flow is no longer globally axisymmetric.Therefore, the simulations required each cell to locally have the property that   = 0. Since the magnetic field suppresses the azimuthal flow, this approximation is realistic.Thus, the simulation can be considered a thin slice of the domain in the x-z plane.Since the magnetic field predominately governs the outflow geometry, we expect the flow structure on the day side to be similar as we rotate around the dipole axis.On the night side, the outflow is suppressed since heat is not efficiently transported across magnetic field lines.As a result, only the day side of the atmosphere was simulated (see sec 5.1 of Owen & Adams 2014or Trammell et al. 2014)

Addition of Helium
The lifetime of the metastable triplet level in the outflow is determined by the rates of collisional, radiative and photoionisation processes that depopulate it.As radiative transitions into the ground state are highly suppressed (Drake 1971), depopulation of this state is dominated by transitions due to collisions and photoionization (e.g., Oklopčić & Hirata 2018;Oklopčić 2019).In the outflow, the lifetime of the metastable state may be comparable to the flow timescale (see Figure 4 of Oklopčić 2019).Thus, the helium metastable level is often not in local statistical equilibrium.This means traditional postprocessing techniques of simply using the gas' local properties to compute absorption cross-sections are inappropriate.Therefore, we must compute the level populations by solving the time-dependent radiative transfer equations for gas parcels moving in the outflow.
We assume that the gas is composed of solar abundances of hydrogen and helium; however, we note that the mass fraction of helium in the outflow can be adjusted depending on how efficiently helium is expected to be dragged in the predominantly hydrogen flow (e.g.Malsky & Rogers 2020).Helium is not expected to contribute to the cooling of the gas, and therefore the predominant way that it affects the outflow is by raising its mean molecular weight.For a solar abundance of helium, the sound speed of the gas can be modified ∼ 25%.Ultimately, though, adding helium should not have a large effect on the geometry of the outflow.Therefore, it is reasonable to consider the pure flow structure of the pure hydrogen outflow simulated by Owen & Adams (2014) as representative of a hydrogen-helium out-flow.Similarly, the distribution of helium ions and atoms in each electronic state has little impact on the outflow structure.

Helium Distribution in the Outflow
The first task is to calculate the distribution of helium atoms in the outflow.We track the fraction of helium in the neutral singlet and triplet states along streamlines in the outflow.We only track the number of neutral helium atoms in the ground state 1 1  and metastable 2 3  state since excited states quickly radiatively decay to one of these two states with a matching singlet/triplet configuration.Our problem has two parts: (i) determining streamlines in the flow and (ii) calculating the fraction of helium in the triplet state along these streamlines.
In the case of the pure hydrodynamic flow, we solve for the 2D position of a streamline as a function of length, , down the streamline using equations: We then derive the steady state distribution of helium atoms along streamlines using Equations 7 and 8, which account for the major transitions in and out of the singlet and triplet states of helium (Oklopčić & Hirata 2018).
1 and  3 are neutral helium's singlet and triplet fractions, respectively.  and    are the number density of electrons and hydrogen atoms. 1 and  3 are the photoionization rate for the singlet and triplet states, respectively.We calculate the photoionisation rate for the singlet and triplet states by assuming that all the photoionizing flux is concentrated at a photon energy ℎ of 24.6 eV and 4.8 eV respectively.
Based on the spectral energy distribution for late K stars from the MUSCLES survey (France et al. 2016;Loyd et al. 2016;Youngblood et al. 2016), we estimate the total singlet ionising flux to be 0.2 of the hydrogen ionizing flux and the total triplet ionising flux to be about the same hydrogen ionizing flux.As the simulations were run at high UV fluxes ∼ 10 6 erg cm −2 s −1 , we set   = 2 × 10 5 and 10 6 erg cm −2 s −1 for the singlet and triplet states respectively.We varied these fluxes by an order of magnitude in both directions and found that it did not qualitatively affect our results.  is the photoionization cross-section of the state.The photoionisation cross section for these photons are 5.48 × 10 −18 cm 2 (Hummer & Storey 1998) and 7.82×10 −18 cm 2 (Brown 1971) respectively.In this work, we set both  1 = 0 and  3 = 0. Since hydrogen also absorbs 24.4 eV radiation, we expect the  = 1 surface to 24.4eV photons to be above the  = 1 surface to 4.8eV photons (and close to the hydrogen ionization front in the simulation).Since the main pathway to populate the triplet state is by photoionization of the singlet state and then recombination into the triplet state, we expect that this will underestimate the triplet fraction below the  = 1 surface to 24.4eV.However, since the hydrogen ionization front is deep in the atmosphere of the planet (in these simulations, it is ∼ 1.03 R  ), the gas below this surface contributes minimally to the overall transit signal.
The recombination and collisional excitation/de-excitation coefficients depend on the temperature of the gas.As the simulations were run for high UV fluxes (≳ 10 6 erg cm −2 s −1 ), the gas is in the radiative-recombination regime (Murray-Clay et al. 2009) and therefore thermostats to ∼ 10 4 K above the ionization front.As a result, we use all coefficients at 10 4 K.  1 = 2.16 × 10 −13 cm 3 s −1 &  3 = 2.25×10 −13 cm 3 s −1 are the case A recombination coefficients for the singlet and triplet state respectively (Osterbrock & Ferland 2006).The electron density (  ) is calculated in the Owen & Adams (2014) simulations, which only accounted for electrons produced by the ionisation of hydrogen atoms since this is the dominant source. 31 = 1.272 × 10 −4 s −1 is the radiative transition rate between the metastable triplet state and the ground singlet state (Drake 1971).The transitions between the triplet and singlet states due to collisions with electrons are denoted by the temperature dependant coefficients: where    is the energy difference between the states from Martin (1973),   is the statistical weight of the state and Υ   is the effective collision strength from Bray et al. (2000).At 10 4 K, the two transitions from the metastable state to singlet levels are given by  31 = 2.7 × 10 −8 cm 3 s −1 and  31 = 5.2 × 10 −9 cm 3 s −1 .The transition from the ground singlet state to the metastable state is given by  13 = 5.7 × 10 −19 cm 3 s −1 .Finally, transitions out of the metastable state due to collisions with hydrogen atoms via associative ionisation and Penning ionisation have a combined rate of  31 ∼ 5 × 10 −10 cm 3 s −1 (Roberge & Dalgarno 1982).
Equations 5-8 form a set of coupled first-order differential equations.The streamlines are initialised at a constant radius 1.02 R  with an initial singlet and triplet fraction that is in equilibrium at 500 K with  1 =  3 = 0. We solve these differential equations numerically using the implementation of the LSODA method (Petzold 1983) provided in the scipy library (Virtanen et al. 2020).For numerical stability, we solve 7 and 8 as function of log().The absolute and relative tolerances used are 1 × 10 −13 and 1 × 10 −10 , respectively and the maximum step size chosen is 1 × 10 −3 .All gas properties required to solve these equations (e.g density, velocity etc.) were interpolated from the original simulations using bivariate spline interpolation over the polar grid.To calculate the metastable helium fraction at any point in the outflow, we interpolate the values for fifty streamlines, linearly spaced in angle, originating on the planet's day side.Testing indicates this is sufficient to calculate the transmission spectrum accurately.Figure 1 shows how streamlines originating on the planet's day side wrap around to the night side.
In the MHD case, we have to consider both the field centred on the poles where the magnetic field lines are opened by the outflow and a region centred on the equator where magnetic pressure dominates over thermal pressure so that the field lines are closed.Since the fluid Figure 1.Left: Streamlines of the outflow for the case of a planet without a magnetic field.The star is located to the right of the planet along the line z = 0.The planet is shown by a black circle centred on the origin.The orientation is the same for all subsequent 2D plots.Due to anisotropic heating, the day side is much hotter than the night side.The resulting pressure gradients cause the outflow to wrap around the planet, creating gas travelling towards an observer in transit in the transmission region.Right: Magnetic field lines for a planet with a surface magnetic field strength of 3 Gauss.Orange lines are closed field lines where the magnetic field is strong enough to confine the flow.The red lines are open magnetic field lines, which also are gas streamlines.The direction of the arrows shows the direction of the outflow.In this case, the magnetic field prevents the day-to-night side outflow and causes the gas to move away from the observer in transit in the transmission region.
is required to follow magnetic field lines (and magnetic field lines are dragged along by the fluid), we can determine the streamlines of our gas in the open region by tracing magnetic field lines.This is helpful because we can simultaneously determine the region in which the field lines are closed.These are calculated analogously to 5 and 6 replacing velocity with magnetic field: where   and   are the radial and angular components of the magnetic field, respectively.Figure 1 shows the magnetic field lines for a fiducial planetary magnetic field strength of 3 Gauss.We use this value of the planetary magnetic field to illustrate the magnetically controlled case throughout the rest of the paper.
In the regions where the streamlines are open, we solve the steady state distribution of helium atoms using Equations 7 and 8 as in the hydrodynamic case.In the regions in which they are closed, the gas is approximately in magneto-hydrostatic equilibrium, and as a result, the helium-level populations are in statistical equilibrium.Therefore we solve for the distribution of helium atoms using Equations 7 and 8 by setting the advection term (the left-hand side) to zero.The method used to solve these equations numerically is the same as the hydrodynamic one, with the addition of a step to check whether the field line is open or closed to decide to solve the non-equilibrium or equilibrium equation for the distribution of helium atoms.
In Figure 2, we show the number density profiles of helium in the triplet state for the hydrodynamic and magnetically controlled outflow.

Computing Synthetic Transit Profiles
Our goal is to calculate the absorption of stellar radiation at 10830 Å due to the presence of the escaping helium.To elucidate the basic principles, we produce synthetic transmission spectra at mid-transit for the planet transiting with an impact parameter of zero.Since the simulations used to generate the densities and velocities of the outflow are 2D, it's only at mid-transit and with an impact parameter of zero that our approximate symmetry is applicable.
With the assumptions described in 2.1, the outflow in the purely hydrodynamic case is rotationally invariant around the line connecting the star and planet (x-axis).This symmetry means that we can identify the z coordinate of our grid with the radial coordinate on the stellar disc.Therefore, the optical depth of the outflow for a ray emanating at any point on the stellar disc is only a function of z and is given by Equation 14.This can be integrated over the stellar disc to give the excess absorption caused by the escaping gas.
where  3 is the number density helium atoms in the metastable state,   ,   are the radius of the planet and star, respectively and   is the absorption cross-section of the helium to photons at a frequency , which is a function of the line of sight velocity of the gas,   , and the temperature.The absorption cross-section is given by where  and   is the charge and mass of the electron,  is the speed of light,  is the oscillator strength of the transition and Φ is the Voigt line profile.The Gaussian part of the Voigt profile has a standard deviation of ; the Lorentzian part has a half-width at half-maximum of , and the line centre has been Doppler shifted to .
Here  0 is the rest frequency of the helium line, and  = 1.022 × 10 7 s −1 is the Einstein  coefficient taken from the NIST atomic database (Kramida et al. 2022).It is worth noting that the 2 3  → 2 3  transition in Helium actually consists of three distinct lines at 10830.34 Å, 10830.25 Å and 10829.09Å due to fine structure splitting.The first two of these transitions are blended; however, the third can be distinguished at the spectral resolution of current instruments.The oscillator strength for these transitions, taken from the NIST atomic database (Kramida et al. 2022), are given by 0.300, 0.180, and 0.060, respectively.The absorption cross-section at any wavelength is calculated by summing up the contribution from these three transitions.
Similar to Oklopčić & Hirata (2018), when computing the optical depth, we only took into account gas within the Hill sphere of the planet, which we choose to have a radius of 4  .This approximately corresponds to the Hill sphere radius of a Jupiter-mass planet around a solar-mass star at 0.04 AU.Beyond the Hill sphere, the outflow is significantly affected by the Coriolis force, the stellar tidal field and the stellar wind.Here, the model is no longer applicable.However, unless the stellar wind is very strong, these regions do not contribute greatly at mid-transit (e.g., MacLeod & Oklopčić 2022).If the planet is further away from the star or the magnetic field is strong, the planetary outflow may not be affected by the circumstellar environment at larger distances from the planet.In Appendix A, we provide transit spectra taking into account gas up to 8  to illustrate this effect.
To do this calculation, we construct a linearly spaced 300 × 600 cell grid in the (, ) plane, with x ranging from [−4  , 4  ] and z ranging from [  , 4  ].The integrals in 14 and 15 are computed with this grid using a middle Riemann sum.
The method we use in the magnetic case is different.As discussed above, the rotational symmetry around the line connecting the star and planet (x-axis) present in the purely hydrodynamic case is broken by the dipolar structure of the magnetic field.Therefore, we cannot simply compute the 3D density structure by rotating the 2D density distribution around the x-axis.The presence of a planetary magnetic field shuts off the outflow on the night side planet since heat cannot be transported effectively across magnetic field lines.Therefore, we set the density of helium on the night side of the planet to zero.On the day side, we build the 3D density distribution by rotating the 2D density of helium distribution around the z-axis (symmetry axis of the dipole).In order to account for the reduction of EUV flux incident on the atmosphere away from the substellar line due to geometrical effects, we scale the number density of helium in the triplet state in each 2D slice by the square root of the reduction of incident EUV flux at the base the slice.We do this because the simulations are done at high EUV fluxes such that the outflow is in ionizationrecombination equilibrium.In this regime, the temperature of the outflow thermostats to 10 4 K and the density at the base of the outflow is proportional to the square root of the incident EUV flux (e.g Murray-Clay et al. 2009;Owen & Alvarez 2016).
To perform synthetic observations, we create a 3D cylindrical grid from the Cartesian product of a 2D grid on the stellar disc and a 1D grid along the line connecting the star and planet.The 1D grid has 150 cells and ranges from [0, 4R  ].The 2D grid on the stellar disc has 400 cells.We calculate the optical depth of the outflow at the centre of each cell on the stellar disc by integrating through the 3D density distribution using a middle Riemann sum.This can then be translated into an excess depth by integrating over the stellar disc using a double Riemann sum: where   is the area of the   ℎ cell.

RESULTS
Figure 4 shows the excess transit depth for the hydrodynamic and magnetically controlled outflows.As expected, we find the hydrodynamic outflow leads to a blue-shifted spectrum.Figure 3 shows that most of the absorption comes from the terminator, where gas is moving towards the observer in transit.The peak absorption is at −8.3 km s −1 , which is of order the sound speed of the outflowing gas.It is worth noting that we still see significant absorption in the red wing due to absorption from gas moving towards the star (away from the observer in transit), which has originated from low latitudes on the planet.As a result, the spectrum is asymmetric and broader than expected from thermal broadening.
In contrast, a planet with a 3 Gauss magnetic field shows a symmetric transit spectrum, with a peak absorption centred at 0.5 km s −1 .Most of the absorption comes from the dead zone, where the velocity of the gas is stationary, and an area near the poles, where the line of the sight velocity is small (see Figure 3).As a result, the spectrum only shows a small velocity shift.Furthermore, since almost all the absorption comes from gas at low velocities, the width of the spectrum is primarily set by the thermal velocity of the gas.
In Figure 5, we show how the transit spectrum varies with planetary magnetic field strength.Interestingly, the transit depth does not decrease monotonically with magnetic field strength, even though the fraction of open field lines (and the mass loss rate) decreases smoothly as a function of magnetic field strength.As the magnetic field strength is increased, the size of the region where the magnetic field lines are closed increases.This region then blocks more of the stellar disc, contributing more to the transit depth.At the same time, since the mass loss decreases, the column density of gas in the outflowing regions near the poles decreases, contributing less to the transit depth.The weight of these contributions has an opposite dependence on the strength of the magnetic field and results in the transit depth not being a monotonic function of the magnetic field strength.
The overall velocity shift of the transmission spectrum also varies as the magnetic field strength changes.At lower magnetic field strengths, gas pressure is able to open up field lines at lower latitudes.The gas coupled to these field lines has a higher line sight velocity, resulting in a red-shifted spectrum.In the 0.3 Gauss case, shown in Figure 5, this velocity shift is 3.8 km s −1 .
For the 3 Gauss case, we also include a situation where the stellar magnetic field is non-zero, and the ratio of stellar to planetary magnetic field strength is given by  * = 0.001.For a planet at 0.04 AU around a solar radius star, this corresponds to a stellar surface magnetic field of 1 Gauss.In general, the stellar magnetic field is able to open out more field lines.As mentioned above, this can either increase or decrease the transit depth depending on how the contributions from the closed region and outflowing regions change.However, The number density of helium in the 2 3  state in the outflow for the hydrodynamic case (left) and the magnetically controlled case (right).In the hydrodynamic case, the density appears to be fairly spherically symmetric.In the magnetically controlled case, the region with closed magnetic field lines has a higher number density of metastable helium atoms than the outflowing regions.This is primarily because the total number density of gas in this region is higher, as it is in hydrostatic equilibrium.in this case, we actually see no change in the transit spectrum.This is because the opening of field lines is completely dominated by the outflow rather than the stellar field.This effect is explained in Figure 4 of Owen & Adams (2014).

DISCUSSION AND CONCLUSIONS
We have post-processed 2D HD and MHD simulations of a hot Jupiter undergoing photoevaporation and calculated in-transit absorption signal due to the 10830 Å line of helium.If the planet has no magnetic field, the transit signal is blue-shifted Δ = −8.3km s −1 due to the absorption from gas that flows from the hot day side to a cold night side.When a planetary magnetic field (between 0.3-10 Gauss) is included, the transit signal has either no apparent velocity shift or a very slight red-shift, as escaping gas from the day side is tied to magnetic field lines and moves away from the observer in transit.
At the current resolution of ground-based instruments, this difference in line-centre velocity is observable and may be used to test whether outflows are magnetically controlled or not and consequently put constraints on the magnetic field strengths of planets.As the observed velocity difference is due to large-scale changes in the geometry of the flow, this method should be fairly robust to the specifics of the photoevaporative flow (e.g.mass loss rate, temperature).However, further work is required to ensure that our results are still true in full 3D simulations over a more extensive region of parameter space and for various magnetic field configurations.We will discuss this in section 5.1.1.Excess Depth Figure 5. Calculated excess absorption as a function of wavelength for different planetary magnetic field strengths.For a planetary magnetic field of 3 Gauss, we also include a case in which the stellar magnetic field is non-zero.The velocity scale is the same as in Figure 4.
For magnetically controlled flows, observationally distinguishing between different planetary magnetic field strengths is a more difficult task.The clearest difference is that lower field strengths with more open field lines lead to a more red-shifted transit.More open field lines can also increase high-velocity gas absorption far from the planet, leading to asymmetric transits with an extended red wing.This is only visibly apparent in the 0.3 Gauss case when we consider gas within 8  instead of 4  (see Figure A1 in Appendix A).Observations of the escaping atmosphere of WASP-52b show that the transit spectrum is unshifted with respect to the planet's rest frame and has a slight asymmetry in the red wing.We speculate that this might indicate that the outflow is magnetically controlled.Overall, we caution that since the differences in these spectra are relatively minor, model and observational uncertainties most likely make different magnetic field cases indistinguishable at the resolution of current instruments.

Use of Owen & Adams (2014) simulations and 3D effects
In reality, atmospheric escape is a 3D dimensional process, and 3D radiation magneto-hydrodynamics simulations that include rotational effects are necessary to confirm the validity of this work.The Owen & Adams (2014) simulations are simplistic when compared to current state-of-the-art simulations; however, as discussed above, they are the only simulation set that included radiative transfer, models with and without magnetic fields and a reasonable parameter study within the same framework.This allowed us to make meaningful comparisons between simulations that did and did not include magnetic fields.However, it is important to discuss some of the limitations of these simulations so that our results are non-conflated with specific quantitative results arising from our post-processing of this simulation set.The Owen & Adams (2014) simulations were the first multidimensional simulations of photoevaporation that included on-thefly radiative transfer.As such, they used a simplified algorithm which assumed an ionization-recombination balance for the hydrogen and took the ionized gas to be at 10 4 K, where the temperature was computed based on the local ionization fraction (e.g.Gritschneder et al. 2009).This ionization-recombination balance is well known to be applicable to planets around young stars (e.g Murray-Clay et al. 2009;Owen & Alvarez 2016), yet most observations of helium outflows are for old planets where this approximation does not hold.The approximations of the Owen & Adams (2014) simulations are likely driving two quantitative results of our simulations: firstly, the high fluxes produce a high rate of recombinations, and thus, our helium transit depths are likely overestimated compared to older systems; secondly, the outflow velocity (and hence the magnitude of the velocity shift) depends directly of the gas' temperature, with higher temperatures giving higher outflow velocities.Outflows around lower-mass, older planets are more likely to be in the "energy-limited" regime (Owen & Alvarez 2016), where the outflow temperatures are necessarily lower, and hence we suspect our simulated ∼ 8 km s −1 blue-shifts are likely overestimates.However, as discussed above, based on the results of more recent 3D simulations, we are confident our qualitative conclusions about blue-shifts arising in the hydrodynamic cases are robust.Hence, the detection or lack of blue shift can be used to make inferences about the strength of any planetary magnetic field.
We also re-emphasize that we focus on a particular area of parameter space where the ram pressure of the planetary wind or the magnetic pressure of the planet dominates over the stellar magnetic pressure or stellar wind ram pressure close to the planet.Whether the stellar wind or stellar magnetic field has a larger influence on the orbit of the planet depends on the mass loss rate of the star, the magnetic field of the star, stellar wind velocity and the semi-major axis of the planet.For hot Jupiters, both the case where the stellar magnetic field or the case where stellar wind dominates is possible for sensible stellar and planetary parameters.As the magnetic pressure for a dipolar field drops ∼  −6 compared to the stellar wind ram pressure  −2 , the stellar wind is more likely to dominate for sub-Neptunes which are generally further from their star than hot Jupiters.
The primary effect of increasing the strength of the stellar magnetic field is to open more planetary field lines.At low stellar magnetic field strengths, this can increase the mass loss rate.At high stellar magnetic field strengths, the flow cannot smoothly transition through the sonic point along these open field lines, and the mass loss rate can actually decrease (Owen & Adams 2014).These changes can vary the transit depth.However, we don't expect it to significantly change the velocity of the absorbing gas and, therefore, the velocity shift of the transit.
On the other hand, the stellar wind may have a significant effect on the velocity shift of the transmission spectrum.If the planet is outside the Alfvén radius of the star, the ram pressure of the stellar wind dominates over the magnetic pressure of the stellar wind and the magnetic field lines in the stellar wind follow the stellar wind plasma.
The effect of the stellar wind on the geometry of the planetary outflow has been studied in both hydrodynamic and MHD simulations.As the strength of the stellar wind is increased compared to the planetary outflow or planetary magnetic field, the stellar wind is able to confine the planetary outflow closer to the surface of the planet.On scales larger than the Hill sphere of the planet, the stellar wind will shape the outflow into a cometary tail that is being radially accelerated away from the star (e.g., Matsakos et al. 2015;Khodachenko et al. 2019;McCann et al. 2019).In essentially isothermal 3D hydrodynamic simulations including helium, MacLeod & Oklopčić (2022) showed that this could result in both blue-shifted absorption during the optical transit and significant blue-shifted post-optical absorption.This is also apparent in 3D radiation-hydrodynamic simulations performed by Wang & Dai (2021).
MHD simulations, including the radial magnetic field of the stellar wind, have also shown that the stellar wind causes planetary magnetic field lines to bend towards the night side (e.g., Kislyakova et al. 2014;Carolan et al. 2021b;Khodachenko et al. 2021;Ben-Jaffel et al. 2022).It is possible that this could result in a blue-shifted absorption signature during the transit of the planet, even if the planet had a reasonably strong magnetic field.However, it is likely that this would also cause a significant blue-shifted post-optical absorption like that seen in the hydrodynamic case.More 3D simulations are necessary to understand how degenerate observations are over the full parameter space.

Eccentricity Uncertainty
To definitively assert that the velocity shift is due to the outflow, we must know the planet's eccentricity.Since highly irradiated planets are close to their host stars, they are generally assumed to have undergone orbital circularization.Small deviations away from a circular orbit can cause an apparent velocity shift, Δ los , of: where   is Keplerian velocity, e is the eccentricity and  is the argument of periastron of the planet (e.g Murray & Correia 2010).Van Eylen et al. (2019) determined the eccentricities for a sample of Kepler planets through a combination of astroseismology and transit light-curve analysis.However, uncertainties in the eccentricity for individual planets were rarely < 0.1.For a planet with a typical orbital velocity of ∼ 100 km s −1 , an eccentricity uncertainty of ∼0.1 can lead to a velocity shift of ∼ 10 km s −1 , which is on the order of the velocity shift of due to the outflow geometry.This is also true when TTVs are used to determine eccentricities in multi-planetary systems (Van Eylen & Albrecht 2015).
The detection of a secondary eclipse can be used to measure cos of individual planets precisely (e.g Winn 2010), such that we can rule out this as a source of the observed velocity shift.Due to their high temperatures and large size, this is often possible for hot Jupiters (e.g, Charbonneau et al. 2005;Baskin et al. 2013).Previously, this has not generally been the case for sub-Neptunes.However, with JWST, detecting the secondary eclipse of some sub-Neptunes might be possible.

Implications for Real Systems
Ideally, we would be able to use helium observations to constrain these planets' magnetic fields.As highlighted in the previous section, eccentricity uncertainties generally mean that we cannot make claims about the magnetic field strengths of individual planets based on these observations.However, we speculate about trends in the population.
Table 1 lists spectroscopic detections of helium escape.For each planet, we quote the observed velocity shift of the absorption relative to the planet's rest frame, which is often determined by assuming a circular orbit if the planet is not known to be eccentric.These are not directly comparable to our models, as the observed transit depth is generally computed by integrating over all in-transit phases.We also estimate a critical surface magnetic field strength   at which the flow transitions from "hydrodynamic" to "magnetically controlled" and no longer expect to see a blue-shifted transit spectrum.We approximate this value as the maximum surface magnetic field so that the outflow opens all field lines.Although, we caution that this is likely to be an overestimate.Since the outflow may be able to wrap around to the night side in the terminator region before all field lines are opened, 3D MHD simulations will be required to investigate this quantitatively.
This critical magnetic field strength is found by requiring that the thermal pressure exceeds the magnetic pressure for  >   .We estimate the thermal pressure by i) assuming the outflow is an isothermal Parker wind with a fixed sound speed and mass loss rate or ii) assuming the outflow is in photoionization equilibrium.In both cases, the detailed procedure used to calculate the critical magnetic field is explained in Appedix B. In Table 1, we give three critical magnetic field strength values.The first two are calculated assuming the isothermal Parker wind case, where the sound speed is 0.3 × 10 4 K/10 4 K, and the mass loss rate is given by the energylimited mass loss rate (Equation 2) with efficiency  = 0.1.The final estimate is given by the photoionization equilibrium case, where the gas temperature 10 4 K.In general, this last method gives a slightly larger value for the critical magnetic field but is the least applicable to old planets.
To calculate the critical magnetic field strength, we needed to estimate the  uv received by each planet.For this, we used values given in each of the cited detection papers (see Table 1).If no estimate was present, we used estimates from Kirk et al. (2022) in which they found the XUV flux by comparing to stars of similar spectra from the MUSCLES survey (France et al. 2016;Loyd et al. 2016;Youngblood et al. 2016).We note that the reconstructed XUV flux has significant uncertainties, and our methods for calculating the thermal pressure of the outflow are only approximate.Therefore we expect that our estimates for  c may vary by an order of magnitude.
We also estimate the extent to which the stellar wind can confine the outflow.To effectively radially accelerate the planetary gas to produce a blue-shifted transit, the stellar wind must be able to penetrate close to the planetary surface.We approximately calculate the position of the bow shock produced when the stellar wind and planetary outflow collide.The bow shock is defined by the condition that the momentum fluxes of the stellar wind and planetary outflow balance.In the simple case, where outflows are spherical, we can approximate the radial distance of the bow shock from the planet   : where  * is the mass loss rate of the star,  is the mass loss rate of the planet,  * is the stellar wind velocity and  is the semi-major axis of the planet.To calculate   , we estimate the mass loss rate of the planet using the energy-limited mass loss rate (Equation 2) with efficiency  = 0.1 and use solar-like wind values of  * = 10 −14  ⊙ yr −1 and  * = 150 km s −1 .If significant absorption occurs outside this radius, then the stellar wind is likely to play an important role in determining the shape of the transit.We also note that a strong planetary magnetic field can considerably increase the bow shock distance.In this case, the bow shock distance is approximated by the point at which the stellar wind ram pressure and magnetic pressure of the planetary field balance.Therefore, we also calculate the position of the bow shock considering the effects of a 1 Gauss surface magnetic field.
Here the expression for   is given by: Interestingly, ten out of the twelve systems show blue-shifted absorption.Thus, it is highly unlikely that uncertainties in planetary motion can account for all of these.Therefore, it is likely that some of these blue-shifts can be attributed to the geometry of the outflow.There are two explanations for this.The first possibility is that these planets have relatively weak surface magnetic fields (B ≲ 0.1 Gauss), and day-to-night winds are responsible for the blue-shifted transit.For sub-Neptunes, this would agree with the findings of Owen (2019), which demonstrated that the suppression of atmospheric mass loss by the presence of surface magnetic fields ≳ 0.3 Gauss is not consistent with both the position of the radius valley and the rocky composition of planets below the valley.This is not inconsistent with dynamogenerated magnetic fields in the cores of sub-Neptunes being on the order of a few Gauss, like solar system planets, as a few percent by mass hydrogen/helium envelope can greatly increase the radius of the planet and particularly raise the upper atmosphere where atmospheric mass loss is taking place.Since magnetic field strength for a dipole field scales like  −3 , the magnetic field can be much weaker in these regions.For hot Jupiters, this conclusion would favour the argument of Grießmeier et al. (2004) that slow rotation of hot Jupiters due to tidal locking leads to magnetic fields that are orders of magnitude smaller than Jupiters.This is in opposition to the argument of Christensen et al. (2009) which predicts magnetic field strengths an order of magnitude greater than Jupiters, based on a scaling relation between magnetic field strength and energy flux.
The other possibility is that stellar winds are able to penetrate close to the planetary surface and radially accelerate the gas to produce the observed blue-shifts.We note that a comet-like tail of escaping helium extending out to ∼ 7 planetary radii has been detected in the case WASP-107b (Spake et al. 2021) and to a lesser extent for WASP-69b (Nortmann et al. 2018), HAT-P-18b (Fu et al. 2022) and HD189733b (Guilluy et al. 2020).This may be evidence that the stellar wind plays an role in shaping the outflow of some these planets.We can set a lower limit on the extent of the outflow by assuming that the gas is optically thick to 10830 Å radiation, which can compared to the bow shock radius to assess the importance of stellar wind.We call this the "minimum absorption area", and calculate its value at mid-transit (see Table 1).We stress the gas is optically thin (e.g MacLeod & Oklopčić 2022) and therefore the actual extent can be significantly larger than this estimate.A good example of this is the transit of WASP-107b, which is found to a have a much smaller minimum absorption area ∼ 2  , than is temporally observed ∼ 7  (e.g, Spake et al. 2022).
In general, if the planets have weak magnetic fields, solar or moderately supersolar winds are required to set the bow shock radius close enough to the planet to disrupt the planetary outflow significantly.This is certainly feasible based on estimates of stellar wind mass rates from detections of astrospheric absorption (e.g., Wood et al. 2005Wood et al. , 2021)).However, if these planets are able to host significant surface magnetic fields ( ≳ 1 Gauss), then stellar winds with mass loss rates orders of magnitudes greater than the Sun would be required.Thus, we speculate that regarding the population of close-in planets for which helium observations have been taken, there is no evidence that these planets possess magnetic field strengths strong enough to control the topology of any photoevaporative outflow.
Table 1.Detections of helium atmospheric escape using high-resolution spectroscopy and the observed velocity shift of the outflow in the rest frame of the planet.We have provided uncertainties on the observed velocity shift, where given in the detection paper.These are generally of the order of a few km s −1 .We estimate the maximum surface magnetic field  c such that all field lines are opened by the planetary outflow.The three numbers correspond to estimating strengths when we approximate the outflow to be i) an isothermal Parker wind at 10 4 K, ii) an isothermal Parker wind at 0.3 × 10 4 K and iii) in photoionization-recombination equilibrium.For the former two calculations, we estimate the mass loss rate of the planet using the energy-limited formula with an efficiency of 0.1.We also estimate the bow shock radii at which the stellar wind collides with the planetary outflow (Equation 20) and the magnetosphere corresponding to a planet with a surface magnetic field of 1 Gauss (Equation 21).The minimum absorption area is a lower limit on the extent of the outflow assuming it is optically thick.

Planet
Figure 2.The number density of helium in the 2 3  state in the outflow for the hydrodynamic case (left) and the magnetically controlled case (right).In the hydrodynamic case, the density appears to be fairly spherically symmetric.In the magnetically controlled case, the region with closed magnetic field lines has a higher number density of metastable helium atoms than the outflowing regions.This is primarily because the total number density of gas in this region is higher, as it is in hydrostatic equilibrium.

Figure 3 .
Figure 3. Colour map of the line of sight velocity of the outflowing gas in the hydrodynamic case (left) and the magnetically controlled case (right).Contours mark the line of sight optical depth integrated into a two-angstrom bin around the peak absorption wavelength.The black, magenta and cyan mark the  = 0.01, 0.1 and 1 contours, respectively.The arrows show the velocity field.

Figure 4 .
Figure 4. Calculated excess absorption for a planet with i) no magnetic field (solid blue) and ii) a surface magnetic field of 3 Gauss (dashed red) at midtransit with an impact parameter of 0. The velocity scale is centred on the blended transitions at 10830.25 and 10830.34Å