Dynamical mass determination and partial eclipses of the heartbeat star HD 181793

We identify the bright Am-type star HD 181793 to be a previously-unknown eclipsing, chemically peculiar heartbeat binary, the second of its kind known. The system carries an orbital period of $P = 11.47578275 \pm 0.00000055$ days. We use TESS photometry and LCOGT NRES radial velocity data to build a self-consistent orbital model and determine the fundamental stellar characteristics of the primary. We use a spectral separation method to unveil the secondary and measure the masses of both stars. The radial velocity amplitude of the primary, $K_1 = 47.41+0.13-0.12 km s^{-1}$, gives a mass $M_1 = 1.57 \pm 0.01 $ Msun. The secondary radial velocity amplitude $K_2 = 84.95+0.12-0.09 km s^{-1}$ yields a mass ratio $q = 0.558 \pm 0.002$ and a secondary mass $M_2 = 0.87 \pm 0.01 $ Msun. From the spectral energy distribution and Gaia parallax we find a radius $R_1 = 2.04 \pm 0.05$ Rsun. The grazing transit profile and spectroscopic luminosity ratio indicate $R_2 = 1.04+0.15-0.10$ Rsun, suggesting an early-K spectral type. We show that the heartbeat feature in the TESS light curve can be explained by time-varying ellipsoidal variation, driven by the orbital eccentricity of $e = 0.3056+0.0024-0.0026$, and relativistic beaming of the light of the primary. We find no evidence of tidally-excited oscillations.


INTRODUCTION
The characteristic photometric variation of heartbeat stars (HBSs) which resembles a heart electrocardiogram led to their classification by Thompson et al. (2012) as a unique category of stellar binaries.These eccentric systems undergo strong variations in tidal forces throughout their orbits, causing time-varying geometric distortion of the stellar components.This distortion is in turn observed in light curves as brightness variations with the distinct and recognisable shape that gave them their name.In the few known cases where HBSs are also found to be eclipsing, the masses and radii of the system components, and hence their orbital environments can be determined with great precision (Andersen 1991;Southworth et al. 2004;Torres et al. 2010).
Since this categorisation, over 1000 HBSs have been identified (De Cat et al. 2000;Willems & Aerts 2002;Handler et al. 2002;Maceroni et al. 2009) and catalogued (Thompson et al. 2012;Beck et al. 2014;Kirk et al. 2016;Kolaczek-Szymański et al. 2021;Wrona et al. 2022).Yet these stars continue to maintain great intrigue for their properties and potential to act as extreme stellar tidal laboratories in placing constraints on our theories of dynamical tides (Thompson et al. 2012), studying oscillatory eigenmodes and energy dissipation in stars (Fuller 2017), or challenging current theories of orbit circularisation (Thompson et al. 2012;Wrona et al. 2022).Eclipsing binaries, particularly HBSs, also serve as probes of stellar internal structure (Tkachenko et al. 2020) and of binary evolution (Wrona et al. 2022).In addition to these characteristics, the periodic tidal forcing may excite internal pulsations at integer multiples of ★ laura.uronen@gmail.com the orbital period (Aerts et al. 2010;Guo et al. 2020).These tidallyexcited oscillations (TEOs) can, in turn, serve to probe the causes and mechanisms of these internal pulsations (Cheng et al. 2020), such as the testing of resonance locking (Witte & Savonĳe 1999) and tidal dissipation as a mechanism for orbital decay, or to place additional constraints onto the systems from known pulsation criteria (Lampens 2021).HBSs thus allow us to uniquely investigate tidal forces and their effects on the components of these systems (Kumar et al. 1995).
HD 181793 was first identified by Houk & Cowley (1975) as a chemically peculiar (CP) Am star, a classification that is also confirmed by Egret & Jaschek (1996) and Renson & Manfroid (2009).These stars exhibit a chemical composition showing underabundances in Ca and Sc, in conjunction with overabundances of heavier metals (Conti 1970).Typically, A-type stars lie in the stellar instability strip where their neighbours in the HR diagram show brightness variations (Breger 1970), but it originally appeared that Am stars did not present this same instability (Cox et al. 1979).It is now understood these stars exhibit the same rates of pulsation but at lower amplitudes than their counterparts of other stellar types (Smalley et al. 2011), but our understanding of Am stars remains in development.This stability against pulsation can lead to a better understanding of the link between the composition and structure of stars and their internal processes (Paunzen et al. 2021).Very few Am stars have been identified as HBSs with only one identified as eclipsing (Kolaczek-Szymański et al. 2021;Joshi et al. 2022), thus limiting our knowledge of stellar structure that eclipsing HBSs can reveal (Tkachenko et al. 2020).
Here we report the discovery that HD 181973 is an eclipsing HBS.In Section 2 we describe the discovery of eclipses in survey data from the Wide-Angle Search for Planets (WASP) (Pollacco et al. 2006).Light curves obtained with the Transiting Exoplanet Survey Satel-  lite (TESS) (Ricker et al. 2014) revealed variability characteristic of HBSs at periastron overlaid with the transit, where tidal interactions are strongest and transit probability highest.This prompted a campaign of radial velocity (RV) follow-up with the Las Cumbres Observatory (LCOGT) (Brown et al. 2013) Network of Robotic Echelle Spectrographs (NRES) instrument (Eastman et al. 2014).
Section 3 describes in detail the RV and transit models used to build a complete orbital model of the system, the spectral separation method to isolate the secondary features in the spectra and determine the RV of the secondary, and the heartbeat and beaming models used to fit the out-of-eclipse variations.The results are presented and explored in Section 4, together with a discussion of the lack of tidally-excited oscillations.We present our conclusions in Section 5.

