Validation of Elemental and Isotopic Abundances in Late-M Spectral Types with the Benchmark HIP 55507 AB System

M dwarfs are common host stars to exoplanets but often lack atmospheric abundance measurements. Late-M dwarfs are also good analogs to the youngest substellar companions, which share similar T eff ∼ 2300–2800 K. We present atmospheric analyses for the M7.5 companion HIP 55507 B and its K6V primary star with Keck/KPIC high-resolution (R ∼ 35,000) K-band spectroscopy. First, by including KPIC relative radial velocities between the primary and secondary in the orbit fit, we improve the dynamical mass precision by 60% and find MB=88.0−3.2+3.4MJup , putting HIP 55507 B above the stellar–substellar boundary. We also find that HIP 55507 B orbits its K6V primary star with a=38−3+4 au and e = 0.40 ± 0.04. From atmospheric retrievals of HIP 55507 B, we measure [C/H] = 0.24 ± 0.13, [O/H] = 0.15 ± 0.13, and C/O = 0.67 ± 0.04. Moreover, we strongly detect 13CO (7.8σ significance) and tentatively detect H218O (3.7σ significance) in the companion’s atmosphere and measure 12CO/13CO=98−22+28 and H216O/H218O=240−80+145 after accounting for systematic errors. From a simplified retrieval analysis of HIP 55507 A, we measure 12CO/13CO=79−16+21 and C16O/C18O=288−70+125 for the primary star. These results demonstrate that HIP 55507 A and B have consistent 12C/13C and 16O/18O to the <1σ level, as expected for a chemically homogeneous binary system. Given the similar flux ratios and separations between HIP 55507 AB and systems with young substellar companions, our results open the door to systematically measuring 13CO and H218O abundances in the atmospheres of substellar or even planetary-mass companions with similar spectral types.


INTRODUCTION
The elemental abundances of exoplanets and substellar companions encode their accretion history, providing valuable insights into planet and star formation mechanisms.It is now well-recognized that measuring abundance ratios besides C/O are crucial for breaking degeneracies and providing a more complete picture of substellar atmospheres (e.g.Cridland et al. 2020;Turrini et al. 2021;Mollière et al. 2022;Chachan et al. 2023) when compared to abundance measurements of their host stars.Recently, isotopologue ratios have also emerged as an observable in substellar atmospheres (Morley et al. 2019;Molliere & Snellen 2019).Zhang et al. (2021b) measured 12 CO/ 13 CO = 31 +17 −10 for the young super Jupiter TYC 8998-760-1 b, while Line et al. (2021) reported 12 CO/ 13 CO = 10.2-42.6 for the hot Jupiter WASP-77 Ab.Finnerty et al. (2023) also reported a tentative 13 CO enrichment for WASP-33 b, although higher signal-to-noise (S/N) data is needed to confirm this result.On the other hand, Zhang et al. (2021a) reported 12 CO/ 13 CO = 97 +25 −17 for an isolated brown dwarf.These results potentially indicate that the varying 12 C/ 13 C of these objects can be used to constrain their formation histories.However, more analysis and measurements are required to bolster our confidence in these results (Line et al. 2021).
There are abundant measurements of isotopologues in the stellar literature, especially for giant stars.More recently, studies have measured isotopologue ratios in dwarf stars (e.g.Crossfield et al. 2019;Botelho et al. 2020;Coria et al. 2023), which are thought to better preserve the initial isotopic abundances in their envelopes compared to giant stars, and therefore useful for constraining galactic chemical evolution (Romano et al. 2017).For context, the Sun has 12 C/ 13 C = 93.5 ± 3.1 and 16 O/ 18 O = 525 ± 21 (Lyons et al. 2018), while the average local interstellar medium values are 12 C/ 13 C = 69 ± 6 and 16 O/ 18 O = 557 ± 30 (Wilson 1999).In circumstellar disks, the relative isotopic abundances can differ from the inherited interstellar medium values due to processes such as self-shielding.For example, Calahan et al. (2022) showed that in certain regions of the inner disk, self-shielding of CO, C 18 O and UV-shielding of H 2 O can result in an enhanced H 18  2 O abundance at the expense of C 18 O.In Zhang et al. (2021b), the authors proposed that ices beyond the CO snow line may be 13 CO-rich, so if a planet accreted a significant amount of ice beyond the CO snow line it may exhibit a lower 12 CO/ 13 CO value compared to its host star.However, more detailed modeling work is needed to understand the details of isotopic composition and fractionation chemistry in circumstellar disks ( Öberg et al. 2023).
In this work, we study the HIP 55507 AB system, which consists of a M7.5 companion that orbits at ∼40 AU from its K6V primary star.The M dwarf companion was initially identified from a radial velocity (RV) trend and later confirmed by adaptive optics imaging (Gonzales et al. 2020).Using K-band high-resolution (R ∼ 35, 000) spectra from Keck/KPIC, we carry out an atmospheric retrieval analysis of HIP 55507 B to measure the C/O, [C/H], 12 CO/ 13 CO, and H 16 2 O/H 18 2 O in its atmosphere.In addition, we analyze the KPIC spectra of the primary star, HIP 55507 A, to measure its 12 CO/ 13 CO and C 16 O/C 18 O using a simplified version of the same framework.
From the high-resolution spectra, we also measure the radial velocities (RV) of both stars to compute their relative RV.Relative RV data have been shown to improve orbital constraints for directly imaged companions especially when the other data only sparsely cover the orbital period (Schwarz et al. 2016;Ruffio et al. 2019;Do Ó et al. 2023).We include the KPIC relative RVs in orbit fits to measure the companion's orbital parameters and dynamical mass.This paper is organized as follows.In § 2, we describe the properties of HIP 55507 A, including an estimate of its age.The Keck/HIRES, Keck/NIRC2, and Keck/KPIC observations and data reduction are detailed in § 3.In § 4, we summarize the orbit fits for HIP 55507 B. § 5 lays out our spectral analysis framework for both HIP 55507 A and B, including the retrieval setup.§ 6 describes the lessons from our of injectionrecovery tests for atmospheric retrievals of HIP 55507 B. The main results of our spectral analysis are described in § 7, with our conclusions in § 8.

PRIMARY STAR PROPERTIES
HIP 55507 A is a K6V star located at 25.41 pc with M = 0.67 ± 0.02 M ⊙ and T eff = 4250 ± 90 K (Yee et al. 2017;Sebastian et al. 2021;Stassun et al. 2019;Anders et al. 2022).By comparing the star's Keck/HIRES optical spectra with an empirical spectral library using the SpecMatch-Emp tool (Yee et al. 2017), we obtain [Fe/H] = −0.02± 0.09 for the star. 1 We tabulate the literature properties of HIP 55507 A in Table 1.HIP 55507 A hosts a low-mass companion first detected from RV and direct imaging as part of the TRENDS survey (Gonzales et al. 2020).
We estimated the age of HIP 55507 A in two ways.First, we searched for lithium with the ARC Echelle Spectrograph (Wang et al. 2003) at the Apache Point Observatory 3.5 m on 2023/04/30.The spectrum was reduced with pyvista. 2 The spectrum is placed at rest wavelengths by applying a barycentric correction and removing the radial velocity measured by Gaia DR2 (Gaia Collaboration et al. 2018).No Li absorption is visible at 6707.79 Å above the noise and we determine an upper limit of 20 m Å on the lithium equivalent width (EW) by constructing a series of Li lines with Gaussian profiles of varying EWs.With this EW upper limit, we place a lower limit on the stellar age using BAFFLES (Stanford-Moore et al. 2020), which uses a Bayesian framework to calculate probability distributions on stellar age for single stars based on Li EW measurements of stars in stellar associations with robust ages.BAFFLES can derive a probability distribution function for a field star given an upper limit on Li EW by using fits to the median Li EW as a function of B-V for each cluster and the scatter about those relations.Given a Li EW upper limit of 20 m Å and B-V=1.24 for HIP 55507 A, we find 2σ and 3σ lower age limits of 838 and 286 Myr, respectively (see Fig 1).
We also searched TESS light curves for rotational modulation using the lightkurve package (Lightkurve Collaboration et al. 2018).HIP 55507 A was observed over two consecutive TESS sectors covering a baseline of 57 days.From the light curves, we found a clear periodic signal of 15.8 days (see Fig 1).Nearby stars within 15 arcmin do not exhibit similar modulation, suggesting the modulation likely originates from HIP 55507 A. If we attribute the periodic signal to the stellar rotation period, a Lomb-Scargle analysis of the two TESS sectors yields a period of 15.8±1.8days.Given T eff = 4250±90 K, we use the gyrochronology tool from Bouma et al. (2023) to derive an age of 1.7 +0.4  −0.7 Gyr.Therefore, both the lack of Li and relatively slow rotation point to an age of ∼ 1 − 2 Gyr for HIP 55507 A.

