The atmosphere of WASP-17b: Optical high-resolution transmission spectroscopy
Sara Khalafinejad Michael Salz Patricio E. Cubillos George Zhou Carolina von Essen Tim-Oliver Husser Daniel D. R. Bayliss Mercedes López-Morales Stefan Dreizler Jürgen H. M. M Schmitt Theresa Lüftinger
 


   

   

   
    
   Hamburg Observatory, Hamburg University, Gojenbergsweg 112, 21029 Hamburg, Germany,
 khalafinejad@mpia.de 
        Space Research Institute, Austrian Academy of Sciences, Schmiedlstrasse 6, A-8042 Graz, Austria
        Harvard-Smithsonian Center for Astrophysics, 60 Garden Street, Cambridge, MA 01238, USA
        Stellar Astrophysics Centre, Aarhus University, Ny Munkegade 120, DK-8000 Aarhus C, Denmark
        Institute for Astrophysics, Göttingen University, Friedrich-Hund-Platz 1, 37077 Göttingen, Germany
        Department of Physics, University of Warwick, Coventry CV47AL, UK
        Institut für Astronomie, Universität Wien, Türkenschanzstrasse 17, 1180 Wien, Austria
        Max Planck Institute for Astronomy, Königstuhl 17, 69117 Heidelberg, Germany

             
             





 
  High-resolution transmission spectroscopy is a method for understanding
    the chemical and physical properties of upper exoplanetary
    atmospheres. Due to large absorption cross-sections, resonance lines
    of atomic sodium D-lines (at 5889.95 Å  and 5895.92 Å ) produce large transmission signals. 
    Our aim is to unveil the physical properties of  through
    an accurate measurement of the sodium absorption
    in the transmission spectrum.
    We analyze 37 high-resolution spectra
    observed during a single transit of  with the
    MIKE instrument on the 6.5 meter Magellan Telescopes.
    We exclude stellar flaring activity during the observations by analyzing   
    the temporal variations of H_α and Ca II infra-red triplet (IRT) lines. Then we obtain the excess absorption light curves in wavelength bands of 0.75, 1, 1.5 and 3 Å  around the center of each sodium line (i.e., the light curve approach). We model the effects
    of differential limb-darkening, and the changing planetary radial velocity
    on the light curves. We also analyze the sodium absorption directly in the
    transmission spectrum, which is obtained through dividing in-transit by
    out-of-transit spectra (i.e., the division approach). We then compare our measurements with a radiative transfer atmospheric model. 
    Our analysis results in a tentative detection of exoplanetary sodium: we measure the width and amplitude of the exoplanetary sodium feature to be σ_Na = (0.128 ± 0.078) Å  and A_Na = (1.7 ± 0.9)% in the excess light curve approach and σ_Na = (0.850 ± 0.034) Å  and A_Na = (1.3 ± 0.6)% in the division approach. By comparing our measurements with a simple atmospheric model, we retrieve an atmospheric temperature of 1550 ^+170 _-200 K and radius (at 0.1 bar) of 1.81 ± 0.02 R_ Jup for WASP-17b.
   
   

The atmosphere of WASP-17b: Optical high-resolution transmission spectroscopy
    Sara Khalafinejad1,3,8 Michael Salz1 Patricio E. Cubillos2 George Zhou3 Carolina von Essen4 Tim-Oliver Husser5 Daniel D.R. Bayliss6 Mercedes López-Morales3 Stefan Dreizler5 Jürgen H.M.M Schmitt1 Theresa Lüftinger7
          
    December 30, 2023
====================================================================================================================================================================================================================================





§ INTRODUCTION




Transmission spectroscopy, pioneered by <cit.>, is a very successful observational method to unveil the chemical and
physical properties of hot-Jupiter atmospheres. During an exoplanetary
transit, a fraction of the stellar light passes through the
planet's atmosphere, hence a fraction of this light is absorbed. As a result, the signatures of the chemical
composition of the atmosphere are imprinted on the transmitted
light at certain wavelengths, making the radius of the exoplanet to
appear larger at these wavelengths.





In the optical region the resonant doublets of sodium (Na), and
potassium (K), have large absorption cross
sections, hence, a larger absorption in the transmitted signal of these
lines is expected <cit.>. Thus, these lines have been
used as diagnosis of exoplanetary atmospheres
<cit.>. In addition, at optical wavelengths it is
possible to infer, for instance, water vapor <cit.> and atmospheric hazes <cit.> and
molecular features of TiO <cit.>.

Different types of instruments unveil different aspects of an exoplanetary atmosphere. For instance, using low-resolution
transmission spectroscopy, we can investigate hazes, clouds, Na, and 
K, in the deeper layers of exoplanetary atmospheres. On the other hand, by means of high-resolution transmission spectroscopy in narrow bands centered on Na doublets, we can access the information on upper atmospheric layers and the layers above the
hazes and clouds <cit.>.



Exoplanetary transit spectral observations are influenced by
different effects, mostly of stellar origins. These can be
flares, spots, differential limb-darkening and rotation
effects. A successful detection of the exoplanet's atmosphere requires a proper consideration of these effects.  We already investigated sodium in
 as a prototypical target:  is a very
active K-type star. After correcting for stellar flaring activity and stellar differential limb-darkening effects, we detected the signatures of sodium in the exoplanet <cit.>. Here, we intend to apply a similar approach on transit observations of
, a hot Jupiter orbiting an inactive F-type star. 
Obtaining a comparative view of different targets helps to better understand the influence of stellar activity of different stellar types on transmission spectroscopy. 