OBSERVATIONS
HD 181793 was flagged as a TESS Object of Interest (TOI-1111) (Guerrero et al. 2021) for follow-up as a potential exoplanetary candidate due to the presence of photometric transit-like events.The light curves are examined in-depth within this paper.Follow-up observations were made with the LCOGT NRES to provide complementary RV curves and spectral information for the stellar system.These new observations are presented in this paper.

TESS photometry
Details of the mission and operation details for the TESS telescope can be found in Ricker et al. (2014).The telescope observes the sky in sectors of combined field-of-view 24 • × 96 • over a period of approximately 27 days each.Each of its four 10-cm cameras has a focal ratio f /4, with a bandpass from 600-1000 nm.HD 181793 (TIC 412014494) was observed in full-frame images (FFI) obtained by TESS in sectors 13 (19 June-18 July 2019) with 30-minute cadence, and 27 (04-30 July 2020) with 2-minute cadence.We extracted the light curves from FFI held in the MAST database with the TESScut (Brasseur et al. 2019) package, and subsequently analysed the 2-minute cadence data from sector 27 with lightkurve (Lightkurve Collaboration et al. 2018).We chose to use only the highcadence Sector 27 for our light curve and heartbeat fittings, which exhibited two eclipses.
Once the transits were loaded in using lightkurve, a box leastsquares fit was conducted to determine the transit period, duration and depth.The phase-folded light curve was noted to show an unusually short duration with a V-shaped transit, the first indicators of the eccentricity of the orbit, the grazing nature of the eclipses, and the system's binary rather than exoplanetary nature.
The TESS light curve was also further processed and flattened using lightkurve and PSF-SCALPELS (Wilson et al. 2022).This employed a principal component analysis across the background, measuring the variation in flux to remove it as scattered light, followed by a linear de-trending using co-trending basis vectors and quaternions to remove the effect seen in the raw light curve (Fig. 3) caused by the spacecraft momentum dump.

WASP photometry and ephemeris refinement
Six complete and five partial transits of HD 181793 were observed between 2012 July 03 and 2014 November 10 with the WASP-South instrument at Sutherland Observatory, South Africa.Like its northern counterpart SuperWASP (Pollacco et al. 2006), WASP-South comprised an array of eight 200-mm, f /1.8 Canon lenses backed by 2k × 2k Peltier-cooled CCDs on a robotic mount.Each field was observed with typically 10-min cadence.A transit search triggered by its identification as TOI-1111 led to a clear detection of the 11.476-day eclipse period.We combined the historical WASP ephemeris with the TESS time of mid-eclipse to obtain a long-baseline ephemeris BJD = 2458663.0019(1)+ 11.475756(1)E.This ephemeris was then used as a prior for subsequent MCMC fitting of the light curve and orbit.

