Into the UV: A precise transmission spectrum of HAT-P-41b using Hubble's WFC3/UVIS G280 grism

The ultraviolet-visible wavelength range holds critical spectral diagnostics for the chemistry and physics at work in planetary atmospheres. To date, exoplanet time-series atmospheric characterization studies have relied on several combinations of modes on Hubble's STIS/COS instruments to access this wavelength regime. Here for the first time, we apply the Hubble WFC3/UVIS G280 grism mode to obtain exoplanet spectroscopy from 200-800 nm in a single observation. We test the G280 grism mode on the hot Jupiter HAT-P-41b over two consecutive transits to determine its viability for exoplanet atmospheric characterization. We obtain a broadband transit depth precision of 29-33ppm and a precision of on average 200ppm in 10nm spectroscopic bins. Spectral information from the G280 grism can be extracted from both the positive and negative first order spectra, resulting in a 60% increase in the measurable flux. Additionally, the first HST orbit can be fully utilized in the time-series analysis. We present detailed extraction and reduction methods for use by future investigations with this mode, testing multiple techniques. We find the results fully consistent with STIS measurements of HAT-P-41b from 310-800 nm, with the G280 results representing a more observationally efficient and precise spectrum. We fit HAT-P-41b's transmission spectrum with a forward model at Teq=2091K, high metallicity, and significant scattering and cloud opacity. With these first of their kind observations, we demonstrate that WFC3/UVIS G280 is a powerful new tool to obtain UV-optical spectra of exoplanet atmospheres, adding to the UV legacy of Hubble and complementing future observations with the James Webb Space Telescope.


INTRODUCTION
The characterization of planetary atmospheres in the solar system and beyond has long leveraged the ultraviolet (UV) to near-infrared (NIR) spectroscopic capabilities of the Hubble Space Telescope (HST). Observations with HST have been critical in the exploration of the chemical composition, climate, and aerosol properties of exoplanet atmospheres (see Kreidberg et al. 2018, and references therein). With the help of HST we now know that clouds and hazes are likely present in all types of exoplanetary atmospheres (e.g. Marley et al. 2013;Helling 2019;Wakeford et al. 2019), but we currently lack information related to their abundances, physical properties and extent throughout the atmosphere. We also know that exoplanets exhibit extended upper atmospheres with evidence for atmospheric escape (e.g. Ehrenreich et al. 2014;Bourrier et al. 2018;Sing et al. 2019), but struggle to connect physical processes in the lower and upper portions of exoplanet atmospheres.
The UV through optical (200-800 nm) spectra of planets hold rich information about the chemistry and physics at work across a broad range of atmospheric pressures. In the solar system, UV and near-UV spectroscopy has been critical in identifying and measuring the abundances of a variety of hydrocarbon and sulfurbearing species, produced via photochemical mechanisms, as well as oxygen and ozone and more. For exoplanets, UV to near-UV spectroscopy has been especially useful for constraining aerosol properties and exploring atmospheric chemistry in hot (>1000 K) atmospheres (e.g. Sing et al. 2016;Evans et al. 2018). To date, only a handful of exoplanets have been probed in the critical 200-400 nm wavelength range that crosses the optical to UV boundary. Results from these studies have been mixed, limited by the wavelength coverage and sensitivity of the workhorse instrument for such studies, HSTs Space Telescope Imaging Spectrograph (STIS) G430L and E230M gratings.
It is important to remember that none of HST's instruments or modes were specifically designed to support exoplanet observations. It has only been through the development of new observational strategies, such as spatial scanning (McCullough & MacKenty 2012;McCullough et al. 2014), and data reduction techniques that the potential for HST to probe exoplanet atmospheres has been achieved. In general, slitless spectroscopic observing modes have been preferred for high-precision time-series observations of exoplanets that transit, pass in front of, their host stars because they typically offer more throughput and temporal stability. The slitless spectroscopy capabilities HST's Wide Field Camera 3 (WFC3) have been heavily used by the exoplanet community at infrared wavelengths (750-1800 nm) with the G102 and G141 grisms. However, HST's WFC3 UV/Visible (UVIS) channel also offers slitless spectroscopy in the UV through visible (200-800 nm) wavelength range that has yet to be leveraged for exoplanet observations. In fact, this mode has only been employed in a handful of scientific investigations, first used as part of HST WFC3 early release science programs in cycle 16 (2006), however, none of the G280 work was published from this study.
Here we detail for the first time the observations, spectral extraction, and analysis processes taken to apply Hubble's WFC3/UVIS G280 spectroscopic grism to transiting exoplanet observations. We first introduce the challenges in using the UVIS G280 grism in §2. In §3 we detail the observations and spectral extraction procedures used. We then detail the broadband time-series analysis using two systematic reduction techniques in §4. We use Spitzer transit observations to refine system parameters and update the orbital ephemeris in §4.1 and 4.2. We outline the spectroscopic analysis in §5 and discuss the results in §6 including searching for evidence of atmospheric escape and comparisons to STIS data. We then conclude with a summary of our results and the potential of WFC3/UVIS G280 for future exoplanet investigations.

INTRODUCTION TO THE UVIS G280 GRISM
The WFC3 instrument on HST is fitted with two channels, UVIS and IR. Across these two channels are three slitless spectroscopic grisms: G280 in UVIS and G102 and G141 in the IR channel. The IR grisms have been extensively applied to exoplanet atmospheric studies with increasing success at the advent of spatial scanning (McCullough & MacKenty 2012), where HST slews in the cross-dispersion direction to spread the target light over a column of pixels (e.g., Deming et al. 2013;Kreidberg et al. 2014;Wakeford et al. 2013Wakeford et al. , 2016de Wit et al. 2016). However, the UVIS G280 grism has not had such usage despite large throughput in the near-UV (NUV) and wide coverage from 200-800 nm. More commonly, studies that cover 300-900 nm are conducted with multiple observations using HST's STIS G430L and G750L low resolution gratings from 300-550 nm and 500-900 nm respectively (e.g., Nikolov et al. 2014;Sing et al. 2016;Lothringer et al. 2018) despite their comparatively low throughput (Fig. 1).
The UVIS grism, however, comes with several quirks that make it difficult to observe with and challenging to analyze. A number of these challenges will also affect observations with James Webb Space Telescope's (JWST) spectroscopic instrument modes. Therefore, WFC3/UVIS G280 is a current working example of the challenges that will be faced with JWST. Here we detail each of the challenges associated with WFC3's UVIS grism and also the advantages it has over other instrument modes in the NUV to optical wavelengths.