Keck/HIRES
We collected spectra of HIP 55507 A from April 2009 to June 2023 using the High Resolution Echelle Spectrometer (HIRES, R ≈ 60, 000; Vogt et al. 1994) at the W.M. Keck Observatory.The data from 2009 to 2015 were collected as part of the M2K program (Gaidos et al. 2013).The observation setup is the same as that used by the California Planet Search (Howard et al. 2010).The wavelength calibration was computed using an iodine gas cell in the light path.A iodine-free template spectrum bracketed by observations of rapidly rotating B-type stars was used to deconvolve the stellar spectrum from the spectrograph point-spread function.We then forward model the spectra taken with the iodine cell using the deconvolved template spectra, the pointspread function model and the iodine cell line atlas (Butler et al. 1996).The Keck/HIRES RVs are presented in Appendix A, and show a long-term trend with curvature, which is induced by HIP 55507 B (Appendix B).

Keck/NIRC2
We observed HIP 55507 B in L ′ band on UT 2021 May 19 and K and M s bands on UT 2022 June 9 using Keck/NIRC2.We did not use a focal plane mask but observed in pupil tracking mode to exploit sky rotation for angular differential imaging (ADI, Liu 2004;Marois et al. 2006).HIP 55507 B was also imaged with Keck/NIRC2 on UT 2012 Jan 7 and 2015 May 29 (PI: Justin Crepp) as part of the TRENDS survey (Gonzales et al. 2020).The astrometry from Gonzales et al. (2020) shows a ∼ 100 • discrepancy in position angle (PA) compared to calibrated images on the Keck Observatory Archive (KOA).3 , which could be caused by a mismatch between pupil tracking and field tracking modes used in each observation (E.Gonzales, priv. commun.).Therefore, we re-analyzed the archival NIRC2 data from Gonzales et al. (2020) to update the astrometry.Finally, we include a single astrometric epoch from UT 2021 Dec 21 reported in Franson et al. (2023).
We first pre-process the data using the Vortex Imaging Processing (VIP) software package (Gomez Gon- days.The uncertainties on the rotation period were determined from the full-width half maximum of the peak.These two lines of evidence both point towards an age of ≈ 1 − 2 Gyr for the star.zalez et al. 2017;Christiaens et al. 2023).We perform flat-fielding, bad-pixel removal, and correct for geometric distortions by applying the solution in Service et al. (2016) for observations after the NIRC2 camera and adaptive optics system were realigned on UT 2015 April 13 and the solution from Yelda et al. (2010) for the archival 2012 observation.Then, we perform skysubtraction following the procedure described in Xuan et al. (2018).To register the HIP 55507 B frames, we identify the star's position by fitting a 2D Gaussian to the stellar point spread function (PSF) in each frame.
After obtaining the pre-processed cubes, we extracted the astrometry and photometry of the companion using pyKLIP (Wang et al. 2015), which models a stellar PSF with Karhunen-Loève Image Processing (KLIP) following the framework in Soummer et al. (2012) and Pueyo (2016).We used ADI to subtract the stellar PSF and tested various model choices to minimize the residuals after stellar PSF subtraction while preserving the companion signal, following guidelines in Redai et al. (2023).The 2015 observations for HIP 55507 used field tracking mode, so we used a least-squares minimization code to compute the astrometry.We note that our measured astrometry from the archival Gonzales et al. (2020) data agree at the < 1σ level with those reported in Franson et al. (2023), who also re-analyzed these data.
From pyKLIP forward modeling (Wang et al. 2016), we obtain the flux ratio between the star and companion for each photometric band, which we convert to apparent and absolute magnitudes.For L ′ and M s bands, we scale the flux ratios to the primary star's W 1 and W 2 mag respectively. 4We convert the 2MASS K into MKO K for HIP 55507 A using color relations in Leggett et al. (2006), before calculating the MKO K for HIP 55507 B. The measured astrometry and photometry are provided in Table 2, and an example of the pyKLIP forward modeling is shown in Appendix B.

Keck/KPIC
We observed the HIP 55507 AB system with the upgraded Keck/NIRSPEC (Martin et al. 2018) using the KPIC fiber injection unit (FIU; Mawet et al. 2017;Delorme et al. 2021;Echeverri et al. 2022) on UT 2021 July 4 and 2023 May 2 (see Table 3).The FIU is located downstream of the Keck II adaptive optics system and is used to inject light from a selected target into one of the single-mode fibers connected to NIRSPEC.We obtained R ∼ 35, 000 spectra in K band, which is broken up into nine echelle orders from 1.94-2.49µm.The observing strategy is similar to that of Wang et al. (2021), except we 'nodded' between two fibers to enable background subtraction between adjacent frames.We also acquire short exposures of HIP 55507 A before observing the companion, and spectra of a nearby A0 standard star (HIP 56147) at similar airmass.
We briefly summarize the KPIC data reduction procedure with the public Python pipeline. 5For details, see Wang et al. (2021).First, we apply nod-subtraction between adjacent frames as the spectral traces of each fiber lands on a different location in the detector.We also remove persistent bad pixels identified from the background frames.Then, we use data from the telluric standard star to fit the trace of each column in the four fibers (two of which contain science data) and nine spectral orders, which give the position and standard deviation of the PSF in the spatial direction at each column.The trace positions and widths are additionally smoothed using a cubic spline to mitigate random noise.
For every frame, we extracted the 1D spectra in each column of each spectral order.To remove residual background light, we subtracted the median of pixels that are at least 5 pixels away from every pixel in each column.Finally, we used optimal extraction (Horne 1986) to sum the flux using weights defined by the 1D Gaussian line-spread function (LSF) profiles calculated from spectra of the telluric star.
For our analysis, we use three spectral orders from 2.29-2.49µm, which contain strong absorption lines of CO and H 2 O from the companion, and CO from the primary star.These orders also have relatively few telluric absorption lines.Note that the three spectral orders have gaps in between them, so the KPIC data effectively cover a range of ≈ 0.13 µm after accounting for the gaps.The relative radial velocity (RV) between HIP 55507 A and B can be directly measured from our KPIC data.From the two KPIC epochs, we extract two relative RV points (listed in Appendix C) from fitting the KPIC spectra of both HIP 55507 A and B (see § 5).
In the Hipparcos-Gaia Catalog of Accelerations (Brandt 2021), HIP 55507 A shows a significant proper motion anomaly with S/N of ≈ 28 in the Gaia epoch, with an amplitude that is consistent with being induced by HIP 55507 B. We perform orbit fits using RVs of HIP 55507 A from HIRES, relative astrometry from NIRC2 imaging, Gaia and Hipparcos absolute astrometry, and two relative RV points between HIP 55507 A and B from KPIC.We use the orvara package (Brandt et al. 2021) for these fits, which is able to jointly fit the aforementioned data.For the primary mass, we use a Gaussian prior of 0.67±0.04M ⊙ , doubling the standard deviation of 0.02 M ⊙ between literature mass measurements (Table 1).We use log-uniform or uniform priors on the other parameters following Brandt et al. (2021).We tested orbit fits where we further increase the width of the primary mass prior to 0.67 ± 0.08 M ⊙ (or 12% of the mass), and find the resulting posterior for companion mass shifts by < 1%, while the uncertainties on all parameters are consistent to the < 15% level.Note-The throughput is end-to-end throughput measured from top of the atmosphere, and varies with wavelength due to differential atmospheric refraction and the instrumental blaze function.The throughput is computed using the HIP 55507 A spectra using its 2MASS Ks = 6.613 (Cutri et al. 2003).We report the 95% percentile throughput over the K band, averaged over all frames.The median spectral S/N per pixel from 2.29-2.49µm is also reported.Note-A Gaussian prior of 0.67 ± 0.04 M⊙ was imposed on the primary star mass.
Our orbit and mass measurements are summarized in Table 4.We find a dynamical mass of 88.0 +3.4  −3.2 M Jup from this baseline fit.We run a second orbit fit that excluded the KPIC relative RVs to assess their effect on the results.We find that the addition of the two relative RV points from KPIC reduces the companion's mass uncertainty by ≈ 60% and shifts the median of the mass posterior to slightly higher values, as shown in Fig. 2. The uncertainty on the orbital eccentricity also reduces by ≈ 50% when including the relative RVs, and we find a moderate eccentricity of 0.40 ± 0.04.In Fig. 2, we visualize the effect of the relative RVs by plotting random draws from the posteriors of the relative RV (red) and no relative RV fit (blue).While the overall orbital trend is constrained by the other data, the KPIC relative RVs help narrow down the spread in relative RV space, thereby reducing the companion mass uncertainty.We place HIP 55507 B on a color-magnitude diagram (CMD) in Fig. 3.As shown, HIP 55507 B is consistent with a late-M spectral type, and is located very close to Trappist-1 A (an M8.0 star; Gillon et al. 2016) on the CMD.Indeed, Trappist-1 A has an inferred mass of 93 ± 6 M Jup from model fitting (Grootel et al. 2018), very similar to the dynamical mass we measure for HIP 55507 B. Using relations in Dupuy & Liu (2012) and our measured absolute K MKO of 9.63 ± 0.04, we estimate a spectral type of M7.5 ± 0.5 for HIP 55507 B.