LCOGT NRES follow-up
After preliminary examination of the TESS and WASP light curves revealed this abnormally deep yet narrow transit in contrast to a relatively long period of approximately 11.5 days, follow-up observations were conducted on the NRES instrument on one of the three LCOGT 1-m telescopes located at the Cerro-Tololo Inter-American Observatory (CTIO).The resolving power of NRES is  = 53, 000, covering the optical wavelength range (380-860 nm).A full description of the capabilities and specifications of the LCOGT is available at Brown et al. (2013) and those for NRES at Eastman et al. (2014).
11 spectra were obtained between 2022 July 1 and August 24.The observation requests were timed to ensure that all orbital phases were sampled as uniformly as possible.All spectra had exposure times of roughly 2812s and a signal-to-noise ratio (SNR) greater than 30.The spectra were extracted and their RVs were measured with the BANZAI-NRES pipeline (McCully et al. 2018).The resulting RVs had a typical precision between 140 and 290 m s −1 .The log of RV measurements is given in Table 1.

Orbital modelling
We aimed to combine both RV and transit light curve data and fit a complete model to these data.For this purpose we used the allesfitter package (Günther & Daylan 2019, 2021), specifically using ellc (Maxted 2016) and emcee (Foreman-Mackey et al. 2013) to conduct simultaneous MCMC fitting of the RV curve and the primary eclipse profile.
The primary parameters fitted by the model were the ratio of the stellar radii  2 / 1 ; the ratio of the sum of radii to the semimajor axis ( 1 +  2 )/; period ; time of mid-transit  0 ; system inclination cos ; RV semi-amplitude of the primary  1 ; the surface brightness ratio ; and the eccentricity parameters √  cos  and √  sin .Additionally, a dilution parameter for TESS was included and a quadratic limb-darkening law was chosen for the TESS data.For the derived parameters, we also included priors based on the Gaia DR3 (Gaia Collaboration et al. 2016Collaboration et al. , 2018Collaboration et al. , 2021) ) radius estimate of 1.963 ± 0.041 R ⊙ from GSP-Spec FLAME and a weighted average for temperature of T eff = 7661 ± 12 K using the T eff = 7768± 13 11 K GSP-Spec Matisse-Gauguin and T eff = 7130± 29 27 K GSP-Spec ANN values, as well as a preliminary mass estimate of 1.57 ± 0.01 M ⊙ obtained from initial runs of the fitting and separation algorithm.
The MCMC ran with 100 walkers, 1000 burn-in steps and 15000 total steps.From the Gelman-Rubin test, the fitting demonstrably converged to a stationary state with all chains being over 30 times the autocorrelation time, with most parameters giving approximately Gaussian distributions.These are shown in Appendix A, and the parameter priors and results are presented in Section 4.1.

Spectral separation
The secondary spectrum is not apparent in the extracted spectra, so we adopted template-matching approach to determining the RV amplitude of the secondary.A flowchart of the algorithm is provided in Figure 4 to assist the description.
The BANZAI-NRES pipeline returns extracted 1-D spectra of the individual echelle orders in the barycentric reference frame.In preference to merging the spectra by re-binning, we adopted an orderby-order approach.We used the Keplerian orbital solution to shift the spectral orders into the reference frame of the primary using linear interpolation.From the spectrum in each order we built a median primary spectrum and subtracted it from the individual epochs.We performed a 4- clip to flag and mask outliers in the spectrum at each epoch caused by either cosmic rays or Doppler-shifted telluric absorption features.
The residuals were then returned to the barycentric frame to run the template-matching analysis.The RV amplitude and period of Flowchart presenting the algorithm used for the spectral separation.The algorithm described is that for a singular order across all epochs and velocities, and this method was then used across all orders to obtain a final result of the fitting.the primary's orbit, together with the initial mass estimate, suggest a secondary mass of order 0.8 M ⊙ , and hence an early-K or late-G secondary spectral type.The NRES spectral standard star HD 16160 (spectral type K3V) was identified as a spectral template.Its spectrum was observed on 2021 December 29 with the NRES instrument at CTIO that had been used for the HD 181793 campaign and reduced by the BANZAI pipeline, obtained for use through the LCOGT Science Archive.
For each order, the template spectrum was fitted against the residuals at each epoch.The template spectrum was shifted using a Keplerian orbital solution scaled by a grid of RV amplitudes, over the range 0 <  2 < 150 km s −1 in uniform 1 km s -1 increments.The ends of the template and the residual array were truncated to eliminate any misalignment resulting for the shifting.
At each value of  2 , the resulting shifted template spectrum p, which approximates the Doppler-shifted spectrum of the secondary, was scaled to fit the inverse-variance weighted residuals x.
The optimal scaling factor, and badness-of-fit statistic were both calculated and recorded at each velocity for the time series of spectra in each échelle order.Here  −1 = diag(1/ 2 ), assuming independent heteroscedastic uncertainties  in each pixel, as computed by the BANZAI-NRES pipeline.The value of  2 at the location of the  2 minimum, as well as the maximum in the optimal scaling factor, defined the RV of the secondary.Inspection of the results for individual orders showed that an unambiguous signal was detected in all orders, except those at the very bluest and reddest wavelengths.We confirmed that the secondary's signal in the long-wavelength orders was compromised by many outliers arising from Doppler-shifted telluric lines and a lack of spectral features in the K-dwarf template spectrum.The spectral energy distribution of the template yielded too little flux in the bluest orders to yield a reliable detection at low SNR ratios.
We computed the final estimates of  2 and  2 by summing the quantities in Eqs. 1 and 2 over all orders in the range 4300Å<  < 6500Å, where the signal was well-defined, instead of individually for each order.