In this study, we use the high-resolution spectral data of
<cit.>, who used a single transit observation of WASP-17b and claimed the detection of sodium by obtaining the excess light curve depth in passbands of 1.2 Å  to 1.8 Å  (with steps of 0.1Å) around the center of sodium lines and measured the depths by fitting a simple light curve model.
We analyze the sodium absorption in
 with a new approach, we intend to improve and complete the previous analysis by <cit.>:
We rely on their extraction of the raw excess light curve and go beyond the previous work, first by accounting
for the stellar limb-darkening effect and changes in the radial velocity of the planet in the excess light curves. The second consideration is that, in addition to the detection of sodium, we constrain the physical characteristics of WASP-17b by modeling the sodium transmission spectrum of the planet. 
Finally, we additionally investigate
the behavior of the H_α and Caii infra-red triplet (IRT) lines during the transit to inspect
the stellar activity and possibly the exoplanet's atmospheric hydrogen absorption from the upper atmosphere of this highly inflated <cit.> exoplanet.


The structure of this paper is as follows: 
In section <ref>, we introduce the hot-Jupiter WASP-17b. Then in Section <ref> we describe the observation, and the steps of data reduction.
In Section <ref>, we investigate the stellar activity through H_α and Caii IRT. Section <ref> focuses on detection of exoplanetary atmospheric sodium using the excess light curves, and Section <ref> presents the method and results for extraction of the transmission spectrum in the region of sodium lines. In Section <ref> we discuss the results and compare the observations with an atmospheric model. Finally in Section <ref> we summarize our conclusions.



§ THE SYSTEM WASP-17


WASP-17b is an inflated hot-Jupiter, with a mass of 0.49 M_ Jup, a radius of 1.99 R_ Jup and an orbital period of ∼3.7 days <cit.> and it is in a retrograde motion
<cit.>. Its host star is of spectral type
F6V, with a magnitude of V = 11.6 <cit.>. The
parameters of the system used in this work are
summarized in Table <ref>.  has
a very low density, ∼ 0.06 ρ_Jup, and a high equilibrium
temperature,  <cit.>. Thus, it is
expected to have a very large atmospheric scale height. In consequence, this hot Jupiter has become one of the few very well studied targets for
atmospheric characterization with transmission spectroscopy.

For instance, <cit.> used medium-resolution  observations with the GIRAFFE fiber-fed spectrograph at the
VLT and reported a sodium detection with an excess absorption of (1.46
± 0.17)%, (0.55 ± 0.13)% and (0.49± 0.09)% in passbands of
0.75 Å , 1.5 Å  and 3 Å , respectively. <cit.> used
the Magellan Inamori Kyocera Echelle (MIKE) spectrograph  on the Magellan Telescopes for the same purpose. By
applying the transmission spectroscopy technique in narrow bands they
detected a (0.58 ± 0.13)% signal at the core of sodium D-lines (D_2 at 5889.95 Å  and D_1 at 5895.92 Å)
in a passband of 1.5 Å. 

Later, low-resolution broad-band observations
in the optical and IR region were performed. <cit.> used
multi-color broad-band photometry with SDSS 'u','g','r' (covering
wavelengths from 325 to 690 nm) and compared to the g-band they found evidence for increased absorption in the r-filter where the sodium feature is located. Using the Hubble Space Telescope (HST) WFC3 instrument, <cit.> analyzed low-resolution transmission
spectroscopy in the IR region (1.1 -1.7 μm). Their analysis of the
band-integrated time series suggests water absorption and the presence
of haze in the atmosphere of . <cit.>
used FORS2 at the VLT, and after dealing with instrumental
systematics, derived the optical transmission spectrum of
 in the region between 800 and 1000 nm. Their transmission spectrum hints at strong absorber in the bluer wavelength region.
In addition, based on their tested theoretical models, tentative signatures of a TiO and VO or a potassium and water atmosphere have been observed, but these models cannot fully explain their observations.
<cit.>
used HST (STIS and WFC3) and Spitzer observations, and obtained optical to mid-IR transmission spectrum (∼ 0.3μm - 5μm) of
a sample of hot-Jupiters including WASP-17b. In their measurements, the atmospheric absorption in WASP-17b, at ∼5900 Å  (wavelength of sodium) with the bin size of 5 Å , is about (0.33 ± 0.18)%.



<cit.> analyzed
low-resolution (ℛ ∼ 2000) transit observations of FORS2 and obtained the
broad-band transmission spectrum of WASP-17b with a bin size of 100 Å  in the wavelength range of 5700 to 8000 Å, where they detected a cloud-free atmosphere and
potassium absorption with a 3σ confidence
level. In their study the sodium feature was not detected neither in 100 Å  nor in 50 Å  bin size. Finally, <cit.>'s work also suggested a nearly cloud-free atmosphere at visible wavelengths.









§ OBSERVATIONS AND DATA REDUCTION


On the night of 2010 May 11, one single transit of the hot Jupiter,
, was observed with the MIKE spectrograph, mounted on the 6.5m Magellan II (Clay)
Telescope. During the observation 37 spectra, with an
exposure time of 600 seconds each were obtained. In addition, a slit widths of
0.35 arcsec was chosen, resulting in a spectral resolution of
 in the wavelength
range of 5000 to 9500 Å. The spectra have a pixel scale of ∼
0.04 Å  and a resolution element of about 0.12 Å. In the sodium
doublet region, the S/N of our spectra is about 80 per pixel. Two of the
spectra with poor signal-to-noise (S/N < 60) and high airmass were
discarded. These correspond to the first and last exposures. The details 
of the observations, along with the initial data reduction of the echelle 
spectra, are fully discussed by <cit.>.




 §.§ Spectral data reduction in Na, H_α and Caii IRT





