The First TESS Self-lensing Pulses: Revisiting KIC 12254688

We report the observations of two self-lensing pulses from KIC 12254688 in Transiting Exoplanet Survey Satellite (TESS) light curves. This system, containing an F2V star and white-dwarf companion, was among the first self-lensing binary systems discovered by the Kepler Space Telescope over the past decade. Each observed pulse occurs when the white dwarf transits in front of its companion star, gravitationally lensing the star’s surface, thus making it appear brighter to a distant observer. These two pulses are the very first self-lensing events discovered in TESS observations. We describe the methods by which the data were acquired and detrended, as well as the best-fit binary parameters deduced from our self-lensing+radial velocity model. We highlight the difficulties of finding new self-lensing systems with TESS, and we discuss the types of self-lensing systems that TESS may be more likely to discover in the future.


INTRODUCTION
Self-lensing binary systems are a subset of eclipsing binary systems in which at least one component is a compact object, such as a white dwarf (WD), neutron star (NS), or black hole (BH).When the compact object transits in front of its (typically noncompact) companion, it gravitationally lenses the companion's surface, resulting in a symmetric flare in the system's light curve (Maeder 1973;Witt & Mao 1994;Marsh 2001; Rahvar et al. 2011;Sorabella et al. 2022a).Self-lensing pulses can be very useful in estimating binary parameters, as the pulse profile depends on the masses of the compact object and star, their separation during the transit, and the orbital inclination of the system.Given that these pulses will occur every time the compact object transits its companion, self-lensing pulses are periodic, thus, they provide a way of also measuring the orbital period of the binary without the need for spectroscopic measurements.The profile of the lensing pulse can also pro-vide information regarding the star being lensed, such as its radius and limb-darkening coefficient.However, studies of self-lensing systems remain scarce, as only five stellar-mass self-lensing systems (and a sixth unconfirmed candidate) have been discovered to date (Kruse & Agol 2014;Kawahara et al. 2018;Masuda et al. 2019).All of these systems were discovered with the Kepler Space Telescope and all were found to be quite similar; each binary system contains a WD that gravitationally lenses a main-sequence companion not too dissimilar to that of our Sun.
As a spiritual successor to the Kepler Space Telescope, the Transiting Exoplanet Survey Satellite (TESS) (Ricker et al. 2010) is a very important tool in the search for new self-lensing pulses.While Kepler had the advantage of obtaining more data for each target, as it was always observing the same patch of sky for 4 years, TESS has the distinct advantage of searching far more area of the sky.TESS images a 24 • × 96 • sector of the sky for 27 days before moving on to another sector.This drastically increases the number of stars observed and the potential for discovery of more self-lensing systems (as well as extrasolar systems).It has been predicted by Wiktorowicz et al. (2021) that TESS could find anywhere from 60-170 self-lensing sources throughout its operational lifetime, increasing the number of known self-lensing systems by a factor of 10-30.Combined with other surveys such as the Zwicky Transient Facility (ZTF) and the upcoming Legacy Survey of Space and Time (LSST), the number of detectable self-lensing systems could be of the same order as the population of X-ray binaries in the Milky Way.
We have begun our own search for new self-lensing pulses in the existing TESS data, although we have yet to find any new systems.Instead, we have found an abundance of asteroids crossing in front of background stars, giving false-positive signals that mimic self-lensing pulses Sorabella et al. (2023).We also checked whether TESS has observed any of the known self-lensing WD systems (Kawahara et al. 2018, hereafter KMM18) at times when new pulses were expected to occur.This search highlighted a disadvantage of TESS observations.As TESS observes a sector for only 27 days, if a binary were to have a much longer orbital period, there would be a much lower probability of observing it at the right time.The four KMM18 self-lensing systems have orbital periods of > 400 days, and three of them were not observed at times when their pulses were anticipated.One system (KIC 12254688), however, was not only observed at the right time, but rather fortuitously, TESS detected two pulses in Sectors 41 and 56, respectively.These pulses mark the first two self-lensing events reported from TESS archival data, despite the fact that KIC 12254688 exhibits by far the smallest of the four self-lensing flares in the Kepler data.
Furthermore, after the end of the primary mission of TESS, the longest-exposure Full Frame Images (FFIs) have cadences of 10 minutes compared to the 30-minute cadence of both the TESS primary mission and Kepler.In the cases of Sectors 41 and 56, the cadence was even lower (see Section 2), implying a signal-to-noise ratio (SNR) much lower than that achieved in the original Kepler detection of the KIC 12254688 pulse (KMM18).While the low SNR complicated the extraction of the TESS pulses, we were still able to identify them and measure them in the noisy light curves of both sectors.
In Section 2, we detail the methods by which we acquired, detrended, binned, and folded the two light curves from Sectors 41 and 56.In Section 3, we describe the methodology and the results of fitting our selflensing model to the folded TESS pulse of KIC 12254688 before comparing our best-fit model parameters to those obtained by KMM18 and to those our model produced from the original Kepler data set.In Section 4, we discuss the implications of this type of modeling, includ- ing the difficulties in discovering such lensing events in TESS data.In Section 5, we summarize this work and our conclusions.