Spectral analysis
The system parameters established in Section 4.1 below yield log  = 4.0±0.05for the surface gravitational acceleration of the primary, more accurately than is possible with spectral analysis, so we adopted this value.We solved initially for the effective temperature and metallicity [M/H] of the primary by fitting a solar-abundance model to the H profile in the median spectrum of the primary.We used the pySME implementation by Wehrhahn et al. (2023) of the Spectroscopy Made Easy (SME) spectral-fitting package (Valenti & Piskunov 1996;Piskunov et al. 2017).We used a model-atmosphere grid generated with MARCS (Gustafsson et al. 2008) with a solarabundance line list from the Vienna Atomic-line Database (VALD3; Piskunov et al. 1995;Ryabchikova et al. 2015).We used a set of spectral masks spanning the wavelength range from 3922Å to 5100Å, avoiding very strong lines such as the Balmer sequence.These regions cover many of the strong lines of the species of interest for validating the primary's Am status, as well as several hundred lines of Fe I and Fe II.

Heartbeat modelling
Having established the fundamental parameters of the system, we proceeded to examine the heartbeat feature seen at periastron.Our analysis of the out-of-transit variation thus utilises the cleanest light curve data set at our disposal from TESS, Sector 27.We do not use the WASP light curves for this fitting, since their photometric flux uncertainties are significantly greater than the amplitude of the heartbeat.
We used the model of ellipsoidal variation by Kumar et al. (1995) (their Eq. 44), which was originally developed to model geometric variation in eccentric binary pulsars.The basis of the model is that within eccentric orbits, the change in tidal forces can lead to the physical distortion of both components in the system, which is witnessed in the light curve as brightness variability as the stars change shape.This model has more recently been applied to a variety of HBSs (Thompson et al. 2012;Wrona et al. 2022;Kolaczek-Szymański et al. 2021): where F/F is the fractional change in flux, (t) and R(t) are respectively the true anomaly and separation of bodies at time t,  is the longitude of periastron, a the semi-major axis and sin i the inclination.The scale factor S and zero-point C were fitted using the least-squares minimisation package lmfit (Newville et al. 2014).Though the Kumar model has limitations described by Thompson et al. (2012) and Kolaczek-Szymański et al. ( 2021), it balances mathematical simplicity with a good first-order approximation.
The secondary is relatively faint, so reflection effects are negligible and the elliptical effect is already accounted for by the Kumar et al. (1995) model.The orbital velocity amplitude of the primary is sufficient for relativistic Doppler beaming to contribute significantly to the out-of-transit variation and needs to be accounted for in the modelling.We incorporated beaming in the model using the formulation from the BEER algorithm (Faigler & Mazeh 2011), applied to the primary's Keplerian orbit model: The BEER model expects the value for FGK stars to be roughly 0.8-1.2 and we thus set the value of  beam to 1.0.While the primary is an Am star, we aimed only to test the impact of Doppler boosting on the heartbeat.
The complete model combines the Kumar et al. (1995) heartbeat model and the Faigler & Mazeh (2011) BEER Doppler beaming effect:

Orbital model
The results of the complete orbital model are displayed in Table 2, including the fit parameter priors and posteriors as well as the parameters derived by allesfitter.
The fitted orbital inclination is cos  = 0.1344 +0.0075 -0.0055 , yielding an inclination  = 82.28+0.32  -0.44 deg.The system has an eccentricity of  = 0.3056 +0.0024  -0.0026 with an argument of periastron of  = 47.80 +0.54   -0.50   deg.The eclipse impact parameter is  = 1.416 +0.080 -0.055 , in units of the radius of the primary.This confirms the extreme grazing nature of the eclipse and matches the very short eclipse duration of  = 2.534 +0.041 -0.036 hours.We further refine the ephemeris obtained from WASP, and use the time of mid-transit from TESS to obtain an orbital period of  = 11.47578275± 0.00000055 days.
Given the grazing primary eclipse and the eccentricity of the system, no secondary occultation was expected or detected.We show the transit model and the photometry in Fig. 5 at phases 0.0 and 0.633  where the primary and secondary eclipses are respectively expected, given  = 0.3056 and  = 47.8 deg.
We record the individual stellar parameters with the primary radius as 2.04 ± 0.05 R ⊙ .We fitted a semi-major axis length of  = 29.13 ± 0.86 R ⊙ and a secondary radius of  2 = 1.04 +0.15   -0.10 R ⊙ .This would give a preliminary indication of a mid-type G-type star, with a fitted surface brightness ratio   = 0.066 +0.055  -0.047 which we will later compare to the flux ratio obtained in the spectral separation.
The RV model, displayed in Fig. 6, establishes the RV of the primary star as  1 = 47.41 +0.13  -0.12 km s -1 and gives an initial mass ratio estimate of  = 0.550 +0.026  -0.024 .The residuals between the model values and the measured radial velocities show a root-mean-square velocity dispersion of 0.253 km s -1 , which is comparable to the uncertainties estimated by the BANZAI-NRES pipeline.There is no evidence of any significant additional sources of systematic error.

Secondary radial velocity
Following the subtraction of the primary, masking of outlier features and the fitting of the K-star spectrum across all orders, we see a distinct localisation of the maxima in the optimal flux-scaling factor Â as shown in Fig. 7 and a similar distribution for the order-wise minima of  2 shown in Fig. 8.These also illustrate the lack of a clear  detection of the secondary in the bluest and reddest orders, as noted previously.
Conducting the scaling-factor summation over all orders between 4300 Å and 6500 Å, we obtained the average optimal scaling factor and the summed  2 , whose variations with  2 are displayed in Fig. 9.We see a well-defined  2 minimum and a maximum in the optimal scaling factor.
To estimate the uncertainty in  2 we repeated the grid search over a restricted range 70 km s −1 <  2 < 100 km s −1 , at 0.05 km s -1 intervals.We fitted a quadratic function around the location of the minimum in  2 to determine the curvature and hence the Δ 2 = 1 error bar.This yielded an optimal RV semi-amplitude  2 = 84.95+0.12 -0.09 km s -1 for the secondary's orbit.This fitting is shown in more detail in Appendix B.
Combining this measurement with the RV semi-amplitude  1 = 47.41 ± 0.13 km s -1 of the primary, we obtain a confirmed mass ratio  = 0.558 ± 0.002 for the system.This is slightly larger than the result we found from the MCMC fitting ( = 0.550 +0.026  -0.024 ), but is in agreement within 1-.With the lack of precision in the original estimate of the primary's mass, it was expected that the MCMC's results for the mass would be less reliable than that obtained from the spectral separation.Kepler's equations for eccentric orbits and yield a semi-major axis  = 28.8 ± 0.05 R ⊙ , a value that is more precise than the MCMC fit result.Both values are consistent with each other within the MCMC uncertainty bounds.The total system mass is found to be  tot = 2.44 ± 0.02 M ⊙ .The primary and secondary masses are  1 = 1.57± 0.01 M ⊙ and  2 = 0.87 ± 0.01 M ⊙ respectively.
It is also noted that the peak value of the optimal scaling factor lies at 0.020, giving the spectral flux ratio and thus consistent with a surface brightness ratio  = 0.066 +0.055  -0.047 as given by the MCMC fitting related by the equation: which returns a flux ratio   = 0.017 ± 0.014.These values agree with one another (though we note the large uncertainty in the flux ratio caused by the large uncertainty in the MCMC surface brightness ratio, and this is likely caused by the significant difference in detectability of the two stars).