The spectra were analysed in wavelength bands with a width of a few hundred Angstroms in three regions: Na (5800-6100 Å ), H_α (6500-6700 Å ), and Caii IRT (8400-8700 Å ). Data preparation before performing the main analysis mainly consists of spectral normalization, spectral alignment and telluric line removal.

The data reduction in the Na doublet, H_α and Caii IRT regions follows a similar procedure. For the spectral normalization and removal of telluric features in the Na region we rely on the data reduction by <cit.>. Here, we accurately align the spectra in the Na wavelength region, in addition we perform a complete reduction around the H_α and Caii IRT lines.

We shift the spectra into the stellar rest frame. To correct the misalignment between exposures, we select 8,7, and 14 stellar spectral lines in the vicinity of the Na doublets, H_α, and Caii IRT lines respectively and fit Gaussians to determine the line centers. Each spectrum is shifted by the mean offset of the line centers with reference to the first observation. The resulting misalignments in each region are shown as radial-velocity (RV) shifts in Fig. <ref> (top). All regions show a similar pattern, with a maximum difference of ∼1 km s^-1 between exposures.
We then correct cosmics via linear interpolation over the affected spectral ranges and interpolate all spectra onto a common wavelength grid, increasing the sampling by a factor of four to minimize interpolation errors. 5th-order polynomials are used to normalize the continuum.

The airmass value of each exposure is also shown in Figure <ref> (bottom). Changes of airmass cause variations in the telluric features (mainly water at these wavelengths) with a similar trend.
To remove the tellurics in the sodium region, the method by <cit.> is followed: The observations of the rapidly rotating B star, HD 129116, are used as a template. For each exposure, this telluric template is scaled to fit the prominent telluric water lines and then the spectra are divided by the template.
As explained in <cit.>, no telluric sodium is observed.
The spectra of WASP-17 are affected by interstellar sodium lines which has wavelength shifts of about 1 Å  with respect to the stellar lines.




The removal of the Earth's atmospheric features in the Hα and Caii IRT regions is a bit different. Telluric lines are stronger in the Hα range and we devise an approximate approach to remove them. A high resolution telluric transmission spectrum of <cit.> for an airmass of 1.5 is fitted to the average stellar spectrum. This fitting procedure has three free parameters: The stellar radial velocity, the amplitude of the telluric lines, and the width of a Gaussian with which the telluric spectrum is convolved to model the instrumental resolution. In a second step, the observation run is split into five sections and for each of the five mean spectra, we again fit the telluric spectrum by only adjusting the amplitude of the telluric lines. During the observation night, this amplitude follows a trend that resembles the airmass trend, and we fit a 2nd order polynomial to the amplitude evolution. Each spectrum is then divided by the shifted and convolved telluric reference spectrum with the amplitude derived from the polynomial. Our visual inspection shows that, in the individual spectra, strong telluric lines are effectively reduced at the 90% level. Figure <ref> shows the average spectrum of WASP-17 in the H_α and Caii IRT regions with the telluric transmission spectrum and the uncorrected spectrum for the Hα range. The telluric correction has little impact on the resulting Hα equivalent widths (see Section <ref>).

















§ DATA ANALYSIS: STELLAR ACTIVITY


Using high-resolution transit spectra, we have two possible approaches to detect the exoplanetary sodium embedded inside the stellar spectrum: One is to integrate in narrow passbands inside the stellar absorption lines (with a reference band in the continuum) and investigate the additional contribution of the planetary atmosphere to the obscuring of the stellar light during the transit (excess light curve approach). The other is to directly obtain the exoplanetary transmission spectrum by dividing the in-transit spectra by the out-of-transit spectra (division approach). But first we identify possible signatures of stellar activity on the spectra.
In this section we investigate the stellar activity and then, in the next sections, we perform the transmission spectroscopy both through excess light curve and division approaches.



 §.§ Investigations of stellar activity





Stellar spots <cit.>, plage regions <cit.> and flaring activity <cit.>, are among the main sources of false signals in the interpretation of transmission spectra.

Small bumps or dips in the photometric transit light curves and deformations of the high-resolution spectral line shapes can be signatures of stellar variability. Investigations of spots through study of spectral line deformations are easier for very fast rotating stars <cit.>.

In this work, we do not have simultaneous photometric observations and the star is a slow rotator, hence study of stellar spots is not possible. However we are still able to perform an in-depth study of flaring events.

Chromospheric lines such as H_α (at 6563 Å) and Caii IRT (at 8498, 8542, 8662 Å) are indicators of stellar activity <cit.>, but also other stellar lines such as the sodium D-lines can be affected by stellar activity <cit.>. 

Here, we estimate by how much a planetary signal in the sodium D-lines can be affected by stellar activity.


Additionally, the H_α line may indicate signatures of hydrogen escape from the upper atmosphere of hot gas planets <cit.>. Due to its low mean density and a high irradiation level, WASP-17 b is expected to host a strongly evaporating atmosphere <cit.>. Therefore, it is reasonable to search for Hα absorption features around the planetary transit. 

We compute the equivalent width (EW) of the individual “transmission” spectra in the H_α and all three Caii IRT lines following <cit.>. Each spectrum is divided by the total mean
spectrum and then integrated over the central ±50 km s^-1. The EW of the three IRT lines is then averaged. Errors are derived from the variation in adjacent ±500 to 1000 km s^-1 bands. This slightly underestimates the error in the line cores and the impact of red-noise, therefore, we follow <cit.> to derive a mean
error for the EW curves and scale our values accordingly.