Bulk properties and evolutionary state
From our spectral retrievals on the KPIC K band spectra (R ∼ 35, 000) and K, L ′ , M s photometry, we estimate log(L bol /L ⊙ ) = −3.29 ± 0.02 for HIP 55507 B (see details in § 7). 6In Fig. 4, we place HIP 55507 B's L bol on isochrone tracks from Baraffe et al. (2015), and find that the companion falls between the 0.08M ⊙ and 0.09M ⊙ isochrones.Therefore, the dynamical mass and L bol for HIP 55507 B are consistent with the Baraffe et al. (2015) substellar model for an age of ∼ 1 − 2 Gyr, suggesting that the companion has likely reached the hydrogen-burning main-sequence.

SPECTRAL ANALYSIS FRAMEWORK
In this section, we describe the framework to analyze KPIC spectroscopy of both HIP 55507 A and B. First, we describe the forward model for KPIC ( § 5.1), in- HIP 55507 B is shown as the red star, whereas purple and yellow points in the background are field brown dwarfs with late-M and early-L spectral types, respectively.We also label PZ Tel B, a late-M type substellar companion (Biller et al. 2010;Maire et al. 2016;Stolker et al. 2020), and Trappist-1 A (Cutri et al. 2003;Cutri et al. 2021), which have properties similar to HIP 55507 B.
cluding the model we use to fit fringing modulations ( § 5.1.1).Then, we describe the PHOENIX-ACES grid model fits to HIP 55507 A spectra ( § 5.2).Lastly, we 10 −3 10 −2 10 −1 10 0 10 1 Age (Gyr) Baraffe et al. (2015) for three different masses.We show the measured L bol for HIP 55507 B from spectral retrievals and the estimated age of 1-2 Gyr for the system as the purple shaded region.Both this region and the dynamical mass (0.084 ± 0.003M⊙) lie in between the 0.08M⊙ and 0.09M⊙ isochrones, suggesting that HIP 55507 B's measured properties are consistent with the evolutionary model, and that it is likely on the hydrogenburning main sequence.
layout the atmospheric retrieval setup ( § 5.3), which is applied to both HIP 55507 A and B to measure their molecular and/or isotopic abundances.

Forward model of the KPIC spectrum
Our forward model for KPIC spectra largely follows the framework in Xuan et al. (2022), with a few updates.In summary, we generate atmospheric templates with petitRADTRANS (Mollière et al. 2019(Mollière et al. , 2020)).These templates are shifted in RV and rotational broadening is performed using the open-source function from Carvalho & Johns-Krull (2023). 7 Next, we convolve the RV-shifted and rotationallybroadened templates with the instrumental LSF, which we determine from the spectral trace widths in the spatial direction ( § 3.3).As noted by Wang et al. (2021), NIRSPEC was designed with a difference in focal lengths in the spatial and dispersion directions by a factor of 1.13 (Robichaud et al. 1998).Following Wang et al. (2021), we conservatively allow the LSF width to vary between 1.0 and 1.2 times the width measured in the spatial di- 7 We note that the commonly used fastRotBroad function from PyAstronomy (Czesla et al. 2019) is only valid for small wavelength arrays, and the question of how small depends on spectral resolution.At R ∼ 35, 000, our injection-recovery tests ( § 6) show fastRotBroad can lead to v sin i biases at the ∼ 10% level for v sin i ∼ 5 km/s.In contrast, the Carvalho & Johns-Krull (2023) method is accurate over arbitrarily large wavelength grids.
rection when generating the instrument-convolved companion templates.This uncertainty propagates to our v sin i uncertainty.
Next, the atmospheric template is multiplied by the telluric and instrumental response, which we determine from spectra of the standard star HIP 56147.For the primary star, HIP 55507 A, that completes the forward model.For the companion, HIP 55507 B, the above procedures constitute a portion of its forward model.The other portion we need to consider for the companion is speckle contribution from the primary star, which we find to account for ∼ 1 − 10% of the total flux in HIP 55507 B's spectra given the relatively small separation of ≈ 0.75 − 0.8 ′′ between HIP 55507 A and B. To model the speckle contribution in the companion data, we use observations of HIP 55507 A taken immediately before the companion exposures.
Finally, we flux-normalize the companion and stellar models and multiply them by different flux scale factors, which are in units of counts as measured by NIR-SPEC.After scaling, the companion and speckle models are added in the case of HIP 55507 B. To remove the smoothly varying continuum in the KPIC spectra, we apply high-pass filtering with a median filter of 100 pixels (∼ 0.002 µm) on the data and forward models for both HIP 55507 A and B. The choice of 100 pixels was found to be optimal for KPIC data from Xuan et al. (2022) for accurately retrieving molecular abundances in KPIC data.To summarize, the forward model for HIP 55507 B is: where F M B denotes the forward model for HIP 55507 B, α c and α s are the flux scales of the companion and speckle, T is the telluric and instrumental response, M c is the companion template from petitRADTRANS, and D s is the observed KPIC spectra of HIP 55507 A, which already has T factored in.In contrast, the forward model for HIP 55507 A is: where α A is the flux scale of the primary star in its on-axis observations, M A is the primary star template from petitRADTRANS, and T is the same transmission function as above.The median filter is applied to both sides of these equations.In reality, we find additional modulation in the HIP 55507 AB data from fringing, which we also account for in our models.