Spectral type
Having established  eff = 7200 ± 200K and adopting [M/H] = 0.0 ± 0.2, we solved for individual abundances of the atomic species Ca, Sc, Ti, Cr, Fe, Zn, Sr, Zr and Ba.We found logarithmic departures from solar abundances relative to hydrogen, displayed in Table 3 for 7000K <     < 7400K and −0.2 < [M/H] < 0.2.The pattern of abundances seen in HD181793 is typical of that seen in recent abundance studies of chemically-peculiar Am stars, (e.g.Catanzaro et al. 2019;Romanovskaya et al. 2023), with significant depletion of Ca and Sc relative to the Sun, and over-abundances of the heavier elements, particularly Ba.This supports the earlier identifications of HD 181793 as a CP Am star.

Heartbeat
A comparison of the out-of-eclipse light-curve variation against the fitted heartbeat model is shown in Fig 10 .The geometric variation in the stellar shape of the primary accounts correctly for the shape and amplitude of the light-curve variation.Doppler beaming contributes a modest additional effect.We therefore identify the ellipsoidal variation as the primary and main component of variation in the light curve.This establishes HD 181793 as a system with a heartbeata rare, eclipsing Am-type HBS.We see no evidence of additional tidally-excited oscillations in the light curve.

DISCUSSION AND CONCLUSIONS
We have established precise values for the physical parameters of both the primary and secondary stars.Our results indicate that HD 181793 as an eccentric binary stellar system with an Am-type primary star and a likely early K-type secondary star in a grazing eclipse.We find the form and amplitude of the out-of-transit "heartbeat" variation to be consistent with time-varying tidal distortion of the primary, making it one of the rare Am-type heartbeat systems and only the second discovered thus far in a confirmed eclipsing binary despite the existence of over 1000 identified HBSs.The other such system discovered, SW CMa, was identified as an Am-heartbeat eclipsing binary by Kolaczek-Szymański et al. (2021).It comprises a pair of Am stars with a mass ratio of  = 0.940 ± 0.010 and a period of  = 10.091988 ± 0.000005 days.With this high mass ratio, SW CMa differs greatly from HD 181793.We present HD 181793 as a highly valuable resource for future research, since the secondary star contributes little to the system's luminosity, allowing the primary's variability to be studied in isolation.The difference in companion spectral type between the two systems could also provide interesting insight into any dynamical effects.It is also a particularly bright system with a V-band magnitude of 9.63 (Høg et al. 2000), and thus an easy target for follow-up studies.
The relationship of the heartbeat, periastron, and transit can also yield insight into the ways that the stars interact at closest approach in such eccentric orbits.Further and more precise modelling of the heartbeat can also produce more insight into the tidal interactions and the components contributing to the heartbeat signal and its shape.In particular, the form of the out-of-transit variation is still not entirely matched by the shape of the model.Future TESS observations will characterise the form of the heartbeat with improved precision.The precise physical parameters we have established for the two stars have  Kumar et al. (1995), and a full model including the Doppler beaming of the primary with the eclipse removed from the modelling.We note that both models show roughly flat residuals and model the pattern of the heartbeat well.We conclude that the dominant cause of the light curve variation is the ellipsoidal variation of the primary from the heartbeat.
strong potential to inform more sophisticated dynamical models of the tidally-driven changes in the shape of the primary.
The heartbeat feature in itself is a purely geometric deformation of the star.Tidally-excited oscillations (Fuller 2017) are an internal pulsation of the star.As mentioned before, Am-stars appear to have observed stability against structural pulsations.Though demonstrated to pulsate at similar frequencies to other stellar types in the stellar instability strip, Am stars generally show lower amplitudes of pulsation (Smalley et al. 2011).The mechanisms that drive these Am star pulsations are not as-yet well-understood (Smalley et al. 2017).Among the handful of Am stars that have been discovered in heartbeat binaries, only one does not exhibit TEOs (Joshi et al. 2022).The apparent absence of such oscillations in HD 181793, as they are usually distinctly visible in the light curves, has the potential to inform and challenge theories of pulsations driven by periodic tidal forcing in an eccentric orbit, helping us to further understand the mechanism that drives pulsations within Am stars, and obtain new insights into the structure and composition of these chemicallypeculiar stars.The second of its kind, this system has allowed us to determine the masses, radii, and orbital configuration of the system, providing a comprehensive image of the binary's fundamental parameters.These can be used to model this binary more precisely, probe stellar structure and evolution, and future observations can reveal if systems akin to HD 181793 exist.What has remained outside the scope of this particular study opens a new gate and adds another peculiar system to the growing catalogue of heartbeat stars.

