# 7.7.3 Processing steps

Two different pipelines where utilised in order to produce the combined solutions of the two different models. The processing steps of the production of AstroSpectroSB1 are described here. The combination of eclipsing and spectroscopic binaries employs code developed in the processing of EclipsingBinaries and it is described in Section 7.6.1.

The motion on the sky tangent plane due to the orbital motion of the photocentre alone is given by the astrometric elements:

 $\displaystyle\xi(t)$ $\displaystyle=$ $\displaystyle\mathring{a}_{0}{\frac{1-e^{2}}{1+e\cos v}}[\cos(v+\omega)\sin% \Omega+\sin(v+\omega)\cos\Omega\cos i]$ (7.48) $\displaystyle\eta(t)$ $\displaystyle=$ $\displaystyle\mathring{a}_{0}{\frac{1-e^{2}}{1+e\cos v}}[\cos(v+\omega)\cos% \Omega-\sin(v+\omega)\sin\Omega\cos i]$

where the angular semi-major axis of the photocentre is $\mathring{a}_{0}=a_{0}\varpi$ with $a_{0}$ in au, $i$ is the inclination, $\omega$ the argument of periastron of the primary and $\Omega$ the longitude of periastron.

As for the spectroscopic motion, the line-of-sight motion of the primary minus $\gamma$, the systemic velocity, is given by

 $\displaystyle\mathrm{RV}_{1}(t)=K_{1}[\cos(\nu+\omega_{1})+e\cos\omega_{1}]$ (7.49)

with the (semi-)amplitude of the primary (resp. secondary)

 $\displaystyle K_{1,2}={\frac{\kappa}{P}}{\frac{a_{1,2}\sin i}{\sqrt{1-e^{2}}}}$ (7.50)

where $\kappa=2\pi$ is $\sim{10879}$ when $K_{i}$ is expressed in $\rm\,km\,s^{-1}$, $P$ in days and $a_{i}=\mathring{a}_{i}/\varpi$ in au.

In order to avoid the non-linear part due to the Campbell orbital angles ($\omega$, $i$, $\Omega$) and $\mathring{a}_{0}$, the Thiele-Innes elements $A$, $B$, $F$, $G$ are solved instead of the Campbell elements. In any case, when combining the astrometric and the spectroscopic solution it is not possible to solve simultaneously for the Thiele-Innes element (the astrometric part) and the Campbell elements ($K_{1}$ and $\omega_{1}$) which are related to each other. The Thiele-Innes elements are completed with two equations giving $C$ and $H$:

 $\displaystyle\mathring{A}$ $\displaystyle=$ $\displaystyle+\mathring{a}_{0}(\cos\omega\cos\Omega-\sin\omega\sin\Omega\cos i)$ $\displaystyle\mathring{B}$ $\displaystyle=$ $\displaystyle+\mathring{a}_{0}(\cos\omega\sin\Omega+\sin\omega\cos\Omega\cos i)$ $\displaystyle C$ $\displaystyle=$ $\displaystyle+a_{1}\sin\omega\sin i$ $\displaystyle\mathring{F}$ $\displaystyle=$ $\displaystyle-\mathring{a}_{0}(\sin\omega\cos\Omega+\cos\omega\sin\Omega\cos i)$ (7.51) $\displaystyle\mathring{G}$ $\displaystyle=$ $\displaystyle-\mathring{a}_{0}(\sin\omega\sin\Omega-\cos\omega\cos\Omega\cos i)$ $\displaystyle H$ $\displaystyle=$ $\displaystyle+a_{1}\cos\omega\sin i$

The motion can then be described by the normal equations:

 $\displaystyle\xi(t)$ $\displaystyle=$ $\displaystyle\mathring{B}X+\mathring{G}Y$ (7.52) $\displaystyle\eta(t)$ $\displaystyle=$ $\displaystyle\mathring{A}X+\mathring{F}Y$ $\displaystyle\mathrm{RV}_{1}(t)$ $\displaystyle=$ $\displaystyle CX^{\prime}+HY^{\prime}$ (7.53)

with a supplementary equation for $\mathrm{RV}_{2}$, when the spectroscopic system is SB2 (changing $\omega$ to $\omega+\pi$), and where:

 $\displaystyle X$ $\displaystyle=$ $\displaystyle\cos E-e$ (7.54) $\displaystyle Y$ $\displaystyle=$ $\displaystyle\sqrt{1-e^{2}}\sin E$ $\displaystyle X^{\prime}$ $\displaystyle=$ $\displaystyle{\frac{-\kappa\sin E}{P(1-e\cos E)}}$ $\displaystyle Y^{\prime}$ $\displaystyle=$ $\displaystyle{\frac{\kappa\cos E\sqrt{1-e^{2}}}{P(1-e\cos E)}}$

This module then solves for $P,T,e$ and the $\mathring{A},\mathring{B},C,\mathring{F},\mathring{G},H$ elements.

The Thiele-Innes (T-I) $\mathring{A},\mathring{B},\mathring{F},\mathring{G}$ (from astrometry) and $C,H$ (from spectroscopy) are related, but not identical as the first part refers to the photocentre while the second refers to the primary. When a potential combination between astrometric and spectroscopic input solutions was possible, there was a trade-off for the decision to either perform AstroSpectroSB1 solutions or to keep the initial solutions unmerged : merging astrometric and spectroscopic parts gives a better statistical information on the orbits, but the photocentre is never fully the primary on the other hand. It has been chosen to give the AstroSpectroSB1 solution when the two solutions followed the criteria (7.46). Otherwise, if the user considers that the two solutions pertain to the same system then the combination can be done offline: using the semi-amplitude from the spectroscopic solution and inverting Equation 7.50 with the inclination computed from the astrometric solution (Halbwachs et al. 2023) will give access to $a_{1}$.

When the solution is nearly circular, degrees of freedom are lost, leading to degeneracies, cf. Section 7.2.5. What has been done is the following: the Campbell elements $a_{0}$, $i$, $\omega$, $\Omega$ have been calculated from the fitted values of the T-I elements. Then $e$ is set to 0 and the T-I elements have been recalculated and the covariance matrix too. In principle, from Equation 7.7.3 the $C$ parameter should not be fitted and be set to 0. Unfortunately, this was overlooked and consequently, $C$ and $H$ should be used the same way (using e.g. $C^{2}+H^{2}=a_{1}^{2}\sin^{2}i$) whether $e\sim 0$ or not.

The equations described above are implemented in the pipeline. The fitting process started from initial values where they were available from the input solutions, i.e. when an orbital solution was involved in the process. If the input solutions had rejected observations for any reason these observations were discarded as well from the process. Then the astrometric epoch data and spectroscopic data were added in a $\chi^{2}$ minimisation process where all the T-I elements together with P, e and $T_{0}$ were solved. An iterative outlier rejection process has been employed where observations discrepant by more than 3-sigma were identified and rejected. The maximum number of outliers was defined as 5% of the total number of transits. Finally for the published uncertainties the formal covariance matrix has been used, with a posterior multiplication to correct it for the excessive goodness-of-fit.