The time evolution of the equivalent widths is shown in Fig. <ref>. Both EWs evolve similarly: except for the planetary egress, WASP-17 shows a slightly increased activity level during the planetary transit compared to
the out-of-transit level. This is also seen in the average in-transit transmission spectrum of the H_α and IRT regions (see Fig. <ref>).
At egress both EW light curves show a dip, which can be caused by stellar variability or by some absorption feature of planetary origin. However, the signal-to-noise is not sufficient to investigate this
any further. The H_α EW of WASP-17 changes by about 20 mÅ over the transit duration, which is slightly stronger than that of HD 189733 <cit.>. The EW of a planetary H_α absorption feature should be smaller than the observed activity variation, which is equivalent to an absorption level 0.9% over the integration band. For the IRT we exlude 8 mÅ corresponding to 0.3% absorption. 
WASP-17 is among several other systems with non-detections of H_α in-transit absorption (HD 149026, HD 147506, KELT-3 b, and GJ 436 b ). Currently, HD 189733 <cit.> and KELT-9b <cit.> remain the systems with
possible H_α absorption caused by the planet’s evaporating atmosphere.



In the study of <cit.> a moderate flare on the K-type host star HD 189733 affected the time evolution in all studied spectral lines with a similar time behaviour.

<cit.> showed that the sodium lines were affected by the same flare, but on a level about a factor of 10 weaker than the H_α line. 

In WASP-17, the activity seen in the H_α region of 20 mÅ could affect the Na region on a 2 mÅ level, if we assume a similar scaling as in HD 189733. This is about half of the level of the observed absorption signal in the Na region (see below). However, the activity is higher during the transit and should not cause an artificial absorption signal, but rather decrease the planetary sodium signal. We do not observe a clear stellar flare and, thus, do not attempt to correct the impact of stellar activity variations in the sodium region, but we do note that the observed absorption level may have been lowered by an increased in-transit activity level of the host star.
















§ ANALYSIS AND RESULTS: EXCESS LIGHT CURVE APPROACH




 §.§ Extraction and modeling of the excess light curve


The extraction of the raw excess light curves in the sodium doublet region is performed by <cit.>, who use integration passbands of 0.75, 1, 1.5 and 3 Å  centered on the core of each sodium line 
and select the interstellar sodium next to D1 (Na line with the longer wavelength) as a reference in the flux integration. For consistency with <cit.>, we use the same integration and reference bands.

During the transit the radial velocity of the planet changes between -18 to +18 kms^-1, which results in a Doppler shift of up to ± 0.35 Å. Thus, with a passband of 0.75 Å  we can still be sure that the exoplanetary feature is still located inside the integration band.
Here we use a different approach in measuring the exoplanetary signal in the excess light curves.

We make a combined model of differential LD and changing RV  models to fit the excess light curves; the detailed explanations of these two model components are presented by .
To increase the signal-to-noise we use average of both sodium D-lines and do not treat the lines individually.

There are some effects that inevitably influence transit spectra or excess light curves. To accurately model the excess light curves, we take the following effects into account and consider each as a model component of the final model, which is introduced in Section <ref>.



  §.§.§ Differential Limb-darkening (component A)




Stellar limb-darkening depends on wavelength <cit.>. Thus dividing the flux in the integration band by the reference band, is similar to dividing two light curves with two different limb-darkening coefficients by each other. Thus, this division affects the shape of the excess light curve and needs to be corrected for, specifically in late type stars where the effect is more prominent.
We calculate the limb-darkening coefficients in each passband using the intensity profiles of the PHOENIX model <cit.> and the quadratic limb-darkening law <cit.>. More details are explained by <cit.>; the results are shown in Table <ref>. Since the excess light curves are already averaged out between D1 and D2, we use the average of the coefficients. The signal-to-noise of our data is not enough to consider LD coefficients as fitting parameters, hence this model is considered to be constant and to have no fitting parameters. We note that, changing this constant model component by 50%, alters the final measured sodium absorption within the 1σ error-bar.




  §.§.§ Planetary radial velocity (component B)


The exoplanetary spectral lines move inside the stellar lines due to the Doppler shift caused by the exoplanetary orbital motion. This results in an apparent reduction of the depth of excess light curve at the mid-transit time <cit.>.

For considering the exoplanetary atmospheric absorption effect in this work, the exoplanetary sodium line is considered as a Gaussian convolved inside the stellar sodium line. This Gaussian moves inside the stellar sodium line with an offset proportional to the change of the radial velocity of the exoplanet by the orbital motion <cit.>. At the same time, the moving Gaussian causes the dip in the light curve and a bump near the mid-transit time. The fitting parameters of this components are the width (Gaussian σ_Na) and the depth (Gaussian A_Na) of the exoplanetary Gaussian profile. Since our raw excess light-curve is the average of both sodium D1 and D2, we model the effect on both stellar sodium lines and then obtain the averages of sigma and amplitude of the Gaussian feature.




  §.§.§ Neglected Effects

According to <cit.> and <cit.>, WASP-17 has a large spin-orbit misalignment angle (∼ 150^∘), and the Rossiter-McLaughlin (RM) effect does not produce a symmetric RV curve. Therefore, the variations in line shape during the transit do not completely cancel out. Based on Figure 6 in <cit.>, the difference between the amplitude of the curve in the blue- and red-shifted parts of the star is about 100 ms^-1, which results in a 0.002 Å  change of a spectral line position. This value is at least one order of magnitude smaller than what we expect for the width of the exoplanetary sodium feature. Thus we ignore the RM effect in this analysis. We note that we evaluate the influence of the RM effect on measurements of the line centers in the alignment of spectra in Section <ref>. However, the maximum radial velocity caused by the RM effect is smaller than the precision of the alignment, thus no evidence of influence of this effect could be detected.

In addition, as mentioned in Section <ref>, we cannot take into account the effects of possible spots and plages in this data set. In any case, as also confirmed through our investigation of the activity indicating lines, we do not expect pronounced activity features on this F-type star.




  §.§.§ Final model