ACQUIRING AND DETRENDING THE PULSES
Light curves for Sectors 41 and 56 were acquired using the Python-based time series analysis package Lightkurve (Cardoso et al. 2018).Specifically, we used Lightkurve's integrated TESScut (Brasseur et al. 2019) function search tesscut to get the data products for both sectors.The individual frame exposure times for Sectors 41 and 56 were 475 and 158 seconds, respectively.
We used different methods to remove TESS systematics from the two light curves.For sector 41, we used Lightkurve's integrated Cotrending Basis Vectors function known as CBVCorrector, which removes systematic noise.Due to unknown errors from CBVCorrector when applied to Sector 56, we relied instead on Lightkurve's RegressionCorrector function in this sector.RegressionCorrector removes scattered light background and spacecraft motion from TESS light curves using linear regression with a design matrix constructed from the regressors.
The detrended light curves are shown in Figure 1.One may notice that the pulses are not inherently visible in these detrended light curves (particularly in Sector 56), as the expected magnification from the lensing events (about 1.0005 in relative flux) is completely washed out by the noise intrinsic to each light curve.
In hopes of extracting the pulses from these light curves, we binned each data set with the number of bins chosen to best reveal the pulses.For Sector 41, this ended up being 11 data points per bin, while for Sector 56, we assigned 45 points per bin.Sector 56 has a small downward trend to the right of the pulse that we subsequently remove using a second-order polynomial fit, in which we exclude the pulse itself.
calculated using the error of the mean in each bin.The resulting light curves are shown in Figure 2. At times 2424.734BTJD and 2843.449BTJD pulse shape profiles now appear in the data.We note that we used only the second half of Sector 56 data, in which the pulse was projected to appear.A downward trend in seen throughout this light curve.As this trend is not explained by self-lensing or any other relevant effect (e.g., Dopplerboosting kinematics or ellipsoidal variations due to tidal forces), we removed it by applying a second-order polynomial fit to the data on the sides of the pulse, after excluding the pulse itself.This flattened the light curve on the sides, leaving only the pulse shape centered at 2843.449 BTJD to rise above the flat background.We normalized the light curves about the means of their respective data sets, excluding the pulses in both sets.We then folded the two light curves using the orbital period from KMM18 (418.715days), combining the two pulses into one better-sampled pulse.Still, this combined TESS pulse shows much more variation than the original Kepler pulse due to the worse SNR in the TESS light curves.This fact inexorably leads to the question of whether a self-lensing model fitted to these TESS data would return best-fit parameters similar to those determined by KMM18 from the Kepler light curve of KIC 12254688.