Challenges
We detail some of the challenges encountered with this dataset and those expected in the general use of this instrument mode for exoplanet time-series characterisation.
-Curved spectral trace: The trace for spectral order with the G280 grism is strongly curved at shorter wavelengths. The trace is best fit with a 6th order polynomial function detailed by Pirzkal et al. (2017) and section 3. This curvature causes it to be offset in the cross-dispersion direction from the 0th order position, meaning subarray sizes need to be carefully chosen. Unlike the IR grisms, the spectra should not be spatially scanned as this would result in overlapping wavelength regions along the scan direction.
The curved spectral trace also introduces a non-linear wavelength solution, meaning each pixel has a slightly different wavelength range than the surrounding pixels in that column. The wavelength solution is therefore extracted relative to the fitted trace position on the detector with a 6th order polynomial.
-Multiple overlapping orders: Additional spectral orders, both positive and negative, overlap with the first order spectra at wavelengths greater than 550 nm. In many cases these additional orders will be much dimmer than the first order spectrum and not impact the observations. However, for stars bright in the NUV such as O,B,A stars the additional spectral orders may impact the spectral extraction.
In the presented case, the second order spectrum is ≈ 65× dimmer than the primary spectrum in both positive and negative orders. This would negligibly contribute to the measured transit depths causing the measured planetary radius (R m ) to be ≈ 99.24% of the true planetary radius (R) following, (1) -Geometric distortion: Using the grism filters causes the spectra to be offset spatially in the detector relative to their direct image X and Y coordinates. For the UVIS array the offset varies as a function of the position due to geometric distortion (Rothberg et al. 2011). The relationship between the coordinates in x and y pixel position also needs to be taken into account when planning the observations in X and Y arcsecond coordinates (see WFC3 data handbook for conversion functions 1 ).
-Orientation constraints: The spectral trace of the positive and negative orders extend across over 500 pixels each depending on the brightness of the target. In a crowded field or where a target is part of a visual binary system, tight orient constraints need to be placed on the observations to prevent contamination from nearby stars. This is often mitigated in WFC3/IR grism observations using spatial scans where the spectra can be extracted by differencing the individual nondestructive reads within the final science frame. However, as WFC3/UVIS grism observations can only be 1 WFC3 Data Handbook Appendix C.2 conducted in stare mode, up-the-ramp sampling cannot be used to recover overlapping spectra.
-Cosmic rays: The large wavelength coverage that extends significantly into the blue wavelengths increases the number of detected comic rays compared to the IR detectors.
-JWST challenges: For JWST a number of the instrument modes that will be utilized for exoplanet timeseries data exhibit curved spectral traces, overlapping spectral orders, and contamination constraints from additional sources on the sky. NIRISS SOSS mode is most similar to the G280 grism with both strongly curved spectral traces and overlapping spectral orders. It is also expected that NIRSpec Bright Object Time Series observations will also have a slightly curved trace. For all slitless modes on JWST used for exoplanet time series observations contamination overlap will need to be carefully considered and orientation constrained carefully sampled.

Advantages
While we have detailed many challenges there are also significant advantages to this instrument over other modes in the NUV and optical. We detail these here.
-Wide wavelength coverage: observations are conducted over the whole wavelength range 200-800 nm in a single exposure. Low resolution spectra across this wide wavelength range can address the two main exoplanet science points revealed by HST observations; cloud opacities and atmospheric escape. The G280 grism can measure both the lower atmosphere sensitive to aerosol scattering, while large atmospheric escape signatures can be detectable in narrow bands around strong Fe and Mg signatures at <300 nm.
-Multiple spectral orders: both the positive and negative orders are measured in each exposure. The UVIS CCD is split into two chips (1 & 2), with each chip of 2051×2048 pixels easily encompassing both spectral orders which each cover ≈500 pixels in the dispersion direction. In the presented observations we use chip 2 as it has been shown to be more stable than chip 1. We therefore also recommend the use of chip 2 for future studies.
-Throughput: WFC3/UVIS has the highest throughput amongst all HST instruments in the wavelength range from its lower cut off at 200 nm to the upper end at ∼800 nm. The throughput of UVIS G280 in the NUV is on average 25 times that of STIS E230M between 200-400 nm, and roughly four times that of STIS G430L at 350 nm. UVIS G280 also has the advantage of being able to measure both positive and negative spectral orders that have a combined throughput greater than STIS G430L across the whole wavelength range (see Fig. 1).
-New calibration program: Prior to these observations there have been three instrument science reports (Kuntschner et al. 2009;Rothberg et al. 2011;Pirzkal et al. 2017) and no scientific papers using this grism. As demand for time-series observations with this grism have increased there are now new calibration programs being implemented to better characterize the detector and improve the trace fitting for all spectral orders. Calibration of the instrument and mode are important to understand the structure of the CCD, on-sky changes in the PSF, and wavelength dispersion across the detector -especially under the requirements of long term stability for exoplanet investigations that span multiple HST orbits.
Overall the WFC3/UVIS G280 grism has many challenges that are difficult but not impossible to overcome, and a significant advantage over other instrument modes in this wavelength range. In the following sections we detail the observations taken and the measurements made with the tools to overcome these challenges.