Fringing model for KPIC data
KPIC data are affected by a time-varying fringing effect that produces quasi-periodic wiggles in the spectra that can imitate spectral absorption features (Finnerty et al. 2022).Given the high S/N of the HIP 55507 A and B spectra, we noticed the dominant component in the residuals is due to fringing.We describe the details of our fringing model in Appendix D. Here, we simply point out that one optic in KPIC (a dichroic) causes the fringing signal to change between the HIP 55507 A spectra and the off-axis HIP 55507 B spectra.The characteristic fringe period induced by this dichroic is ∼4 Å at 2.3 µm (see Fig. 5).We note that the fringe model effectively modifies the T component of Eq. 1 and Eq. 2 with an additional transmission term, and therefore applies to all our spectral fits for HIP 55507 A and B.
To incorporate fringing in our spectral fits, we adopt a three-step approach.First, we fit the spectra without the fringe model.The residuals from this first fit are characterized by fringing modulations.Second, we perform a least-squares optimization in the residuals of the first fit to find the best-fit fringing parameters that minimize the fringing signal.Third, in the final spectral fit, we fit the atmospheric parameters and fringe parameters jointly, while adopting the best-fit fringe parameters from the second step as initial guesses.The motivation for this is to avoid the excessively large and complex likelihood space from the fringe model, while also incorporating uncertainties from the fringe model into our atmospheric parameters.
As described in Appendix D, our fringe model adds three parameters for each spectral order.In Fig. 5, we plot the periodogram of the residuals with and without including the fringing model when fitting HIP 55507 A spectra.The power between ≈4-4.5 Å is noticeably attenuated by the fringe model.

PHOENIX-ACES model fits to HIP 55507 A
To derive the primary star's bulk properties, we first fit its KPIC spectra with the PHOENIX-ACES model (Husser et al. 2013), which here constitutes M A in Eq. 2. Specifically, we use two spectral orders spanning 2.29-2.41µm, with a gap in between.Our model grid assumes solar metallicity, and we vary the T eff , log(g), RV, v sin i, and stellar flux scale (α A in Eq. 2).The parameters for the PHOENIX-ACES model fits are summarized in Table 6.We note that for HIP 55507 A, v sin i acts as a stand-in for the combined effects of rotational broadening and macroturbulence. 8The results of the PHOENIX-ACES fits are presented in Appendix E. Next, we fit the HIP 55507 A spectra using a retrieval framework (see below).

Atmospheric retrieval setup
Here, we describe the atmospheric retrieval setup for HIP 55507 B and A to generate M c and M A in Eq. 1 and Eq. 2, respectively.Retrievals allow us to measure the isotopologue abundances in both stars.Specifically, we setup radiative transfer routines with petitRADTRANS using the line-by-line opacity sampling method, and down-sample the native R = 10 6 opacity tables by a factor of 3 to speed up the retrievals.In the following, we describe the opacities, chemistry, temperature profile, and cloud models used in the retrievals.The fitted parameters for HIP 55507 B are summarized in Table 5.
We note that compared to the retrieval analysis of HIP 55507 B, our retrievals for HIP 55507 A con-tain several simplifications, which we highlight throughout this section.Carrying out a retrieval with a free temperature profile and chemical abundances, as we do for HIP 55507 B, is not realistic at this stage for HIP 55507 A. Our K band spectrum for this K6V star is dominated by CO lines with minor contributions from a few atomic lines.H 2 O is mostly dissociated in the K6V star's photosphere such that we cannot constrain the relative ratios of C and O.With more wavelength coverage (e.g.H+K bands to probe OH, CO, CN), a spectral synthesis approach could be a way to measure elemental abundances and C/O for HIP 55507 A, as achieved for a K7V dwarf by Hejazi et al. (2023).

Opacity sources
We require high temperature opacities for our stars.For HIP 55507 B, our preliminary retrievals show that there is contribution to the emission spectrum from regimes with T > 3000 K (see Fig. 6), which exceeds the 3000 K upper limit of default petitRADTRANS opacity tables for molecules (Mollière et al. 2019).Therefore, whenever possible, we update our opacity tables to go to T max = 4500 K or higher using the DACE opacity database generated with the HELIOS-K opacity calculator (Grimm & Heng 2015;Grimm et al. 2021). 9In particular, we upgrade the line opacities of H 162 O (Polyansky et al. 2018), OH (Brooke et al. 2016), FeH (Dulick et al. 2003;Bernath 2020), TiO (McKemmish et al. 2019), AlH (Yurchenko et al. 2018), andVO (McKemmish et al. 2016) to reach 4500 K.For H 18 2 O, we adopt the line list from Polyansky et al. (2017) which is valid up to 3000 K.For H 2 S, we use the line list from Azzam et al. (2016), valid up to 2000 K. Finally, we include the atomic line species Na, K, Mg, Ca, Ti, Fe, and Al (Kurucz 2011).
For HIP 55507 A, the photosphere is at even higher temperatures, but the K band spectra of this star is dominated by mostly CO and the aforementioned atomic lines.Therefore, we only include these opacities for the HIP 55507 A retrievals.We generate opacities for C 16 O, 13 CO, C 18 O that are valid up to 9000 K from Rothman et al. (2010).
For the continuum opacities in both stars, we include the collision induced absorption (CIA) from H 2 -H 2 and H 2 -He, as well as the H-bound-free and free-free opacity.

Chemistry and isotopologue ratios
The default chemical equilibrium grid in petitRADTRANS does not save the abundances of all the species we include as opacity sources.Therefore, 9 https://dace.unige.ch/opacityDatabase/we generate a custom chemical equilibrium grid using easyCHEM,10 which is the same code used by Mollière et al. (2020).We validated our new grid against the petitRADTRANS chemical grid for overlapping species and find excellent agreement (fractional differences of < 1%).The abundances of species are set by two parameters in our grid: the carbon abundance [C/H], and the carbon-to-oxygen ratio C/O, which determines the oxygen abundance along with [C/H].We are only sensitive to the abundances of C and O in this work, and therefore assume that the other metals scale with C. Our grid goes up to 8000 K, more than hot enough for the K6V primary star.For the solar elemental abundances, we adopt Asplund et al. (2009).
In our retrievals, the abundances of the main isotopologues are obtained from interpolating the chemical equilibrium grid for each value of C/O and [C/H].Then, for each minor isotopologue included, we fit for an isotopologue ratio parameter akin to Zhang et al. (2021b).In our baseline retrievals, we fit for three ratios: For HIP 55507 B, we adopt a modified version of the pressure-temperature (P-T) profile from Piette & Madhusudhan (2020).Our profile is parameterized by seven ∆T /∆P values between eight pressure points and the temperature at one of these pressures.Instead of having the pressure points equally spaced in log pressure, we preferentially concentrate pressure points around the peak of the weighted emission contribution, as this is where the data are most informative.The selected pressure points are labeled in Fig. 6, and the modeled pressure extent is between log(bar) = -4.0 to 1.4.For the radiative transfer, the eight P-T points from our profile are interpolated onto a finer grid of 100 P-T points using a monotonic cubic interpolation as recommended by Piette & Madhusudhan (2020).Unlike Piette & Madhusudhan (2020), we do not apply smoothing to our profiles as smoothing has been shown to bias retrieval results (Rowland et al. 2023).b Parameters for the EddySed cloud model.XAl 2 O 3 is the scaling factor for the cloud mass fraction, so that log( XAl 2 O 3 ) = 0 refers to a fraction equal to the equilibrium mass fraction.f sed , Kzz, and σg together set the cloud mass fraction as a function of pressure and the cloud particle size distribution (Mollière et al. 2020).c The error multiple term is fitted for KPIC data to account for any underestimation in the uncertainties.
For HIP 55507 A, we fix its P-T profile to a Phoenix P-T profile (Husser et al. 2013) matching properties of the star (T eff = 4300 K and log(g)=4.5)for simplicity.