Figure A2
. MCMC corner plot for the derived parameters as determined by allesfitter.Some of these parameters have not been accounted for as their values was not fitted, or remained zero, and all that were explored are shown in Table 2. Most of the parameters display Gaussian distributions, but it is likely that the non-Gaussian distributions are due to the limits imposed onto the system caused by the highly-grazing feature and eccentricity of the system.Each parameter is described within the plot, above the column showing parameter relation distributions.

Figure 1 .
Figure 1.(Left panel) TESS FFI image of HD 181793 and surrounding stars and (right panel) 2MASS map of the same area, demonstrating no significant contamination risk from surrounding stars.The 2MASS map is rotated 180 • in comparison to the TESS image.

Figure 2 .
Figure 2. Selected aperture for the TESS light curves.

Figure 3 .
Figure3.Raw TESS light curve of sector 27 of HD 181793.We observe a clear deep and narrow transit, around which there is a perturbation pattern that hinted at a heartbeat.We also note the momentum dump at roughly 2055 days.

Figure 4 .
Figure 4. Flowchart presenting the algorithm used for the spectral separation.The algorithm described is that for a singular order across all epochs and velocities, and this method was then used across all orders to obtain a final result of the fitting.

Figure 5 .
Figure 5. Results of the joint fit for the eclipse.Top panel shows the scattered data points and the MCMC best-fit model, and the bottom panel shows the residuals.The primary eclipse is seen centred at orbital phase zero, but no secondary eclipse is seen or expected at phase 0.633 where superior conjunction of the secondary occurs, owing to the eccentricity and inclination of the orbit.

Figure 6 .
Figure 6.Results of the joint fit for the RV data.Top panel shows the data points and the best-fit MCMC model, and bottom panel shows the residuals.Note that though the data uncertainties are present in the top panel, they are smaller than the marker size and are not visible.The RV errors can be seen more clearly in the residual panel.

Figure 7 .
Figure 7. Greyscale representation of the fitted flux scale factor Â with the RV amplitude of the secondary.In particular, only the central orders numbered from 40 to 110 show clearly-defined peaks.In the orders with clear detections, the secondary's RV amplitude is tightly distributed around 85 km s -1 .

Figure 8 .
Figure 8. Greyscale representation of the per-order values of  2 , normalised to the mean  2 of each order.As seen in Fig. 7, the secondary spectrum is detected clearly in spectral orders 40 through 100, showing a tight distribution of values around 85 km s -1 .

Figure 9 .
Figure 9. Chi-squared and optimal scaling factor summed across wavelengths 4300-6500 Angstrom, showing a distinct peak and minimum at the inferred location of the best-fitting RV amplitude of the secondary.

Figure 10 .
Figure10.Data for the first half of the TESS sector 27 light curve compared with the fitted heartbeat modelled following the description inKumar et al. (1995), and a full model including the Doppler beaming of the primary with the eclipse removed from the modelling.We note that both models show roughly flat residuals and model the pattern of the heartbeat well.We conclude that the dominant cause of the light curve variation is the ellipsoidal variation of the primary from the heartbeat.

Figure A3 .
Figure A3.Chains for the allesfitter run.Showing, top to bottom: (Left column) log probability function, ratio  2 / 1 , ratio ( 1 +  2 )/, inclination, epoch  0 ; (Central column) orbital period, RV semi-amplitude  1 , eccentricity parameters   and   , TESS dilution factor; (Right column) host limb darkening coefficients  1 and  2 , TESS surface brightness ratio, and log errors in TESS and LCOGT data.The chains show the system has converged to a neat steady-state.

Figure B1 .
Figure B1.Results for chi-squared and optimal scaling factor with narrowed velocity grid range and increased grid resolution.Both peaks have remained in the vicinity of 85.5 km s -1 and it was thus suitable to use Δ 2 = 1 to determine the error bars.

Figure B2 .
Figure B2.Fit for chi-squared minimum to determine error bars on increased velocity grid resolution.

Table 1 .
Observation details for the LCOGT spectra.

Table 2 .
Posterior distributions of the parameters as given by the joint MCMC fit of the complete orbital model.Uncertainties have been provided to two significant figures.