UVIS G280 OBSERVATIONS
We used HST's WFC3/UVIS channel with the G280 spectroscopic slitless grism to observe the spectrum of the transiting exoplanet host star HAT-P-41 from 200-800 nm (GO-15288, PIs D.K. Sing & N.K. Lewis). Unlike the WFC3/IR G102 and G141 grisms, the UVIS G280 grism produces a spectrum that is strongly curved, with overlapping spectral orders at longer wavelengths, and a dimmer (∼60%) -1 order spectrum compared to the +1 order. We designed an observation strategy that would cover both +1 and -1 orders simultaneously to examine this difference in flux and test the usability of the G280 grism for time-series exoplanet studies.
We observed the target HAT-P-41, in the constellation of Altair, over two visits, each consisting of five HST orbits, to measure the transit of the hot Jupiter exoplanet HAT-P-41b. The two visits were separated by a single planetary orbital period (visit 1: 2018 August 1st; visit 2: 2018 August 4th, period = 2.694047 days), significantly reducing the potential impact of any stellar variations on the transits of this quiet F6 star.
Each visit consists of 54 exposures, over 5 HST orbits, with exposure times of 190 seconds. We used a 2100 × 800 sub-array, with a POS TARG Y offset of -50" to center the spectrum on chip 2. The sub-array is cut out of the full 2051 × 4096 pixel CCD which contains chip 1 and 2, where chip 1 and chip 2 are separated by 1.2". Our target star, HAT-P-41, has a nearby companion separated by 3.615", equivalent to ≈ 91.5 pixels on the detector. The nearby companion resulted in a number of tight orientation constraints on the observation. However, our sub-array is large enough to capture both full +1 and -1 spectral orders around the 0th order trace. The maximum flux obtained in a single pixel in the spectral trace is ≈ 36,000 e − , keeping it well within the saturation and non-linearity limit of the detector, which is approximately 67,000-72,000 e − (Gilliland et al. 2010).

Spectral Extraction
The spectral traces for both visits and both +1 and -1 orders were extracted using calibration files provided by the WFC3 team. A complete extraction and reduction of the provided data requires the following steps: a) cosmic ray removal b) background subtraction c) aperture determination, and d) trace fitting We then use the WFC3 UVIS calibration files to compute the wavelength solution for each spectral order. We also performed spectral extraction with IRAF and custom IDL routines as a second check on the extraction procedure as this is the first published analysis of G280 grism data for timeseries spectroscopy (see 3.1.1 for details).
Cosmic ray removal -We use the "flt" files from the Calwfc3 pipeline to analyze each exposure. Cosmic rays were then rejected by examining the time series for each pixel, and flagging and replacing 3.5-σ outliers in an iterative process. We also applied a further spatial cosmic ray cleaning step by rejecting cosmic rays through Laplacian Edge Detection (van Dokkum 2001). We do a final cosmic ray cleaning on the extracted 1D stel- Background Count (e ) Visit 1 Visit 2 Figure 2. Modal background count for each exposure in visit 1 (solid) and visit 2 (dashed) across the whole subarray. The dotted vertical lines indicate the start of a new HST orbit. The background is higher at the start of each HST orbit with a bi-model distribution, perhaps due to stray Earthshine or orbital effects on the telescope. lar spectra by comparing them to the median combined spectra and replacing outliers which deviated by more than 3.5 σ. Where cosmic rays are flagged temporally we replace the pixel value with a median of the time sampled pixel, where cosmic rays are spatially flagged a median of the surrounding pixels in the same frame is used.
Background subtraction -We use the local background estimation, similar to WISE (see section 4.4 c Cutri et al. 2012 2 ), by computing the pixel mode for each image and subtracting that from each pixel. The mode, or most common binned histogram value, tends to be robust against the bright tail of the distribution that is caused by other stars and cosmic-ray (or hot) pixels in the exposure. We compared this to the mean and median sigma clipped pixel values and found good agreement, giving weight to the mode being resistant to outliers. In each visit the first exposure of each orbit has much higher background than the other exposures with a slightly bi-modal distribution around the peak of the histogram (see Fig. 2), perhaps due to stray Earthshine or orbital effects on the telescope. We remove the first exposure of each orbit in both visits in the lightcurve analysis. Figure 3 shows the visual difference between the original "flt" images and a cleaned-background-subtracted exposure. We save the cleaned and background subtracted images as fits files to be used for the trace fitting routines. Bottom: cleaned file with cosmic rays and hot pixels removed, and flat fielding applied. In this comparison you can clearly see the difference between the original and cleaned data demonstrating the requirement for accurate and precise treatment of detector artifacts and cosmic ray hits.
Trace fitting -To extract the target spectrum using the provided calibration files for UVIS G280 3 , the subarray image needs to be re-embedded into the full frame (Rothberg et al. 2011). This can be done using the embedsub routine in wfc3tools 4 . This routine also requires the "spt" files be downloaded from the MAST database and contained within the same folder as the cleaned fits files generated from the previous steps.
Direct images of the target were taken with the F300X filter at the start of each visit to provide an accurate location of our target on the detector. Visits 1 and 2 were positioned on the detector within 1 pixel of each other with x, y centroid positions of [2040.8756, 1063.8825] and [2041.0399, 1062.9073] respectively.
Using the description of the spectral trace of the G280 UVIS grism from Pirzkal et al. (2017), we computed the expected location of the trace in each exposure of our G280 datasets. In summary, Pirzkal et al. (2017) compute the trace location as a function of the x-pixel on the detector and a high order 2D polynomial is fit across the trace. The best fit trace is defined by a 6th order polynomial function with a linear 2D field dependence. The reference column for the polynomial fit is chosen to be close to the inflection point of the trace to ensure the best fit to both the highly curved spectrum at short wavelengths and the near-linear trace at longer wavelengths. The polynomial function reproduces the position of both the +1 and -1 spectral orders to within  a fraction of a pixel from 200-800 nm. Figure 4 shows the central trace position for both visits and computed for the +1 and -1 spectral orders. The trace fits are currently best calibrated to the +1 order, however, the authors note that there is a new WFC3/UVIS G280 calibration program that will fully characterize the -1 and additional spectral orders. At longer wavelengths, toward the tail end of the spectral trace, fringing effects come into play that divert the spectra from the fit polynomial trace (see Fig. 5).
A simple extraction of the spectrum contained in each dataset was created by adding up the observed count rates in pixels above and below the computed location of the trace. We tested apertures ranging from ±5 pixels around the central trace to ±50 pixels. To determine the best aperture we minimized the standard deviation of the residuals for out-of-transit counts. We find that the optimal aperture is ±12 pixels (see Fig. 4), to account for the slightly extended wings of the trace (Kuntschner et al. 2009). Both the +1 and -1 spectra orders were processed in this manner.
The overlapping spectral orders are expected to impact the spectrum in the long wavelengths approximately beyond 400 nm. However, these observations were not ideal to show the impact of overlapping spectral orders as the brightness of the star in the shorter wavelengths is too dim, ≈65× dimmer than the first order trace. We discuss potential corrections to this in more detail in § 5.
Wavelength solution -The wavelength solution is calculated from the trace position using the equation detailed in Pirzkal et al. (2017) which is calibrated from 190 to 800 nm. The extracted wavelength solution is good to +/-0.7 nm which is roughly half of a UVIS resolution element. We measure the mean spectral dispersion in the first order which varies from ∼1.1-1.6 nm per pixel over the full spectral range 200-800 nm.
We plot the stellar spectra for both visits and first order spectra in Fig. 5, showing the 16-84 percentile range of each spectrum with remarkable agreement between visits, demonstrating the stability of the instrument. Beyond 800 nm the target spectrum shows extreme fringing effects and is not calibrated, thus we remove it from this analysis. It is also clear to see that the -1 order is significantly dimmer across the whole wavelength range with a large impact on the short wavelengths, short of 250 nm, where the flux drops to nearzero.