A combination of the LD and the RV models constitutes the main model, we also consider a normalization constant (offset) as the third model component (C) and consider the model, M, as a function of time, t:
 


    [                     M(t) = LD(t) × RV(t) + offset;                                       ≡ A × B + C;                          ]


The fitting parameters in the model, in Eq. <ref>, are the σ_Na, A_Na and the offset.
For exploring the best-fit parameters
and their associated uncertainties we apply a Markov Chain Monte
Carlo (MCMC) analysis, using the affine invariant ensemble sampler
emcee <cit.>. We employ 20 walkers, with 100
chains each, where the initial positions are synthesized from a
Gaussian distribution around our best estimates. All the free parameters have uniform priors imposed. For σ_Na and A_Na we set a lower bound of 0 and upper bound of 0.3.
We allow a burn-in phase of ∼ 50% of the total chain length, beyond which the MCMC
is converged. The posterior probability distribution is then
calculated from the latter 50% of the chain (see Section <ref> for the results).



 §.§ Best-fit parameters and uncertainties of the excess light curve models







The best-fit model of each excess light curves are shown in the top panels of Figure <ref> and the values of the parameters as well as their uncertainties are provided in Table <ref>. The posterior distributions of the fitting parameters and the correlation plots are shown in the appendix Figure <ref> for the 1.5 Å  excess light curve. The bottom panels in Figure <ref> show residuals after subtracting the data from the model. The excess light curves have a large noise level and thus the atmospheric absorption measurements have large uncertainties (see Table <ref>). As Table <ref> shows, the significance of the signal is about 2σ in our narrowest integration band and the significance level reduces by the increase of the passband. At 1.5 Å  there is hardly a signal and the 3 Å  passband results in a null outcome. At narrower passbands the contrast between the planetary and stellar flux contributions is smaller, thus a larger signal is expected.
The measured exoplanetary signal with this approach is compared with planetary atmospheric models in Section <ref>.  



§ ANALYSIS AND RESULTS: DIVISION APPROACH




 §.§ Extraction of the exoplanetry spectrum through the division approach





In transmission spectroscopy we compare the spectra taken when the exoplanet is outside the transit with those taken during the transit. Only the in-transit data contain the planet's atmospheric signatures, hence subtracting the out-of-transit spectrum from them, can reveal the exoplanetary features within the residuals.
The exoplanetary transmission spectrum is given by (F_ in - F_ out) / F_ out. 