Clouds
Clouds are expected to play a minimal role for late-M objects like HIP 55507 B, and no role for a K6V star like HIP 55507 A, as temperatures are too hot for cloud condensates to remain stable.For completeness in our HIP 55507 B retrievals, we consider both clear and cloudy models to explore the sensitivity of our retrieved abundances to assumed cloud properties.For the cloudy models, we use a gray cloud model where a constant opacity is added to the atmosphere, and the EddySed model (Ackerman & Marley 2001) as implemented in petitRADTRANS (Mollière et al. 2020).We used Al 2 O 3 clouds in the EddySed model, as Al 2 O 3 is expected to be more important at higher T eff (Wakeford & Sing 2015).

Summary of retrieval setup for both stars
As noted earlier, we make simplifications in retrieving the spectra of HIP 55507 A. To summarize the retrieval setup for A: 1) we adopt priors on C/O and [C/H] for HIP 55507 A using measured values from HIP 55507 B, 2) fix the P-T profile to a Phoenix P-T profile (Husser et al. 2013), and, 3) allow the stellar mass and radius to vary within 1σ intervals given in Table 1.
In contrast, we freely fit for all these parameters in the HIP 55507 B retrievals, with the exception of mass.For the companion's mass, we adopt a dynamical mass prior determined from § 4. The fitted parameters and adopted priors in HIP 55507 B and A retrievals are listed in Table 5 and Table 6, respectively.

Jointly fitting photometry for HIP 55507 B
For HIP 55507 B, we jointly fit the KPIC highresolution spectra with the K, L ′ , and M s photometric points in Table 2 to better constrain the bulk properties of the companion.The apparent magnitudes were converted into flux density units by computing the zeropoint for each photometric filter using the species package (Stolker et al. 2020).For the photometry model, we use the correlated-k opacities in petitRADTRANS (rebinned to R = 50).The photometry model does not add any new parameters, as it is fully described by the atmospheric parameters introduced earlier.In joint KPIC+photometry retrievals, we add the log likelihoods from the photometry and KPIC components.

Model fitting with nested sampling
We use nested sampling as implemented by dynesty (Speagle 2020) to find the posterior distributions for all model parameters listed in Table 5 for HIP 55507 B, and Table 6 for HIP 55507 A. We use 600 live points and adopt the stopping criterion that the estimated contribution of the remaining prior volume to the total evidence is less than 1%.We confirmed that increasing the number of live points to 1000 does not meaningfully change the posteriors of our retrieved parameters.

INJECTION-RECOVERY TESTS
To validate our retrieval framework, we perform a series of injection-recovery retrievals on simulated data for HIP 55507 B. We inject model spectrum from petitRADTRANS in the extracted spectrum of a nonilluminated fiber.Such a fiber still measures the thermal background of the instrument, and serves as a realistic 'noise spectrum' since thermal noise is the dominant source of noise for our data.Specifically, we use the extracted fiber 4 trace at the time of observations.We took the fiber 4 trace on exposures where HIP 55507 B was aligned to fiber 2, at which time fiber 4 was located ∼ 2 ′′ away from the companion and ∼ 2.5 ′′ away from HIP 55507 A. Examination of the extracted spectra from fiber 4 shows that there is negligible leaked light: the median of the flux is ≈ 0 counts.We multiply the companion model by the telluric response function (T ) for fiber 4, add a speckle flux contribution using the primary star spectra, and high-pass filter the simulated data in the same way as for the real data.
For the input companion model, we use a P-T profile from the SPHINX model grid (Iyer et al. 2023) with T eff = 2500 K, log(g)=5.25,solar metallicity, and C/O=0.7.We set the mass (87 M Jup ) and radius (1.1 R Jup ) of our injected companion to be consistent with this log g, and the chemical abundances to C/O=0.7 and [C/H] = 0, consistent with that assumed in the P-T profile.To achieve a similar S/N as the real data, we inject similar companion and speckle flux values as the data.We carry out two injections at different RV shifts (-10 and 10 km/s) to sample various parts of the background trace.In addition to simulating a KPIC model, we also simulate three photometry points using the same input values.The parameters of the simulated models are given in Table 7.

Note-
The injections were performed on a non-illuminated KPIC fiber to sample realistic thermal noise properties.We place a Gaussian prior on the mass, so do not report this value.As shown in Table 7, log( 12 CO/ 13 CO) and log (H 16  2 O/H 18 2 O) are recovered, though systematic offsets of 0.05 − 0.1 dex can be present in the retrieved log( 12 CO/ 13 CO).On the other hand, the systematic bias is only ∼ 0.03 dex for log (H 16  2 O/H 18 2 O).To be conservative, we adopt 0.1 dex as the systematic error for both of these isotopologue ratios in our retrievals of the real data.As mentioned in § 5.3, the choice of rotational broadening kernel can have an impact on the retrieved v sin i.Even when using the direct integration method from Carvalho & Johns-Krull (2023), we note that the retrieved v sin i can still be biased by the down-sampling factor for the line-by-line opacities.At the KPIC resolution of R ∼ 35, 000 and for a v sin i of 5.0 km/s (technically below our resolution limit of ∼ 7.5 km/s), we find that down-sampling the native R = 10 6 opacities by a factor of 3 or less allows us to accurately recover the input v sin i of 5.0 km/s.

HIP 55507 B
We run three sets of retrievals for HIP 55507 B: two sets for the 2021 and 2023 KPIC datasets separately, and one set that combines the 2021 and 2023 KPIC data.By default, we include the K, L ′ , and M s photometric data in the retrievals, but we also tested fits where we ex-  The speckle contribution is small, and consistent with zero for the first spectral order (top three panels), where we omitted the purple line.
cluded the photometry.Retrieved parameters from each set of retrievals are presented in Table 8, and the baseline retrieval (2021+2023+photometry) is in bold.We plot the KPIC spectra and best-fit models in Fig. 7, while the photometry fit is shown in Fig. 8.The joint posterior distributions of a few parameters from the baseline retrieval are shown in Fig. 9.