IRAF APALL Spectral Extraction
We also performed spectral extraction with IRAF and custom IDL routines. The images were first background 200 300 400 500 600 700 800 900 Wavelength ( Flux (e /s) Visit 1, +1 Visit 2, +1 Visit 1, -1 Visit 2, -1 Figure 5. The 16-84 percentile range of each visit and orders spectral trace. The +1 orders and -1 orders overlap closely, making it difficult to tell the two visits apart and demonstrating the stability of the instrument and the star.
The -1 orders are ∼50% dimmer than the +1 orders, with little to no flux short of 250 nm. Above 800 nm fringing patterns can clearly be seen in the stellar spectra and we do not use these wavelengths for the lightcurve analysis.
subtracted and cosmic rays were removed in the same way as detailed above. We then used IRAF's APALL routine to extract the spectra for each image in the time series, finding an 8 th order legendre polynomial was optimal for the spectral trace extraction as measured by the trace root mean square residuals. We note that with IRAF, the fixed aperture center varies smoothly to follow changes in the position of the spectrum across the dispersion axis and partial pixels are used at the ends. We extracted the spectra with a wide range of aperture sizes, finding a 24 pixel aperture was optimal. Similar to the UVIS calibration pipeline routines, the extracted spectra still exhibited a few cosmic rays not cleaned in previous processes, we also then perform the 1D stellar spectra cosmic ray removal step. Using IRAF APALL we were unable to replicate the wavelength solution calculation and therefore used the one calculated following Pirzkal et al. (2017) that required the trace fitting following the UVIS calibration pipeline.
Both spectral extraction techniques produce near identical stellar spectra and transmission spectra. However, in the following sections we adopt and present the analysis based on the spectra extracted using the UVIS calibration pipeline as it is widely accessible, publicly available extraction method that does not rely on proprietary custom routines, and has a fully consistent wavelength solution.

BROADBAND WHITE-LIGHT ANALYSIS
Prior to measuring the transmission spectrum of HAT-P-41b, we first analyze the broadband white lightcurve from 200-800 nm. In this section we detail the analysis of the broadband whitelight transit depth measured in the UVIS G280 transits for each visit and spectral order based on two different systematic treatment methodsinstrument systematic marginalization ) and jitter decorrelation (Sing et al. 2019).
Instrument systematic marginalization -uses a pseudo-stochastic grid of corrective systematic models to measure the desired lightcurve parameters, namely the transit depth, via an evidence-based weight assigned by the data to each potential systematic model. We run a grid of 50 systematic models in the form of an extended polynomial; where φ t is the planetary phase representing a linear slope over the whole visit, φ HST is the HST orbital phase accounting for "HST thermal breathing" effects, and δ λ is the positional shift in the wavelength direction on the detector over the visit. Each of these parameters have scaling factors with the linear slope defined by t 1 , and "HST breathing" and positional shifts fit up to a 4th order polynomial function defined by p 1−n and l 1−n , respectively. Each of the scaling parameters are then either fit as free parameters to activate the systematic model or fixed to zero. The whole grid of 50 systematic models used in this analysis can be found in Table 2 of Wakeford et al. (2016) note the table is 0 indexed. We approximate the evidence (marginal likelihood) of each systematic model fit to the data using the Akaike Information Criterion (AIC). We then calculate the evidence-based weight (W q ) across all 50 systematic models and use the information from all models to marginalize over the desired parameter (α q ).
Equation (15) of Wakeford et al. (2016), where N q is the number of models fit, and α m is the resulting marginalized parameter. The uncertainty is then calculated in a similar way based on the weights (see Equation (16)    Plotting on a logarithmic scale reveals HAT-P-41's faint, nearby companion at pixel position (12,15). We limit our photometry aperture size to 2.25 pixels to minimize contamination from the companion. Bad pixels are masked in white.
well as several jitter vectors. The full systematics model, S(x), used to detrend the lightcurve is written as, HST + p 6 δ λ + p 7 X psf + p 8 Y psf + p 9 RA + p 10 DEC + p 11 V n roll + p 12 V t roll + 1, (4) where φ t is a linear baseline time trend, φ HST is the 96 minute HST orbital phase, X psf and Y psf are the detector positions of the PSF as measured by the spectral trace, δ λ is the wavelength shift of each spectra as measured by cross-correlation, V 2 roll and V 3 roll are roll of the telescope along the V2 and V3 axis, RA and DEC are the right ascension and declination of the aperture reference, and p 1..12 are the fit systematic parameter coefficients. The first portion of this function was found to be the best functional form of the additional systematic features and corresponds to one of the models used in the marginalization grid. This function is then fit for all transit lightcurves in this form and is not marginalized over to determine the optimal functional form in each lightcurve. The full jitter decorrelation set results in up to twelve total terms used to describe the instrument systematics of the dataset in question. However, in practice not all of these parameters are needed. For each visit and each of the two orders, we used the AIC and measured red noise, σ r , to determine the optimal optical state vectors to include from the full set without over-fitting the data and minimizing the red noise.
Both systematic marginalization and jitter decorrelation require a measurement of the spectral positional changes on the detector across the duration of the observation (δ λ ). To calculate the shift, we cross-correlate the 1D stellar spectra to a template spectrum and measure the displacement across the whole wavelength range. To demonstrate that this accurately represents the physical shift on the detector, we measured the position for three background sources distributed across the exposure image. We selected the most Gaussian-like sources from the full image and used a 2D-Gaussian fit to their 0th order spectrum in each exposure of each visit. In this case we cannot use the 0th order of the target or its stellar companion to measure this shift as they are both saturated on the detector. Figure 6 shows δ λ for visits 1 and 2 measured using the cross-correlation method (Cc) and the range of positional values measured from the three background sources (stars). The form of the positional shifts are very similar with the vertical breaks showing where the telescope is reset after each HST orbit. The magnitude of the positional shifts is on the sub-pixel scale and is easily accounted for with either of the systematic treatments detailed. Using the 2D-Gaussian fit to the background sources, we find that positional shifts in the y-direction are negligible and do not improve the fit to the data.
Due to the phase coverage of HST observations, resulting from Earth occultation events, we are unable to accurately fit for the inclination, a/R * , and orbital pe-riod of the system. Unfortunately, HAT-P-41b was not observed by the Transiting Exoplanet Survey Satellite (TESS) which would have allowed us to easily constrain the system parameters. To fit for these vital parameters we instead use two transit observations from the Spitzer Space Telescope IRAC instrument to obtain accurate system parameters for the inclination and a/R * of HAT-P-41b, detailed in §4.1. In §4.2 we present the measured center of transit times for these and previous transit observations of HAT-P-41b to determine the period of the planet, and in §4.3 we present the results of the UVIS G280 broadband lightcurves for the two visits and for each spectroscopic order using both systematic treatments.

Spitzer Data Analysis
Spitzer program 13044 (PI: Deming) acquired transit observations of HAT-P-41b at 3.6 and 4.5 µm on 2017 January 18 and 2017 February 3, respectively. The IRAC instrument (Fazio et al. 2004) acquired 32×32 pixel subarray frames at 2 second intervals in batches of 64. Each observation acquired a total of 21,632 frames over a span of ∼12 hours.
Using the POET pipeline (Stevenson et al. 2012a;Cubillos et al. 2013), we apply a double-iteration, 4σ outlier rejection routine, 2D Gaussian centroiding, and 5× interpolated aperture photometry over a range of aperture sizes. We convert times to BJD TDB using the JPL Horizons interface.
We find that the best aperture size (as defined by the lowest standard deviation of the normalized residuals) is 3.0 pixels; however, at this size there is noticeable contamination from the nearby binary companion. This is evidenced by the correlation between aperture size and transit depth (significant at 3.3σ). HAT-P-41's stellar companion is located ∼ 3 pixels away, in the wings of the primary star's point response function. This is shown in Figure 7, where we depict the mean flux at 3.6 µm on a logarithmic scale. We find that the impact of the stellar companion on the measured transit depth is minimal (< 1σ) for apertures ≤ 2.25 pixels and, thus, adopt this value for our final analyses. We note that the transit time, inclination, and semi-major axis parameters do not vary with our choice of aperture size.
To derive our best-fit values (see Tables 4.1 and 4.2), we fit both Spitzer channels simultaneously using the transit model described by Mandel & Agol (2002), a linear trend in time, and a BLISS map (Stevenson et al. 2012a) to account for intrapixel sensitivity variations. We estimate uncertainties using the Differential-Evolution Markov Chain Monte Carlo technique (ter Braak & Vrugt 2008) and test for convergence using the Gelmin-Rubin statistic (Gelman & Rubin 1992) by ensuring that the potential scale reduction factor is within 1% of unity. Figure 8 shows Spitzer 's normalized light curves and residuals. The best-fit 3.6 and 4.5 µm transit depths are 0.992 ± 0.008 % and 1.028 ± 0.013 %, respectively.

Updated Orbital Ephemeris
We used previous and current data to calculate an up-to-date orbital period for HAT-P-41b, including the ephemeris from the discovery (Hartman et al. 2012), as well as HST and Spitzer transit data (see Table 4.2). The HST data includes the WFC3/UVIS transits where the +1 and -1 orders were treated independently (see §4. 3), as well as WFC3/IR and STIS transits from the Hubble PanCET program (GO-14767, PIs D.K. Sing & M. Lopez-Moralez, Sheppard 2020 in prep -private communication). We converted all of the available transit times to BJD TDB using the tools from (Eastman et al. 2010). These times were fit with a linear function of the period P and transit epoch E, The resulting ephemeris is given in Table 4.2, with the linear function giving a reasonable fit to the data (see Fig. 9), with a χ 2 value of 14.47 for 9 degrees of freedom (DOF).

UVIS G280 Broadband Lightcurve Results
We measure the broadband transit depth for UVIS G280 by summing the flux from 200-800 nm and correcting for systematics via systematic marginalization and jitter decorrelation independently for both visits Spitzer 3.6μm Spitzer 4.5μm Figure 8. Transit light curves of HAT-P-41b using Spitzer 's 3.6 µm (left) and 4.5 µm (right) channels. We bin the data for plotting purposes only. The 3.6 µm residuals demonstrate a small amount of correlated noise at timescales shorter than the transit duration. and both spectral orders. We measure a combined transit depth of all four transit timeseries measurements of (R p /R * ) 2 = 1.0406 ± 0.0029 % and 1.0330 ± 0.0033 %, with an average standard deviation on the residuals of 221 ppm and 281 ppm, using the systematic marginalization and jitter decorrelation methods respectively. There is a 1.7σ difference between the two methods, likely due to the small differences between the uncertainties on each exposure for each analysis method that can be seen by comparing the bottom two panels of Fig. 10.
In each analysis we use the same extracted stellar spectra, the same limb-darkening coefficients derived using the 3D stellar models presented in Magic et al. (2015), and the same system parameters shown in Table 4.1.
We show the four transit lightcurves (2 visits + 2 orders) corrected in Fig. 10. The lightcurves shown have been corrected using the most favored model applied in systematic marginalization, with the underlying models derived from the same most-likely systematic model. For both data analysis methods, systematic marginalization and jitter decorrelation, the transit model is fit iteratively with the systematic model to measure the transit depth. We note that the lightcurves in Fig.10 only represents a portion of the information obtained through marginalization as all the information from corrected data using other weighted systematic models also go into the final marginalized transit depth measurement (contribution weights can be seen in Fig. 11). Using jitter decorrelation, we derive a single solution for the lightcurve corrections and transit depth for each visit and spectral order. The individual lightcurves from jitter decorrelation are indistinguishable by eye compared to the systematic marginalization ones presented here. For a more direct comparison we show the residuals of both systematic analyses at the bottom of Fig. 10 with their related uncertainties, both achieving near photon noise precision.
While jitter decorelation uses a fixed systematic model plus the jitter files directly from the telescope as a main decorelation factor, systematic marginalization derives its information from evidence obtained from an array of independent systematic models. Systematic marginalization therefore accounts for the unknown factors affecting the lightcurves by weighting them according to the reduced data rather than the telescopes fine guidance sensors. Using systematic marginalization we find that each transit and spectral order favors slightly different combinations of systematic corrections. For visit 1 both orders predominantly favor models with a quadratic correction to δ λ , while both orders of visit 2 favor a 3rd order φ HST correction with additional correction for δ λ . Given the similarity in the δ λ trend for each visit and spectral order, as shown in Fig. 6, the more favored correction of the HST breathing in visit 2 suggests that this movement on the detector is likely connected with the thermal effects of the telescope and thus the corrections themselves are interchangeable in this specific case where the structure of the systematic is similar. For each lightcurve there is a marginal preference to correct for a linear trend in time across the whole visit; however, it is slightly more significant in visit 1.

Residuals (ppm)
Systematic marginalisation Jitter decorrelation Figure 10. Top: broadband lightcurves. We show the raw extracted lightcurve for the visit 1 +1 spectral order to demonstrate the stability of the 1st HST orbit in the time series (light grey). The systematic corrected and normalized white lightcurves for each visit and spectroscopic order (colored labeled points) with the best fit transit model. Each point represents a single exposure. Each lightcurve is offset for clarity. Middle: residuals from each ligthcurve fit using the systematic marginalization method. Bottom: residuals for each lightcurve fit using the jitter decorrelation method. We measure the combined transit depth of HAT-P-41b to be (Rp/R * ) 2 = 1.0406 ± 0.0029 % (SDNR = 221 ppm) and 1.0330 ± 0.0033 % (SNDR = 281 ppm), for each method respectively.
This linear trend across the whole visit has been noted in several other HST timeseries observations (e.g., Deming et al. 2013;Sing et al. 2015;Kreidberg et al. 2014;Wakeford et al. 2016), and is thus likely related to the observatory as a whole rather than a specific instrument. For each visit and order we show the weighting assigned to each systematic model in the systematic marginalization reduction for the broadband analysis in Fig.11, these model weights are later applied to the spectroscopic lightcurves. The weights shown correspond to the systematic models shown in Table 2 of Wakeford et al. (2016). The structure of this grid is such that it first loops through polynomials correcting for δ λ , followed by added corrections for φ HST with the second half of the grid (25-49) adding in corrections for φ t . The overall structure of the computed weights shows that the cor-  Figure 11. The evidence-based weight for each systematic model used in instrument systematic marginalization for each visit and order for the broadband lightcurve analysis. The table of systematic models relating to each number can be found in Wakeford et al. (2016).
rections for δ λ are the dominant factor given causing the loop every four models.

SPECTROSCOPIC ANALYSIS
To measure the transit depth as a function of wavelength and produce an atmospheric transmission spectrum for HAT-P-41b, we divide the stellar flux into 10 nm bins (∼5 detector resolution elements) from 200 -800 nm. We note that it is possible to sample the transmission spectrum at a higher resolution (>2 resolution elements) in the most optimal portions of the spectrum where the flux is high; however, we use uniform bins across the whole wavelength range for consistency and accurate comparison.
We analyze each individual spectroscopic lightcurve in the same way, as described in §4 for the broadband lightcurve, using both systematic marginalization and jitter decorrelation methods. In jitter decorrelation, the systematic correction model is unchanged between wavelength bins, thus assuming all systematics are wavelength independent. Using systematic marginalization, we account for any wavelength dependent systematics by running the full grid of systematic models in each spectroscopic lightcurve. We then use the evidence based weights for each of those models measured in the broadband lightcurve (see Fig 11) to marginalize over the measured values for each model in each lightcurve. By fixing the systematic model weighting to those derived from the broad-band analysis, the uncertainty is then more representative of the dominant wavelength independent systematics while incorporating the scatter measured across wavelength dependent systematics being fit to the data.
Each visit and +1/-1 spectral orders were analyzed separately using the parameters detailed in Table 4.1 fixing the period, inclination, and a/R * , and using the center of transit times listed in Table 4.2. Using both jitter decorrelation and systematic marginalization independently, we find consistent results across both visits and spectral orders. Both methods reach photon noise precision in each of the channels determined by calculating the white and red noise associated with the fits (see Pont et al. 2006), and finding a beta value of 1 consistent with no correlated noise. We show the residuals from each of the spectroscopic lightcurves for the systematic marginalization analysis in Fig. 12 as an intensity residual map to show any global structure in the fit. From the residuals it is clear that the -1 order lightcurves are noisier than the +1 orders. There is also an increase in the scatter at the edges of the wavelength regime, with shorter wavelengths dominating the overall noise range associated with the pure count rates measured from the stellar spectrum in each of the bins (see Fig. 5).
In Fig. 13, we present the transmission spectrum measured using both methods for each visit and each +/first order spectrum with the combined transmission spectrum overlaid. We show a direct comparison between the combined transmission spectrum measured using the two systematic treatments in Fig. 14, with 90% of the points overlapping at the 1-σ uncertainty level. A direct comparison between the two methods is best demonstrated by looking at the standard deviation and uncertainty in the transit depth measured across the four transits analyzed (see Fig. 15). It is again evident in the standard deviations and uncertainties that the lower counts measured in the near-UV wavelengths (<300 nm) introduce larger scatter and uncertainty to the transit depths. The standard deviation in the short wavelengths indicates that that derived transit depths in each lightcurve are more similar within the uncertainties using systematic marginalization compared to the Jitter decorrelation method. However, there is added scatter with the marginalization method at longer wavelengths. Both methods have similar uncertainty profiles indicating the ability to analyse these data with multiple methods. The unique contribution of the UV points to the transmission spectrum of an exoplanet atmosphere in combination with the optical from a single observation with this low-resolution grism cannot be overstated.

DISCUSSION
We present HST's WFC3/UVIS G280 grism as a reliable observational mode to measure the transmission spectrum of exoplanet atmospheres from 200-800 nm, critically reaching down to near-UV and optical wave-  lengths not accessible to JWST. This wavelength range is important to understand and measure cloud opacity sources and their scattering profiles that are defined by the particle sizes (e.g., Lecavelier des Etangs et al. 2008;Wakeford et al. 2017), escaping atmospheres (e.g., Ehrenreich et al. 2014;Sing et al. 2019), and absorption from Na.
To test this new mode, we measured the atmosphere of the hot Jupiter HAT-P-41b over the course of two consecutive transits with the WFC3/UVIS G280 grism.
We obtained the positive and negative first order spectra of the target star in each observation and extracted the stellar flux following the methods outlined by the UVIS calibration pipelines (Kuntschner et al. 2009;Rothberg et al. 2011;Pirzkal et al. 2017). We analysed the transit data for each visit and spectral order using two well established techniques, instrument systematic marginalization ) and jitter decorrelation (Sing et al. 2019 Jitter decorrelation Systematic marginalisation Figure 14. Direct comparison of the final combined transmission spectrum for each systematic treatment: jitter decorrelation (dark squares) and systematic marginalization (light circles). The horizontal dashed lines show the measure broadband depth using each method.
Jitter decorrelation Systematic marginalisation Uncertainty Standard deviation Figure 15. The standard deviation between the four individual transmission spectra in each wavelength bin for systematic marginalization (pink) and jitter decorrelation (purple).
the atmosphere of HAT-P-41b. We obtain a precision of 29-33 ppm on the broadband transit depth from 200-800 nm, and an average precision of ≈200 ppm in 10 nm spectroscopic bins.
Comparison to STIS Observations -We compare the transmission spectrum measured of HAT-P-41b with WFC3/UVIS G280 grism to that measured using STIS G430L and G750L gratings. We find that the combination of the two HST observations in the G280 UVIS grism results in resolution and precision exceeding that of STIS, which required the combination of three HST observations to cover the whole wavelength range compared to two for UVIS. Figure 16 shows the transmission spectrum derived using systematic marginalization from two transits with UVIS G280 compared to the transmis-200 300 400 500 600 700 800 900 Wavelength ( Figure 16. Transmission spectrum of HAT-P-41b measured with WFC3/UVIS G280 grism using systematic marginalization combining two HST observations (pink), compared to STIS G430L combined spectra from two HST observations (dark green) and one observation with the HST STIS G750L grating (Sheppard 2020 in prep -private communication). The WFC3/UVIS G280 grism is able to efficiently measure the atmosphere of a transiting exoplanet from 200-800 nm to high precision, matching and exceeding that of STIS.
sion spectrum from three transits with STIS G430L and G750L presented by Sheppard (2020 in prep -private communication).
Assessing the overall use of UVIS G280 over the STIS gratings, there are a number of trade offs to consider. As G280 cannot be scanned and the throughput is much higher it will likely be more difficult to observe bright (Vmag < 7) targets, especially considering the impact of overlapping spectral orders that will make it difficult to extract individual spectral bins at this resolution. Therefore, bright targets will be more efficiently observed with STIS/G430L in particular. Additionally, although UVIS G280 can efficiently measure a wide wavelength range in a single observation it does not extend to wavelengths spanning the potassium absorption line that can only be accurately captured with the STIS G750L grating. However, the extended wavelength coverage into the UV compared to the G430L grism and the comparable resolution means that a potential Na line can be resolved just as easily with UVIS as with STIS but with potentially higher precisions in UVIS. The measured UVIS spectrum far exceeds the resolution and precision over the comparative wavelengths than can be achieved by STIS/G750L (see Fig. 16).
This direct comparison for the same planet demonstrates that the UVIS G280 grism can easily exceed the precision and resolution of STIS in an equivalent number of observations, while being more efficient and requiring less observing time. UVIS G280 also has the advantage of spanning the whole wavelength range in one shot, dramatically reducing the potential impact of stellar activity and systematics which can cause offsets between datasets from different instrument modes. In summary, for targets with Vmag 7 the UVIS G280 grism shows reduced systematics, higher resolution, precision, and wavelength coverage with more efficient observing compared to STIS G430L and G750L gratings.
Searching for Evidence of Atmospheric Escape -The UVIS G280 grism has ideal wavelength coverage to search for signatures of atmospheric escape of the Fe II at 240 nm and 260 nm, and the prominent Mg II doublet at 279.63 nm. A single resolution element for the G280 grism is ∼2 nm which encompasses the whole Mg II doublet absorption line, thus limiting us to strong, low resolution detections. At a single resolution element of the detector, the scatter becomes large and we were unable to converge on a solution to fit the lightcurve systematics. We therefore conducted an analysis of the HAT-P-41b transit data in 4 nm bins (2 resolution elements) across the 230 -290 nm, with individual moving analyses in 10 nm steps to search for excess absorption from escaping ions. In this analysis, we find little sig-nificant evidence for additional absorption by Fe II and Mg II in the atmosphere. In a single 4 nm bin centred at 280 nm we measure additional 0.2% absorption compared to the average transit depth which could potentially correspond to Mg II. However, this absorption is not seen in bins centered 10 nm either side of 280 nm that encompass the peak of the absorption. The scatter is on the order of 0.3% across the whole sampled range. We conducted our search predominantly using the positive spectral orders for each visit as the throughput and flux levels are high enough for the precision needed at these wavelengths. However, for strong signatures such as those seen in WASP-121b (Sing et al. 2019) or KELT-9b (Hoeijmakers et al. 2018), which also orbit bright stars, the absorption signature will likely also be measurable in the negative order spectra as well. We conclude that there is no evidence of significant Fe II and Mg II escaping from the atmosphere of HAT-P-41b based on the precision of these measurements. However, we cannot currently conclude where this places HAT-P-41b in the comparative phase space as more measurements with this mode or similar to that shown in Sing et al. (2019) will be required over a wide temperature phase space to examine the likelihood of detection.
Planetary Specific Model Comparison -We ran each of the transmission spectra including the measured Spitzer transit depths through the planetary specific forward model grid for HAT-P-41b using rainout condensation presented by Goyal et al. (2018Goyal et al. ( , 2019. In each case, the model fits have the same number of degrees of freedom with the only additional fitting parameter being the absolute altitude of the model. For each UVIS G280 spectrum, we trim the first and last two data points that are likely most affected by low flux and fringing, respectively, and append on the Spitzer transit depths. Each transmission spectrum independently favors the same atmospheric model that has: T eq = 2091 K, atmospheric metallicity [M/H] = +2.0, C/O = 0.7, 1100×scattering profile, and uniform cloud opacity = 0.2 (see Fig. 17). We find a χ 2 ν = 1.45 and 1.72 when fitting the most favored model to the jitter decorrelated and marginalized transmission spectrum, respectively.
The model shows prominent TiO/VO features in the near-UV fitting the UVIS G280 data well in the optical with a wavelength dependent slope associated with a scattering opacity source composed of small sub-micron particles. This model predicts a muted H 2 O feature in the near-IR that would be detectable with WFC3's G102 and G141 grisms. The Spitzer IR is dominated by CO 2 that would add additional constraints on the atmospheric metallicity (Moses et al. 2011) and can be validated by JWST NIRSpec observations.

CONCLUSIONS
We present HST's WFC3/UVIS G280 grism as a new and ideal instrument mode for exoplanet time-series characterisation. This is the first time scientific analysis of any observation with this instrument mode has been published. As such, we provide a detailed breakdown of the challenges and advantages of the instrument, detailed instructions on the spectral extraction with reference to data files and programs provided through UVIS calibration files, and a comparative study of two well established systematic reduction methods.
To test the UVIS G280 grism for time-series data, we observed the transit of the hot Jupiter HAT-P-41b over two consecutive transit events. This allowed us to measure the overall stability of the instrument, the precision, and resolution without additional concerns associated with potential stellar activity. We obtained both positive and negative first order spectra from each observations providing four different datasets from 200-800 nm. We analysed each dataset separately before combining the information to produce the final atmospheric trans-mission spectrum of HAT-P-41b. We applied two different extraction and systematic analysis techniques to the data and find them to be statistically similar across the whole transmission spectrum demonstrating the robust and consistent nature of the instrument critical for accurate exoplanet transmission spectral studies.
We measure the complete transmission spectrum of the hot Jupiter HAT-P-41b from 200-800 nm in 10 nm bins and at 3.6 and 4.5 µm with Spitzer's IRAC instrument. In the broadband UVIS lightcurves, we reach a precision of 29-33 ppm, with an average of ≈200 ppm in 10 nm wide spectroscopic channels. The transmission spectrum shows evidence of TiO/VO in the near-UV to optical with significant absorption from CO 2 in the Spitzer 4.5 µm channel. We fit a grid of forward models specifically derived for HAT-P-41b to the transmission spectrum from multiple reduction pipelines and find constant results with a T eq = 2091 K, [M/H] = +2.0, C/O = 0.7, scattering ×1100, and cloud opacity = 0.2 for rainout condensation (see Goyal et al. 2018Goyal et al. , 2019. Additional measurements in the near-IR will further aid the interpretation of this planets atmospheric transmission and will be detailed in future publications. We demonstrate that Hubble's WFC3 UVIS G280 grism is superior to the combination of STIS G430L and G750L gratings for time-series observations in terms of efficiency, precision, and resolution from 300-800 nm for exoplanet time-series observations. Notably the UVIS G280 grism also allows access to wavelengths as short as 200 nm with the potential to measure the escaping atmosphere of giant exoplanets via Fe II and Mg II absorption lines and a broad of range of other atmospheric processes. The wavelength coverage offered by the UVIS G280 grism (200-800 nm) provides a perfect complement to the spectroscopic capabilities of the James Webb Space Telescope (600-14000 nm), which together can probe the full extent of atmospheric processes in exoplanets that closely orbit their host star. Software: POET pipeline (Stevenson et al. 2012b;Cubillos et al. 2013), IRAF (Tody 1986(Tody , 1993, IDL Astronomy user's library (Landsman 1995), NumPy N. Pirzkal provided the UVIS calibration pipeline and knowledge of the instrument. K.B. Stevenson analysed the Spitzer data and helped with discussions on the UVIS analysis. N.K. Lewis aided with the interpretation of the results and providing context for the observations. T.J. Wilson aided in the statistical analysis. All authors provided text and comments for the manuscript. Table 3. Transmission spectrum of HAT-P-41b based on the combined spectrum of +1 and -1 spectral orders over two transt events. for both systematic marginalization and jitter decorrelation  Table 3 continued  * Based on using the +1 order throughput curve and 3D stellar models from Magic et al. (2015) .