FITTING THE FOLDED PULSE
As described in Sorabella et al. (2022b), we use our post-Newtonian orbital motion code derived from the Paczynski-Wiita potential to find the velocities and bi-nary separation of the two stars in time.In this modeling effort, we exclude additional effects analyzed in Sorabella et al. (2022a), such as relativistic Doppler boosting and ellipsoidal variations.While these effects are expected in some stellar-compact binary systems, they become significant only in systems with shorter orbital periods (smaller separations) than that of KIC 1225488 (Masuda & Hotokezaka 2019).

Basic Equations
The magnification caused by a self-lensing event (e.g., Paczyński 1986;Witt & Mao 1994;Marsh 2001; Lee et al. 2009;D'Orazio & Di Stefano 2018) depends mainly on (a) ρ ⋆ (t), the time-dependent ratio between the radius of the star and the Einstein radius of the lens R E (t), and (b) u(t), the time-dependent projected separation between the lens and the source, expressed in units of the Einstein radius.The ratio ρ ⋆ is given by where R ⋆ is the radius of the source, and the Einstein radius is given by where G is the gravitational constant, M is the mass of the compact object, c is the speed of light, d(t) is the time-dependent separation between the binary components, and i is the inclination of the binary orbit to the plane of the sky (note that i ≈ 90 • for self-lensing binary systems).The projected separation in units of R E is determined as a function of time (Rahvar et al. 2011) by where t 0 is the time of closest projected approach and is the impact parameter in units of R E (Wiktorowicz et al. 2021) at t = t 0 , and ψ is the inclination of the source relative to the observer-lens line-of-sight (so the orbital inclination is i = 90 • − ψ).The Einstein time t E represents the time it takes for the lens to move across the length of its Einstein radius R E .Finally, the time-dependent magnification A(t) is expressed in terms of u(t) and ρ ⋆ by the equation (Hamolli et al. 2015) where polar coordinates (r, θ) are set on the projected surface of the star, and The function S(r) represents the brightness profile of the source, for which we adopted the linear limb-darkening relation of Hamolli et al. (2015) and Han (2016), viz.
where Γ is the linear limb-darkening coefficient.

EMCEE Modeling
To fit our model to the data set, we use EMCEE (Foreman-Mackey et al. 2013), the Python implementation of the Affine Invariant Markov chain Monte Carlo Ensemble sampler (Goodman & Weare 2010).The EM-CEE code accepts an input parameter set {x i } and maximizes the log-likelihood function where y n are the light-curve data points, σ n are the summations of the photometric error at each point and additional jitter in the data that the model doesn't account for (f LC ), and m n are the model's points given set {x i }.This is accomplished by the Python module scipy.optimize(Van Rossum & Drake 1995) which returns the most likely {x i } values, but not their uncertainties.These are obtained from the posterior probability distribution which is derived from P (y|{x i }, σ n ) and a predetermined prior function P (m n ), viz.
The prior allows one to encode any prior information concerning the free parameters, and thus to preclude nonphysical results.
In order to compare our results with those obtained by KMM18, we also fit our model to the phase-folded selflensing pulses originally observed by the Kepler Space Telescope.As fitting to self-lensing pulses on their own can prove difficult given the degeneracies between parameters such as white dwarf mass and stellar radius, we decided to do a joint fit of the self-lensing data and radial velocity data of the system in similar fashion to KMM18.The radial velocity (RV) data is as reported in Masuda et al. (2020), which was collected from the Tillinghast Reflector Echelle Spectrograph (TRES), while the RV model we use is calculated from the projected 2D velocity components of the star as found by our post-Newtonian orbital motion code.This data set is an updated version of the one found in KMM18 and covers nearly a full orbit of the system.It is also worth noting that these are relative radial velocities, where the motion of the binary system's barycenter is compared relative to another in the sample (whose RV is set to zero).As such, we included a radial velocity offset term RV 0 , to shift the RV curve to account for this relative motion.
As the initial conditions of our orbital motion code set the binary components at apoapsis, an additional parameter we dubbed the time offset (t i ) is included in our modeling to shift their orbital position in time to match the starting point of the radial velocity and light curve data.This joint fit method was done for both the Kepler and TESS light curves and was accomplished by maximizing the summation of the likelihood functions of the self-lensing and radial velocity models.As it is a combination of two models, we added an additional jitter term, specific to the radial velocity model (f RV ).

Priors
In the self-lensing models of KIC 12254688, the prior function allows us to constrain EMCEE by the known properties of the free parameters adopted in this study: (a) ranges for the mass and the radius of the primary star based on spectroscopic results (KIC DR25, Mathur et al. 2017), (b) a plausible range for the mass of the white dwarf companion (Figures 1, 3, 6 in Kepler et al. 2007), (c) a range for the orbital inclination (Figure 8 in Sorabella et al. 2022a), and (d) the range for the limbdarkening coefficient, which is set to (0, 1) by its definition.The priors for the RV model are based closely on those used by KMM18 while the parameters not found in the KMM18 (or were derived parameters) were given, within in reason, wide priors.

Best-Fit Models
Our model fits to the TESS and Kepler pulses and their corresponding RV fits are show in Figure 3, while the best-fit parameters are listed in Table 1.The corresponding corner plots of the posterior distributions are shown in Appendix A. Following standard practices, parameter values and their 1σ errors were obtained from the 16, 50, and 84 percentiles of the posterior distributions.The thickness of each orange curve in Figure 3 represents the 95% confidence interval, as this was determined from 95% of the walker chains chosen randomly from the set of all walkers.The 50 th percentile estimates are shown as the dark gray line.
While our model possesses some differences with that of the KMM18 model, our best-fit parameter values from the Kepler data set are, in general, very consistent with the original results of KMM18 (last column in Table 1).The parameters that showed a significant difference (> 1σ) compared with the KMM18 results were that of the radial velocity offset and the light curve jitter.The difference in the RV offset is undoubtedly a consequence of using the updated data from Masuda et al. (2020), which reported RV 0 = 7.49 +0.2 −0.3 , very much in line with our estimation.As for the light curve jitter, this could easily stem from a difference in methodology in phase folding and binning the Kepler data.In both cases, the estimated jitter in the light curve is very small (about a 0.01% relative flux).
The results for the TESS fit were largely the same as the Kepler fit, though with greater uncertainties for most parameters.However, there were a couple of parameter estimates that showed significant difference compared to the KMM18 results (light curve jitter and radial velocity offset) and two more that showed significant difference with both KMM18 and that of our own Kepler fit (orbital inclination and stellar radius).The difference with the radial velocity offset certainly stems from the same reason as mentioned for our Kepler fit.The light curve jitter term actually came out to be smaller than even the Kepler fit, but this is likely a result of the already much larger photometric error present in the TESS light curve.
The difference between the Kepler and TESS orbital inclination estimates is significant though both place the system as nearly edge-on as expected.As for stellar radius, the estimated value from the TESS fit is much higher than both the KMM18 result and our own Kepler estimate, even to the point that the error bars did not overlap with either result.It is also worth noting that the uncertainty for Γ was much higher than in the Kepler fit as well.Both the uncertainty in Γ and the  (a) Inclination i calculated from equation (A1).(b) Linear coefficient u1 calculated from the q-coefficients in Table 4 of KMM18 (q1 = 0.7 +0.2 −0.3 , q2 = 0.3 ± 0.2) using u1 = 2q2 √ q1 (Kipping 2013) and error propagation.
higher value of R ⋆ are certainly consequences of the significantly less defined nature of the TESS pulse compared with its Kepler counterpart.Without a definitive shape, it is nearly impossible to determine the limbdarkening coefficient which ends up driving the stellar radius to higher values.While it is clear visually in this TESS data that there is a relative flux increase of similar magnitude and timescale to that of the Kepler pulses, the higher intrinsic variability of the TESS light curves makes parameter estimation more uncertain.While not diverting too far off from the estimates made by both our and KMM18's fit to the Kepler data, the larger size of the error bars and less Gaussian shape of the posterior distributions (see Appendix A) would inexorably lead to the conclusion that the estimates from the Kepler data are more reliable.Furthermore, fitting to the RV data without joint fitting with the TESS data led to markedly similar results as to what we saw from our TESS joint fit.This would mean much of the parameter determination with the TESS model stems from the quality of the RV data and not the light curve.This coupled with the fact that the parameters that are only determined by the self-lensing model (stellar radius and limb-darkening coefficient) show significant differences with either Kepler model, is a sign that the TESS pulse does not have the required signal-to-noise to accurately estimate the binary parameters.Regardless, the presence of TESS pulses at exactly the predicted times, with similar timescale and height to that of the original Kepler events, provides confidence that these are indeed the anticipated self-lensing pulses, making these signals the first self-lensing events reported from TESS observations.

VARIABILITY, SYNTHETIC LIGHT CURVES, AND DISCUSSION
It is important to note the challenges in detecting selflensing pulses, such as those reported here, in TESS data, which is far noisier than Kepler at the same apparent magnitude.Exposure times for TESS have been shortened in the extended mission from 2020 through the present.This is a decision which may merit reexamination for future cycles to restore sensitivity to small-amplitude pulses.KIC 12254688 was a known system, so we knew exactly when each pulse would occur; even then, further analysis had to be done to extract the pulses from the light curves.Had this been an unknown system, it would have been difficult to discern these pulses from intrinsic variability in the detrended light curves.This highlights an important limitation for lensing in TESS data as compared to Kepler data.In the Kepler observations where KMM18 detected lensing events, the pulses stuck out visually in the light curves.This may not be the case in TESS observations since the other known self-lensing WD systems exhibit only slightly higher pulses than KIC 12254688.Thus, despite the projections for many more self-lensing systems containing WDs rather than NSs or BHs (e.g., Wiktorowicz et al. 2021), their smaller magnifications make WD lenses harder to detect in TESS data sets.White dwarf lensing events also have the disadvantage of requiring longer orbital periods (larger separations) to be discernible, so TESS is likely to see just one pulse for most targets.Even if such a pulse were observed clearly in a sector, it would still be difficult to confirm the detection as an actual lensing event.To underscore the difficulties with WD lenses in (sub)10-min cadence TESS data, we generated synthetic light curves for a variety of cases (Figure 4).In all four panels, the source is a 1.1M ⊙ star with radius 1.5R ⊙ and the same TESS magnitude as KIC 12254688 (T = 12.67), in an eccentric orbit (e = 0.5 and ω = 270 • ).In the left panels, the compact object is a 0.35M ⊙ WD with an orbital period of 270 days.The ∼ 0.2% magnification due to selflensing is about the average of all currently known WD lensing magnifications.In the right panels, the compact object is a 7M ⊙ BH with an orbital period of only 9 days.The top panels show the signals recorded with a 475-s cadence, the same cadence as for TESS Sector 41; the bottom panels show the same signals recorded with the SNR seen in the 30-min cadence of Kepler.
While the pulse sticks out in the TESS WD light curve, it is hardly as prominent as the Kepler WD pulse.In the absence of another detection, it would be difficult to argue for the origin of the TESS pulse.Since the search for self-lensing pulses inevitably requires searching through thousands of light curves, it may be easy for researchers to overlook such signals without doing additional data processing.Additional processing requires more time, time which could be spent looking for obvious signals in other data sets.Furthermore, the data gaps in the middle of each TESS light curve last for days, further reducing the observing duty-cycle for each target.
In the BH panels of Figure 4, there are three selflensing pulses, each with a much higher magnification (∼ 0.4%), due to the higher mass of the compact object.Given the much shorter orbital period, additional physical effects, such as Doppler boosting and ellipsoidal variations, appear in the light curves.Including these effects in the models further constrains the free parameters.For instance, the new effects are highly dependent on the eccentricity of the orbit, a parameter that the pure lensing model cannot model on its own with great certainty.Thus, for BH lenses the orbital parameters can be tightly constrained even without follow-up spectroscopic measurements, in contrast to our present analysis of the KMM18 WD lens.BH lenses are expected to be extremely rare, but if detected their light curves will provide unambiguous self-lensing signals despite the increased noise in TESS photometry relative to Kepler.

SUMMARY AND CONCLUSIONS
We have reported observations of the first two selflensing pulses by the TESS Space Telescope.These pulses occurred in the known self-lensing binary KIC 12254688, where a WD gravitationally lenses its stellar companion once per orbit.We detrended the light curves from TESS Sectors 41 and 56 (Figure 1), binned the data (Figure 2), and folded them to provide a better sampled pulse.We joint fitted our self-lensing and radial velocity models to both the folded TESS pulse and the original folded Kepler pulse and corresponding radial velocity data from Masuda et al. (2020) (Figure 3).We obtained best-fit parameters (Table 1) that were, overall, consistent with those determined by the original study of Kawahara et al. (2018) of the Kepler data.However, we found inconsistencies in some of the returned TESS parameter estimates specific to the self-lensing model that are likely caused by the more chaotic, less defined nature of the folded TESS pulse.These parameters are still within reason, but are significantly different than what we and KMM18 found for the Kepler pulses.
It has been suggested by Masuda & Hotokezaka (2019) and Wiktorowicz et al. (2021) that we are going to discover many more Galactic self-lensing systems containing WDs than NSs or BHs in TESS data and this could very well be the case.On the other hand, we have highlighted the difficulty in parameter estimation in such lower magnification systems in the lower-cadence extended TESS mission as well as the difficulties that we will face in even distinguishing such WD self-lensing pulses from intrinsic variability ( § 4).Thus, it may be wise to first search the higher-cadence TESS data obtained during the primary mission.We also note the possibility of detecting a BH lensing event by mere chance.In such a case, it would be much easier to identify its repeated short-period pulses in the pipeline data, especially in the lower-cadence TESS data of the extended mission.

Figure 3 .
Figure3.Our joint fits to the phase folded light curves of KIC 12254688 from TESS (top left) and Kepler (bottom left) with updated radial velocity data (right panels) fromMasuda et al. (2020).The orange lines represent the 95% confidence intervals, and the dark gray lines represent the 50 th percentile estimates.

Figure 4 .
Figure4.Synthetic light curves of a self-lensing binary system containing a 1.1M⊙ star with a radius of 1.5R⊙ and a 0.35M⊙ WD (left panels) or a 7M⊙ BH (right panels), with orbital periods of 270 and 9 days, respectively.The top panels simulate the light curves as viewed by the 475-s (∼ 8 min) cadence TESScut exposures, and the bottom panels are the same light curves as viewed by the 30-min cadence of Kepler.
Binned light curves of KIC 12254688 for TESS Sectors 41 and 56, respectively.We have zoomed in to the locations of the pulses (near the middle of each plot) so that they are more easily noticeable.The midpoint of the Sector 41 pulse is at 2424.734 BTJD and Sector 56 is at 2843.449 BTJD.

Table 1 .
Best-fit self-lensing+RV models for KIC 12254688 utilizing the listed priors and the final 4000 steps of 100 independent walker chains in each data set.The returned values are obtained from the 16, 50 and 84 percentiles of their posterior distributions.The best-fit values from Table4ofKawahara et al. (2018) (KMM18)are also listed in the last column for comparison.