P-T profile and clouds
The P-T profile from the baseline retrieval (clear model) is shown in Fig. 6.The cloudy models give almost identical P-T shapes as the clear model.We find that the lower atmosphere is fairly consistent with the self-consistent SPHINX models from Iyer et al. (2023), but the upper atmosphere is hotter and more isothermal.This could be due to a trade-off between clouds and an isothermal P-T profile, which is seen in most retrieval studies (e.g.Burningham et al. 2017;Xuan et al. 2022;Brown-Sevilla et al. 2023;Whiteford et al. 2023).As demonstrated by Xuan et al. (2022), narrow-band highresolution spectra can be largely insensitive to clouds but still sensitive to gas-phase molecular abundances.
To check if the isothermal upper P-T profile affects our results, we ran a retrieval for HIP 55507 B with the P-T profile fixed to the T eff = 2400 K, log g = 5.25 SPHINX profile in Fig. 6.The resulting posteriors from this retrieval are consistent with the those from our baseline retrieval within 1σ, so we conclude that the isothermal upper atmosphere is not biasing our results.
For the 2023 KPIC dataset, we tested three clouds models: clear, gray opacity, and EddySed with Al 2 O 3 .To assess whether clouds are preferred by the data, we use the Bayesian evidence from each retrieval to calculate the Bayes factor B, which assesses the relative probability of an alternative model M 2 compared to M 1 .Here, we take the clear model to be M 1 .The data slightly prefer the gray opacity and EddySed models over the clear model, with ln(B)=2.5 and ln(B)=2.3,respectively, which correspond to ∼ 2.6σ preferences for the cloudy models using the Trotta (2008) scale.However, the cloud parameters are largely unconstrained, with a 3σ upper limit of 0.009 cm 2 /g for the gray opacity.The retrieved abundances are also identical between the cloudy and clear models (see Table 8), so we adopt the clear model as the baseline model.Note-A few atmospheric parameters and their central 68% credible interval with equal probability above and below the median are listed.These values only account for statistical error.In the final row, we list the adopted values accounting for systematic errors from the retrieval.The rightmost column lists the log Bayes factor ln(B) for each retrieval.We compute ln(B) with respect to the baseline model for each dataset, i.e. the models with ln(B)=0.Unless specified in parentheses, we use a clear model.'Gray' refers to the gray opacity cloud model, and 'Al The CCF between the 13 CO-only template and (data -best-fit model without 13 CO) in blue.The CCF between the 13 CO-only template and (data -best-fit model with 13 CO) is shown in red.The fact that the blue CCF shows a peak at the companion's rest frame (gray solid line) indicates a real 13 CO detection.For comparison, the gray dotted line is the telluric rest frame.In the red CCF, we do not expect a peak since 13 CO is fitted for in this model, so the residuals should be free of 13 CO.Right panel: same but for H 18 2 O.The 13 CO signal is much clearer than the H 18 2 O signal, which remains tentative at this stage.
bias we identify in our injection-recovery tests.In our reported values, which are based on a joint fit to both 2021 and 2023 datasets, we add a 0.1 dex systematic error in quadrature to the measurement errors.In summary, we report 12 CO/ 13 CO = 98 2 O isotopologues are needed to fit the data or whether we can adjust other parameters to improve the fits, we perform two retrievals with one of these isotopologues removed in each.These constitute the 'reduced models'.We then calculate the Bayes factor between these reduced models and the full model with all isotopologues included, which are tabulated in Table 8.The ln(B) values correspond to a 7.8σ detection of 13 CO and 3.7σ detection of H 18 2 O.We can obtain a complementary perspective on the robustness of these detections using the cross-correlation method, following the approach in Zhang et al. (2021a) and Xuan et al. (2022).The goal of this analysis is to assess whether the full models prefer 13 CO and H 18 2 O independent of the Bayes factor calculation from our retrievals.To compute the cross-correlation function (CCF), we follow the framework from Ruffio et al. (2019), so the y-axis of our CCFs is the estimated flux level (in counts) of the isotopologue signal from a leastsquares minimization.
First, we compute the CCF between a 13 CO-only model and the (data -model without 13 CO).The latter is equivalent to the residuals of the reduced model, and will contain residual 13 CO lines if the data contains 13 CO.Then, we compute the CCF between the 13 COonly model and the (data -model with 13 CO).This second CCF should not show a detection, as 13 CO is already fitted for in the model with 13 CO (i.e. the full model).We generate the isotopologue-only models by manually zeroing the opacities of all other line species except the isotopologue when computing the full model.The same process is repeated for H 18 2 O, whose CCFs are shown in the right panel of Fig. 10.
We find that the 13 CO signal is cleaner compared to the H 18 2 O signal, as the CCF for H 18 2 O shows stronger residual structure in the wings, although there is a peak around 0 km/s (companion's rest frame) consistent with a real signal.However, because the remaining systematics are on a scale similar to that of the peak, we consider the H 18 2 O detection to be tentative in these data.It is possible that this detection is produced by remnant fringing features that our fringe model did not perfectly remove and/or residual telluric features, which are especially strong in the 2.45 − 2.49 wavelength region where the H 18 2 O lines are strongest.A future upgrade to KPIC should greatly reduce the fringing from the dichroics, allowing us to re-visit H 18 2 O in HIP 55507 B's atmosphere with more confidence.Xuan et al. (2022) and Wang et al. (2022) for benchmark BD companions, where it was as-sumed that the BD companions have the same compositions as their host stars.
We adopt a systematic error of 0.04 in C/O and 0.12 dex in [C/H] for our baseline retrieval, and report [C/H] = 0.24 ± 0.13, [O/H] = 0.15 ± 0.13, and C/O=0.67 ± 0.04 for HIP 55507 B. The primary star HIP 55507 A has [Fe/H] = −0.02± 0.09 from Keck/HIRES spectra in the optical (Table 1), consistent with a solar metallicity.If we assume [Fe/H] = [C/H] for the primary star, this implies the [C/H] between HIP 55507 A and B are consistent to within 1.6σ.

Effective temperature, luminosity, and radius
The addition of the photometry data in K, L ′ , and M s bands helps constrain the bulk parameters of HIP 55507 B. For example, when we omitted the photometry for the May 2023 retrieval, the retrieved radius is R = 1.92 ± 0.27 R Jup , while retrievals with the the photometry yield R = 1.32 ± 0.02 R Jup (Table 8).We integrate model spectra with parameters drawn from the posteriors of our baseline retrieval to compute log(L bol /L ⊙ ) = −3.29 ± 0.02 and T eff = 2350 ± 50 K.While the statistical uncertainties on these parameters are small, we note that the model uncertainties are likely larger since the flux information is derived from three photometric points covering a small portion of the L bol budget.
Given measurements of the dynamical mass and L bol , we can compare the spectrally-inferred radius and T eff to the predictions from evolutionary models.To do so, we interpolate the BHAC15, AMES-COND, and AMES-Dusty models (Baraffe et al. 2015;Allard et al. 2001) with Gaussian distributions of m = 88.0 ± 3.4 M Jup and log(L bol /L ⊙ ) = −3.29 ± 0.02.We find that the evolutionary models favor R ≈ 1.08 ± 0.02 R Jup and T eff = 2530 ± 80 K, i.e. a smaller radius and larger T eff than the spectral retrievals.A similar radius-T eff degeneracy has been noted by several retrieval studies, although the discrepancy is usually in the opposite direction for colder brown dwarfs, with retrievals finding a smaller radius than evolutionary models (e.g.Lueber et al. 2022;Gonzales et al. 2022;Hood et al. 2023).Sanghi et al. (2023) compared radii inferred by evolutionary models and atmospheric models for a large sample of brown dwarfs and found significant discrepancies in T eff and radius for late-M/early-L spectral types in both directions, which highlights ongoing challenges in measuring bulk properties from substellar atmospheric models and retrievals (see also Dupuy et al. 2010 for late-M dwarfs).

Projected rotation rate
We measure a relatively slow v sin i = 5.4 ± 0.2 km/s for HIP 55507 B, which is below the KPIC resolution limit of ∼ 7.5 km/s at R ∼ 35, 000.The high S/N of the data allow us to tightly constrain v sin i values below the resolution limit, as we demonstrated using injectionrecovery tests (Table 7).

HIP 55507 A
Using the higher S/N spectra from 2023, we carry out retrievals with the sole goal of measuring isotopic abundances in HIP 55507 A. The best-fit model and stellar spectra are shown in Appendix F. We are able to measure 12 CO/ 13 CO and C 16 O/C 18 O in the photosphere of the primary star.We add the same 0.1 dex systematic error as we did for HIP 55507 B, resulting in 12 CO/ 13 CO = 79 +21 −16 and C 16 O/C 18 O = 288 +125 −70 .In these HIP 55507 A retrievals, we assumed a fixed P-T profile (T eff = 4300 K, log g = 4.5).To assess the impact of this assumption on the resulting isotopic abundances, we repeated the fits with T eff = 4200 K and T eff = 4400 K P-T profiles (same log g).We find that varying the P-T profile has little effect on the results; the posteriors shift by < 1σ.

Relative RVs between HIP 55507 AB
By combining the retrievals for HIP 55507 A and B, we compute the relative RV between the stars at the time of observation.The RV values corrected for barycentric motion are provided in Appendix C. In both the 2021 and 2023 epochs, the stellar and companion RVs measured from fiber 3 are higher compared to those measured from fiber 2.This may be due to different RV zeropoints for each fiber.To compute the relative RV, we subtract the stellar RV from the companion RV for each fiber separately, and then take the average.For the 2023 epoch, the relative RV is consistent at the < 0.05 km/s level between fibers.We conservatively adopt 0.1 km/s as the uncertainty.For the 2021 epoch, we adopt a larger uncertainty of 0.2 km/s as the relative RV values disagree by ∼ 0.15 km/s between fibers.

Relative radial velocities and dynamical mass
In this paper, we demonstrate the value of relative RV data in orbit fits, which are uniquely enabled by direct measurements of the companion RV (Ruffio et al. 2019;Ruffio et al. 2023).When the primary star has sufficient absorption lines in the K band, as is the case for HIP 55507 A, we can directly measure the relative RV between the primary star and companion at the same epoch with Keck/KPIC.This measurement is powerful since it is insensitive to potential systematics from zeropoint offsets between different instruments used to acquire the spectra.By including two epochs of KPIC relative RVs in our orbit fit for HIP 55507 AB, we find a 60% improvement in the dynamical mass measurement for HIP 55507 B (88.0 +3.4 −3.2 M Jup ).Dynamical masses of low-mass companions are key measurements that allow us to test evolutionary and atmospheric models.Future work should explore whether relative RVs can also improve constraints on companion mass in systems with longer orbital separations (and therefore less orbital coverage), as many directly imaged companions have orbital separations ≳ 100 AU.
We note that our orbit solution for HIP 55507 AB also represents a significant improvement compared to those presented in Feng et al. (2022), who did not use relative astrometry data from imaging and only had access to the first 6.3 years of HIRES RVs.Their derived orbital period of 14.0 ± 1.4 years and companion mass of 5.0 ± 0.6 M Jup for HIP 55507 B is significantly discrepant from our results.Furthermore, the observed luminosity of the companion from our NIRC2 data is consistent with a low-mass star and not a 5.0 M Jup planet (see Fig. 4).In addition, we cannot re-produce their results even if we used the same data as Feng et al. ( 2022), namely the first 6.3 years of HIRES RVs and Gaia-Hipparcos absolute astrometry.In this case, our fits result in unbounded posteriors for mass and other orbital parameters (e.g. with a 1σ interval for semi-major axis from 13-840 AU).We conclude that the choice of prior ranges in the orbit fit may be biasing the Feng et al. ( 2022) results for HIP 55507 B.

Isotopologue ratios
Isotopologue ratios are thought to have implications for the formation pathway of planets and substellar com-panions, but our knowledge of how carbon and oxygen isotopic ratios relate to formation is still limited.We can benchmark the value of isotopologue measurements by using higher-mass brown dwarf and stellar companions which form via gravitational instability from a protostellar disk or molecular cloud.Because these systems are dominated by gas accretion, they should exhibit the same isotopic ratios between the primary and secondary components, which we can test observationally.To our knowledge, for main-sequence stellar binaries, this test has only been demonstrated once with a M dwarf binary system (Crossfield et al. 2019).
Using high-resolution spectra from Keck/KPIC (R ∼ 35, 000), we perform atmospheric retrievals for the M7.5 companion HIP 55507 B (T eff ∼ 2400 K) and its K6V primary star (T eff ∼ 4300 K).For HIP 55507 B, we retrieve [C/H] = 0.24 ± 0.13 and C/O = 0.67 ± 0.04.As shown in Fig. 11 (Lyons et al. 2018).A large difference between the 16 O/ 18 O in HIP 55507 AB and the Sun is not unexpected, as measurements of 16 O/ 18 O in molecular clouds at the solar galactocentric distance show a factor of ∼ 3 scatter (Nittler & Gaidos 2012).Furthermore, studies of solar twins also reveal a wide range in 16 O/ 18 O, with values as low as 50 − 100 (Coria et al. 2023).Given the tentative nature of the H With a case study of the M7.5 companion HIP 55507 B using Keck/KPIC spectroscopy, we demonstrate the ability to measure carbon and oxygen elemental and isotopic abundances for late-M spectral types.In addition, we use KPIC to measure 12 C/ 13 C and 16 O/ 18 O for its K6V primary star and confirm that the companion and primary share the same isotopic abundances.While we made simplifications in our analysis of HIP 55507 A, future work with more extensive wavelength coverage (e.g.H + K bands) could explore more sophisticated retrievals for late-K and early-M dwarf stars.Finally, the projected separation and flux ratio between HIP 55507 A and B are comparable to systems with young (∼ 1 − 50 Myr) substellar companions of similar spectral types as HIP 55507 B (T eff ∼ 2000 − 2800 K), which opens the door to a systematically measuring the elemental and isotopic abundances of these companions with KPIC.We identified three sources of fringing in KPIC data, (two dichroics in KPIC, and optics in the NIRSPEC entrance window Finnerty et al. (2022).One of the two dichroics in particular causes the fringing signal to change when we switch from observing the primary star to observing an off-axis companion, as this dichroic is directly downstream of our fiber injection unit tip-tilt mirror which steers the light of either the star or companion in the fiber.When the tip-tilt mirror switches from the on-axis star to the off-axis companion, the angle of incidence of light into the dichroic changes, which causes the fringing signal to change.The change in modulation, t, as light passes through a transmissive optic is described by the well known formula: Here, F = 4R/(1 − R) 2 where R is the reflectivity of the material, n is the index of refraction of the material which depends on temperature and wavelength, l is the thickness of the material, θ is the angle of incidence into the material, and λ is the wavelength of light.All KPIC observations to date have spectra affected by three fringing modulation terms multiplied in series, but two of them are expected to be relatively static when going from star observations to companion observations.We fit the fringing signal in these spectra with a simplified approximation where the companion observations experience an additional modulation term as compared to the star observations.We also simplify the above equation to: We multiply t ′ onto the spectral response (i.e.T in Eq. 1 and Eq. 2) to match the fringing in the observed spectra for both HIP 55507 A and B. We fit for three parameters per spectral order: an optical path length (d) term that combines both the thickness of the glass and the angle of incidence, the fractional amplitude of the ghost from the dichroics (F ), and the temperature of the dichroics (T d ) that governs the index of refraction.To model the CaF 2 dichroic we used the Sellmeier coefficients reported by Leviton et al. (2008) to determine how the index of refraction changes with wavelength and temperature.Each science fiber is treated separately, as the fringing is different in each due to different angles of incidence.

E. FITTING HIP 55507 A SPECTRA WITH PHOENIX-ACES MODELS
We fit the HIP 55507 A spectra using PHOENIX-ACES models (Husser et al. 2013) to measure RV, T eff , and log g.Our grid of PHOENIX-ACES models assumes solar metallicity and has 100 K spacing in T eff and 0.5 dex spacing in log g.The forward model and fringing model used for this fit are described in § 5.1.
From these fits, we obtain a fairly consistent picture of T eff and log(g) between the different observation epochs.Our statistical errors on each measured T eff and log(g) are very small: ∼ 15 K for T eff and 0.01 dex for log(g).In reality, model uncertainties are expected to be larger so we report the weighted averages and adopt half a grid step as the error bars.In summary, we find T eff = 4200 ± 50 K and log(g)= 4.40 ± 0.25, which agree within 1σ with literature values listed in Table 1.

Figure 1 .
Figure 1.Left: The posterior probability distribution function for the age of HIP 55507 A from BAFFLES (solid blue line), given a lithium equivalent width upper limit of 20 m Å and B-V=1.24.The different shaded regions are 1, 2, and 3σ lower limits for the age.Middle: TESS light curves from Sectors 21 and 22 extracted from the lightkurve package showing periodic modulation.Right: Interpreting this as rotational modulation, a Lomb-Scargle periodogram shows a rotation period of 15.8±1.8days.The uncertainties on the rotation period were determined from the full-width half maximum of the peak.These two lines of evidence both point towards an age of ≈ 1 − 2 Gyr for the star.

1 .
Orbit fits with relative RVs

Figure 2 .
Figure2.Left: model relative RV of the HIP 55507 AB system over time from random draws to the posterior distributions of the orbit fits.The red and blue curves are from the fit with and without the relative RVs, respectively.The data points show the observed relative RVs from KPIC.Right: The companion mass posteriors with (red) and without (blue) using the relative RVs, which show a reduction in the mass uncertainty and a slight shift of the median value when the relative RV is incorporated.

Figure 3 .
Figure 3.A color-magnitude diagram with MK and K −L ′ .HIP 55507 B is shown as the red star, whereas purple and yellow points in the background are field brown dwarfs with late-M and early-L spectral types, respectively.We also label PZ Tel B, a late-M type substellar companion(Biller et al. 2010;Maire et al. 2016;Stolker et al. 2020), and Trappist-1 A(Cutri et al. 2003;Cutri et al. 2021), which have properties similar to HIP 55507 B.

Figure 5 .
Figure5.Lomb-Scargle periodograms of the residuals from fitting the KPIC spectra of HIP 55507 A. The blue and red periodograms are generated from the residuals of fits with and without the fringing model, respectively.The power between ≈ 4 − 4.5 Å, which is the characteristic frequency of fringing from the KPIC dichroic, is greatly diminished.The two panels are for different spectral orders.
) Fringe and other parameters Optical path length, d (mm) U(4, 5) Comp.flux, αc (counts) U(0, 300) Fractional amplitude, F U(10 −6 , 1) Speckle flux, αs (counts) U(0, 200) Dichroic temperature, T d (K) U(150, 330) Error multiple (c) U(1, 5) Note-U stands for a uniform distribution, with two numbers representing the lower and upper boundaries.N stands for a Gaussian distribution, with numbers representing the median and standard deviation.The fringe parameters d, F , and T d are described in Appendix D. a Parameter for the gray cloud model (constant gray opacity).

Figure 6 .
Figure 6.Left: blue: random draws from the posterior of the retrieved P-T profiles from the baseline retrieval.The gray lines show SPHINX models (Iyer et al. 2023) with similar bulk properties as HIP 55507 B. The condensation curves for Fe and Al2O3 clouds are plotted in colored dashed lines.The horizontal ticks on the y-axis are pressure points between which we fit ∆T values in our P-T parameterization.Right: The emission contribution function of the best-fit baseline model.There is non-zero contribution at ∼ 5 bars, where the temperature profile (left panel) exceeds 3000 K.
The log(C 16 O/C 18 O) posterior is not well-bounded, though the 3σ lower limit for log(C 16 O/C 18 O) does contain the injected value.Further tests show that we cannot reliably retrieve values of C 16 O/C 18 O = 200 − 300, suggesting it is harder to detect C 18 O compared to H 18 2 O with our KPIC spectra.From examining the C 18 O opacities, we find that this is may be due to the fact that many C 18 O lines overlap in wavelength with 13 CO lines, thereby masking the weaker signal from C 18 O.From the injection-recovery tests, we find that C/O and [C/H] are well-recovered, with only ∼ 0.01 deviations in C/O between the injected and recovered values, and < 0.02 dex deviations in the [C/H] values.We attribute the slight offsets between the injected and retrieved values to random noise in the background trace.

Figure 7 .
Figure 7. KPIC data (2023, fiber 2) for HIP 55507 B are plotted in black, with error bars in gray.We plot two out of three spectral orders (2.29 − 2.41 µm), and each order is broken into three panels.The full model (F MB in Eq. 1) is in red, and consists of the companion model (Mc) in blue, which has been RV shifted and broadened, the stellar spectra (Ds) in purple to model the speckle contribution, and the telluric and instrumental response (T ).The fringing model is also incorporated in the full model.The residuals are shown as gray points.For clarity, an offset of +100 counts was added to the companion model.The speckle contribution is small, and consistent with zero for the first spectral order (top three panels), where we omitted the purple line.

Figure 9 .
Figure 8.The photometry part of the retrieval for HIP 55507 B. The data are plotted in colored points, with filter transmission functions shown below.The best-fit model photometry points are shown in black open circles.The black curve is the best-fit spectra underlying the model photometry, while blue curves are random draws from the posterior.

Figure 10 .
Figure10.Left panel: The CCF between the 13 CO-only template and (data -best-fit model without 13 CO) in blue.The CCF between the 13 CO-only template and (data -best-fit model with 13 CO) is shown in red.The fact that the blue CCF shows a peak at the companion's rest frame (gray solid line) indicates a real 13 CO detection.For comparison, the gray dotted line is the telluric rest frame.In the red CCF, we do not expect a peak since 13 CO is fitted for in this model, so the residuals should be free of 13 CO.Right panel: same but for H 18 2 O.The 13 CO signal is much clearer than the H 18 2 O signal, which remains tentative at this stage.

Figure B1 .
Figure B1.An example pyklip fit for the NIRC2 imaging data from UT 2022 June 9 with the K filter.The companion PSF after ADI is shown on the left panel, the forward model in the middle panel, and residuals in the right panel.

Figure B2 .
Figure B2.Results from the orbit fit using host star radial velocity (top left), relative astrometry (top right), absolute astrometry from Gaia and Hipparcos (bottom panels), and relative RVs from KPIC (shown in Fig.2).The orbit fit is performed with the orvara package(Brandt et al. 2021).The random draws from the posterior are color-coded by the companion mass.

Table 1 .
Properties of HIP 55507 AB

Table 2 .
NIRC2 Astrometry and Photometry for HIP 55507 B

Table 4 .
Selected parameters from orbit fit 12 C 16 O/ 13 C 16 O, 12 C 16 O/ 12 C 18 O, and H 16 2 O/H 18 2 O.This allows us to explore whether the 16 O/ 18 O ratio differs between CO and H 2 O, which may arise from isotopic fractionation processes such as selfshielding of CO and UV shielding of H 2 O (Calahan et al. 2022).In addition, fitting two ratios allows us to examine whether the data show evidence for H 18 2 O, 12 C 18 O, or both.

Table 5 .
Fitted parameters and priors in HIP 55507 B retrievals

Table 6 .
Fitted parameters and priors in HIP 55507 A retrieval and PHOENIX-ACES fit Note-Symbols for priors are same as Table5.The parameters for the HIP 55507 A retrieval and PHOENIX-ACES fits are in the left and right columns, respectively.'Fringe and other parameters' are common to both.For C/O and [C/H], Bµ and Bσ represent the median and 1σ interval measured for the companion, HIP 55507 B, which are used as Gaussian priors in the HIP 55507 A retrieval.
Since we do not detect C 16 O/C 18 O in the data, we inject a lower value of C 16 O/C 18 O = 600 (log(C 16 O/C 18 O) ≈ 2.778) to see whether this can be recovered in our tests.Note that our isotopologue ratios are fitted in log scale in the retrieval.

Table 7 .
Input and retrieved parameters from injection-recovery tests

Table 8 .
Spectral Retrievals and Results , our measured 12 CO/ 13 CO = 98 +28 −22 for HIP 55507 B is consistent to within 1σ with our measured 12 CO/ 13 CO = 79 +21 −16 for the primary star under the assumption that HIP 55507 A and B share the same C/O and [C/H].Furthermore, the 16 O/ 18 O measured from H 2 O in HIP 55507 B is 240 +145 −80 , consistent with 16 O/ 18 O = 288 +125 −70 measured from CO in HIP 55507 A. The agreement between 12 C/ 13 C and 16 O/ 18 O in the HIP 55507 AB system represents is a rare test of chemical homogeneity for stellar binaries using isotopic ratios.

Table C1 .
Radial Velocity Measurements for HIP 55507 A and B from KPIC.We have applied the barycentric correction to the individual RVs for A and B, so their reference is the solar system barycenter.The relative RV is defined as RVB -RVA.For the relative RV values, we inflated the errors to account for systematics between fibers.
F. FITTING HIP 55507 A SPECTRA WITH PETITRADTRANS KPIC spectra for HIP 55507 A are plotted in black.We break up each spectral order into three panels.The full model (F MA in Eq. 2) is in red, and includes the stellar model (MA) from petitRADTRANS in blue and the telluric and instrumental response (T ).The fringing model is also incorporated in the full model.The stellar model is offset by +1200 counts for clarity.The residuals are shown as gray points.CO lines dominate at these wavelengths for HIP 55507 A. We measure 12 CO/ 13 CO and C 16 O/C 18 O from the spectrum.