In this simple equation, the average of all in-transit spectra is considered as F_ in (master-in) and average of all of out-of transit spectra is considered as F_ out (master-out). 
However, this method has a problem: As mentioned before, due to orbital motion the exoplanetary RV changes and this causes the shifts of the planetary sodium features relative to the stellar spectrum, hence the signal is diluted in the process of division.
To overcome this problem, after telluric corrections and alignment of spectra, we divide each individual in-transit spectrum by the master-out spectrum. Then, to line up the exoplanetary features, we shift each residual based on the corresponding calculated radial velocity of the exoplanet in each exposure. We finally co-add all residuals <cit.> and normalize the result with the same method explained in Section <ref>. We then consider the normalized residual as the transmission spectrum (see Section <ref> and Figure <ref> (middle panel). By this method we correct for the RV component in the division approach as well. 









It is important to note that in high-resolution transmission spectroscopy accurate alignment of the spectra is a very important step of the analysis. In the division slight misalignments can cause systematic dips or spikes in the residuals. The precision of the alignment depends on signal-to-noise and on the wavelength sampling (or the resolution) of spectra. Simulating the scatter and the wavelength sampling of our spectra on a Gaussian or Voigt distribution, 
we obtain an uncertainty of up to 0.004 Å  for the line position.
This amount of mis-alignment can still be a source of variations in residuals at the location of strong lines compared to the noise level at the continuum.
Dividing two sets of out-of-transit spectra by each other is a good approach to test the alignment and the robustness of the signals in transmission spectra. Hence, we also divide the average of out-of-transit spectra in exposures 1 to 4 (F_out1) before the ingress by the master-out spectra after the egress in exposures 30 to 34 (F_out2) by each other (see Section <ref> and Figure <ref> (bottom panel). These two sets of out-of-transit spectra have similar airmass, thus it can result in a second order correction of the tellurics.
In addition, in the case of this target, we can use the interstellar sodium lines as a reference for evaluation of the alignment. The interstellar lines are constant and thus in the division are expected to result in values that are uniformly scattered around unity. Thus, if the initial alignment does not satisfy this condition, an additional shift can be applied to improve the alignment.
In each single division stage in our analysis, we manually shift each in-transit spectrum with respect to the master-out, in a way to minimize the variations of the residuals at the position of interstellar lines. The amount of shifts we apply are between 0 and ± 0.004 Å  (with the steps of 0.0005 Å) which is less than the precision of the initial alignment method. However, the final outcome with this method does not considerably alter the transmission spectrum and the residuals of the interstellar features do not reduce by the additional manual shifts. In Figure <ref> the result of a set of manual shift trial on in-transit exposures are shown in gray beneath the red profile. In contrast, in the case of division of two sets of out-transit spectra, applying an additional shift of about 0.004 Å  to one of the spectra, reduces the scatter of residuals. In Figure <ref> (bottom panel), gray profile shows the initial division and green profile shows the division after applying the manual shifts.

We also need to think of any effect that causes a difference between the alignment of interstellar and the stellar lines. The RM effect is a possible source that affects the stellar lines but do not influence the interstellar lines. Based on the literature values of the orbital parameters <cit.>, we simulated a model of the RM effect in transit of WASP-17b and reduced it from the values of the spectral mis-alignment introduced in Section <ref>. The RM model is shown in Figure <ref> on top of spectral shift values. The largest difference that the RM effect can cause is up to 0.003 Å  which is again below the precision of the initial alignment with our method. The removal of the RM effect from the shifts does not considerably affect the residual outcome (similar to the manual shifts in the second panel). Hence we continue the work while ignoring this effect.







 §.§ Transmission spectrum of the division approach



Figure <ref> summarizes the results of the division approach analysis.
The master-out spectrum (or the stellar spectrum) is shown in the top panel, where the stellar and interstellar sodium lines can be clearly seen.
The second panel shows the radial velocity corrected transmission spectrum of WASP-17b. The exoplanetary sodium absorption by D1 is visible at  5896 Å  and the absorption at D2 is placed at  5890 Å.  
 Fitting a Gaussian in each sodium feature in the transmission spectrum, yields σ_Na = (0.085 ± 0.034) Å  and A_Na = (1.3 ± 0.6)%. The error of each Gaussian fit is estimated through a MCMC procedure, where the error bar on each residual data point is equal to standard deviation of continuum region in the residuals scaled by the stellar flux.
 
 Another relatively large feature we see in the residuals (middle panel) is the scatter of data at the location of interstellar sodium lines. We note that the flux values at stellar and interstellar lines are low, thus the S/N of data at the core of these lines are lower compared to the continuum. Hence, larger scatter is inevitably present in the residuals at the location of these lines (further discussed in Section <ref>). 

 The division of two sets of out-of-transit spectra by each other are also shown as complementary and comparative information in the last panels of Figure <ref>. Naturally, we expect no feature at the sodium line positions in this profile. We see that the scatter of the points is relatively large at stellar and interstellar sodium line positions.
 However, the number out-of-transit exposures that build up this profile are less than the profile in the second panel by about a factor of 2 and,
 on average they are taken at larger airmass and lower S/N compared to the exposures that build up the profile in the second panel. Hence, even in the continuum the scatter is larger compared to the second panel. Since the features in these residuals at any of the sodium lines sodium lines, do not exceed 3σ we consider the green profile  as uniform scatter around unity.
 
 Further discussion on evaluating the robustness of the exoplanetary absorption feature is in Section <ref>. Our observed transmission spectrum is then compared to a planetary atmospheric model in Section <ref>.



 §.§ Residuals of the division


The residuals in Figure <ref> (middle panel) shows relatively larger variations at the interstellar line positions. As discussed in Section <ref> these features are related to the lower S/N at these lines. As can be seen in the top panel of the figure, the interstellar D_2 line has the largest depth among all four sodium lines; the feature of the residual related to this line is also more pronounced. However, other reasons such as mis-alignments smaller than 0.004 Å  or changes of spectral line resolutions due to Earth's atmospheric effects can create such features.
Looking at the un-binned residuals of <cit.> for the case of WASP-49b, we see larger variations at the small interstellar sodium lines in their data as well. Compared to that work, interstellar lines in our case are stronger. In addition, MIKE is not as stable as HARPS and the resolution of our instrument is smaller by about a factor of two and thus the spectral alignment precision is less by about a factor of two. In any case, a complete removal of these features is not possible with this dataset and we continue the analysis assuming that features of residual spectrum at the position of the stellar sodium line are caused by the excess absorption of the exoplanetary atmosphere. 















§ DISCUSSION







 §.§ Excess light curve vs. division approach


In our light curve approach we do not directly measure any light curve depth. Instead we estimate the shape of the exoplanetary sodium Gaussian profile. In the division approach we obtain the transmission spectrum in the sodium region, where the shape of exoplanetary sodium line is directly visible.

Table <ref>, shows the values of widths and amplitudes of the fitted Gaussian at different passbands. The robustness of the measurements decreases with the increase of passbands, thus we consider the measurement at 0.75 Å  as the best measurement. In Table <ref> we compare the σ_Na and the A_Na of exoplanetary sodium Gaussian obtained in light curve approach, with those obtained in division approach. Within the error bars, the values are consistent with each other.

Our measured error bars on the exoplanetary feature are quite large. A comparison of the standard deviation of the data outside the transit with the expected signal at the sodium lines shows that the detection cannot reach confidence levels larger than 2σ and this illustrates the under-estimation of the error bars in previous analysis of the same data set.







We note that in the division approach we do not apply any differential limb-darkening correction on the spectra and their residuals directly. However, investigation of the model components in Figure <ref> indicates that the LD model is about an order of magnitude smaller than the exoplanetary absorption effects in a F-type star. Thus the strength of this effect is already within the error bars and can be ignored in the division approach.







 §.§ Comparison to previous measurements




  §.§.§ Comparison of absorption signals






In order to be able to compare our measurements with other work, we average out the exoplanetary line flux in different passbands in both approaches. The results are shown in Table <ref> and the values are compared to measurements of <cit.> and <cit.>, obtained from high-resolution analysis.


These measurements are consistent with each other within the error bars. The source of the difference between them could be in RV component correction and in the different approach in measurement of the signal. For example, <cit.> measure directly the depth of the fitted light curve while we measure the average of the flux in the fitted exoplanetary sodium line Gaussian. By looking at Figure <ref> at 0.75 Å  and roughly measuring the depth of the modeled light curve, we achieve a similar result to <cit.>.

We additionally calculate the absorption signal presented in the low-resolution transmission spectrum of WASP-17b by <cit.> as well as the upper limit on the non-detection of sodium in the transmission spectrum obtained by <cit.>. The results are also shown in Table <ref>. To compute the values, we measure the difference in the R_ P/R_ S value between the data point at the wavelength of sodium and the continuum level, and we also covert the radius ratios (R_ P/R_ S) to the flux ratios (F_ in/F_ out) to unify the units. Assuming a relation of f(x) = 1/x for the absorption as a function of passband and considering that all the exoplanetary absorption signal is coming from the line center at 0.75 Å  passband, we compute the values listed in the last row of the table. 

If the exoplanetary sodium line wings are broader than the high-resolution passbands, then the low-resolution bin size covers the exoplanetary feature more completely.
Comparison of our high-resolution expected values to the low-resolution measurements at 5 Å  and 50 Å  passbands/bin size, shows that the values in low-resolution observations are larger but the results are consistent with each other within the error-bars. Influence of stellar activity can be another source of variability between the measurements of different epochs.



  §.§.§ Offset between the center of the stellar and planetary sodium lines

By looking at the sodium line center in the top and middle panel in Figure <ref>, we recognize an offset of ∼ 0.15Å  (7.5 kms^-1) between sodium residuals and the center of stellar sodium line. <cit.> has seen a similar shift in the Na signal of HD 189733b.

We must emphasis that the alignment of the exoplanetary features before co-adding the residuals is highly dependent on the accuracy and precision of the calculated radial velocities of the exoplanet relative to its host star. 
In calculation of the radial velocities, changing the values of orbital parameters, i.e., semi-major axis and period, even within their error bars affects this offset. For example, considering a 2-σ upper limit on the semi-major axis calculated by <cit.> or 1-σ upper limit by <cit.>, the maximum offset that we measure reaches about 6 kms^-1 which corresponds to about 0.12 Å .










 §.§ Atmospheric physical properties























  §.§.§ Comparison to atmospheric models: Division approach




To model the WASP-17b high-resolution transmission spectrum and obtain a physical description of the data, we use the
open-source Python Radiative Transfer in a Bayesian framework (Pyrat-Bay[http://pcubillos.github.io/pyratbayhttp://pcubillos.github.io/pyratbay
 In addition, a Reproducible Research Compendium for the Pyrat-Bay analysis is available at:

https://github.com/pcubillos/KhalafinejadEtal2018_WASP17b
     https://github.com/pcubillos/KhalafinejadEtal2018_WASP17b], Cubillos et al., in prep.), based on the Bayesian Atmospheric Radiative Transfer
package <cit.>.

Due to the wavelength normalization (Section 3.3), high-resolution
transmission spectra do not constrain the planet-to-star radius ratio
(as is the case for lower-resolution transmission spectroscopy).  For
the narrow wavelength range covered by our observations, the spectra
are dominated by the strong sodium doublet lines embedded into the
Rayleigh absorption, which sets a continuum transmission level around
the sodium lines.  Thus, this data traces the differential
transmission modulation of the sodium lines with respect to the
Rayleigh continuum.

The Pyrat-Bay model initially computes the modulation spectrum or spectrum ratio <cit.>:

    M(λ) = f_ in(λ)-f_ out(λ)/f_ out(λ),

where f_ in(λ) and f_ out(λ) are the in- and
out-of-transit flux spectrum, respectively.  To replicate the
wavelength normalization of the high-resolution data, the code
calculates

    ℜ̃ = 
       1-M(λ)/1-M(λ_ ref) =
                f_ in (λ)/f_ in (λ_ ref)/f_ out(λ)/f_ out(λ_ ref),

where λ_ ref is a wavelength far away from the sodium
lines.

To produce the transmission spectra, the Pyrat-Bay code solves the
radiative-transfer equation for an 1D atmospheric model consisting of
spherically concentric layers, in hydrostatic equilibrium.  For the
WASP-17b data, we sample the atmosphere between 100 and 10^-15 bar
with 200 layers.  Our forward model incorporates opacities for H_2
Rayleigh scattering
<cit.>, and the sodium
lines <cit.>.  Other opacity sources like
collision induced absorption do not play a significant role at the
observed wavelengths as their opacities decay exponentially as one goes toward shorted wavelengths <cit.>.  We also discard cloud opacities, based on
previous transmission observations of this planet
<cit.>.

For the retrieval we consider the simplified case of a solar-abundance
atmosphere with thermochemical-equilibrium compositions
<cit.>.  Thus, we retrieve two atmospheric
parameters, the atmospheric temperature (T, as an isothermal
profile) and the radius of the planet (R_0) at a reference pressure
p_0=0.1 bar (necessary to solve the differential hydrostatic
equation).

To explore the parameter space, Pyrat-Bay uses the
differential-evolution Markov-chain Monte Carlo (MCMC) algorithm
<cit.>, constrained by the
high-resolution data in the 3 half-width at half maximum region around each sodium line. We
also fit the modulation (Eq. <ref>) to the optical
broad-band transit depth 0.01524 ± 0.00027
<cit.>.

As part of our modeling approach, we solve the hydrostatic-equilibrium equation
to relate the altitude and pressure profiles of the model: r=r(p).  Since this
is a first-order differential equation, we need a 'boundary condition'
of the form R_0 = r(p_0) to obtain the particular solution of the
equation.  The typical procedure is to either fix R_0 or p_0, and
then find their p_0 or R_0 counterpart (respectively) that fits
the observations.  The selection of the fixed reference point is
arbitrary (we choose p_0=0.1 bar in this article).
The challenge is that transmission observations do not directly
constrain the pair R_0, p_0, but rather allow for degenerate
solutions to this problem <cit.>.  Thus, the nature of
the problem require us to include R_0 as a free parameter of the
atmospheric model.  We include the broad-band constraint to break down
one of the degeneracies of the atmospheric model, although other
correlations still remain.

We adopt two configurations for the retrieval.  An initial run assumes
a fixed solar Na composition of 1.7 parts per million
<cit.>, letting free the
temperature and reference radius.  A second run, lets the sodium
abundance vary as a free parameter along with the other two parameters.  All model parameters have uniform
priors, and thus, the observations are the main driver of the MCMC
posterior distribution.

Figures <ref> shows our atmospheric model over the high-resolution transmission data (residuals) 
and Figure <ref> shows the bestfit model and the
parameter posteriors, respectively. When adopting a fixed solar sodium abundance, we retrieve an atmospheric
temperature of T = 1550_-200^+170 K, which is consistent to
1σ with the planet's equilibrium temperature (1770 ± 35 K),
and a reference radius of R_0 = 1.81 ± 0.02 R_ Jup.
As expected, the retrieval with free sodium abundances has broader posterior distributions.  The degeneracy of solutions lead to strongly correlated posteriors.  The sodium abundance is unconstrained within our chosen exploration domain of 10^-4–10^3 solar abundances.  The retrieved temperature is T = 1250_-70^+800 K, while the reference radius ranges between 1.78–1.88 R_ Jup.



  §.§.§ Comparison to atmospheric models: Excess light curve approach


The model that fits the residuals at the sodium lines in division approach, can be used for comparison to the excess light curve absorption signals. For this purpose after applying the instrumental broadening, we change the sampling of the models to match the sampling of the observations and then average out the model in different passbands the same way that we estimate the absorption signal in the observations. The result of this comparison is shown in Figure <ref>. As the figure shows the model and the observational data are coherent.

Here we note that it is not practical to  apply an independent atmospheric model fit to this approach, since the current model is already well within the large error bars.






§ SUMMARY AND CONCLUSIONS


The aim of this work is the atmospheric characterization of the inflated hot Jupiter, WASP-17b, using transmission spectroscopy method in narrow wavelength bands centered on the sodium lines.
We used 37 high-resolution spectra taken during a single transit of the target, using MIKE instrument on Magellan Telescopes.
Our analysis consists of three main sections: (1) Investigation of the stellar activity through chromospheric lines of H_α and Caii IRT, (2) investigation of the exoplanetry sodium absorption through the excess light curves in narrow pass-bands and (3) through the division of in-transit by the out-of-transit spectra.

We detect no strong chromospheric line absorption or strong stellar variability during the observations.
In the excess light curves we detect tentative signatures of exoplanetary sodium with the Gaussian width of (0.128 ± 0.078) Å  and Gaussian amplitude of (1.7 ± 0.9)%. Through the the division approach the measured Gaussian width and amplitudes are (0.085 ± 0.034) Å  and (1.3 ± 0.6)% respectively.

Finally, in order to extract some of the physical properties we compare our results with the planetary atmospheric models. Our conclusions are listed below:



    
  * Our re-analysis of this data set suggests under-estimation of the uncertainties in the exoplanetary absorption signal measured by <cit.>. This is originated in the way of interpreting the excess light curve.
    
  * High-precision alignment (> 0.004 Å ) and high signal-to-noise (> 100) of the spectra are crucial in achieving a robust ground-based transmission spectrum through a single transit observation.
    
    
  * Comparing our measurements with the Pyrat-Bay retrieval model, for WASP-17b we constrained an atmospheric temperature of 1550_-200^+170 K, and a reference radius at 0.1 bar of 1.81 ± 0.02 R_ Jup
    
  * During high-resolution transmission spectroscopy on sodium lines, simultaneous high-resolution spectral observation of the stellar activity indicators, such as Caii H & K, H_α and Caii IRT, reveals possible effects of stellar flaring activity on transmission spectra. 
    
    
    
  * We have developed a framework for high-resolution transmission spectroscopy in narrow passbands inside atomic lines. This framework can be applied on a higher quality data, for achieving more robust exoplanetary signals at higher confidence level. 



S. Khalafinejad would like to firstly thank M. Holman for providing the required funding for visiting the Center for Astrophysics (CfA), where we could establish this work.
In addition, we acknowledge Deut­sche For­schungs­ge­mein­schaft (DFG), in the framework of RTG 1351 and MIN faculty of Hamburg University for providing the second part of funding of this project.
C. von Essen acknowledges funding for the Stellar Astrophysics Centre, provided by The Danish National Research Foundation (Grant DNRF106).
We would also like to thank B. Fuhrmeister, S. Czesla, L. Fossati, M. Lindle, M. Guedel, J. Hoeijmakers, F. Yan and N. Espinoza for useful scientific discussions on various topics related to exoplanetray atmospheric studies.
We additionally appreciate the National Collaborative Research Infrastructure Strategy of the Australian Federal Government, who supported the access to the Magellan Telescopes.
We are also grateful to contributors to
Numpy <cit.>,
SciPy <cit.>,
Matplotlib <cit.>,
the Python Programming Language, and the free and open-source
community. Finally, we thank the anonymous referee for the useful comments which resulted in improvement of the contents of the paper.











§ TRANSMISSION SPECTRA AROUND H_Α AND CA II IRT 


We confirm that the source of the variations in H_α and Ca II IRT lines is stellar activity and not the exoplanetary extended atmosphere. In Fig. <ref>, we show the transmission spectra in the stellar rest frame related to the H_α and one of the Ca II IRT lines. The other two Ca II IRT lines behave similarly.



In the H_α region (Fig. <ref>-left), the residuals are clean cosmic rays and telluric contamination are already removed. The strongest variation clearly occurs in the line center, and in the stellar rest frame as opposed to the planetary rest frame. We attribute this evolution to stellar activity. The IRT lines show a similar behaviour (see e.g., Fig. <ref>-right). 








§ MCMC COMPLEMENTARY FIGURES


A sample of the MCMC posterior distribution in the excess light curve modeling is shown in Fig. <ref>.



