# 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:

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

$\eta (t)$ | $=$ | ${\stackrel{\u030a}{a}}_{0}{\displaystyle \frac{1-{e}^{2}}{1+e\mathrm{cos}v}}[\mathrm{cos}(v+\omega )\mathrm{cos}\mathrm{\Omega}-\mathrm{sin}(v+\omega )\mathrm{sin}\mathrm{\Omega}\mathrm{cos}i]$ |

where the angular semi-major axis of the photocentre is ${\stackrel{\u030a}{a}}_{0}={a}_{0}\varpi $ with ${a}_{0}$ in au, $i$ is the inclination, $\omega $ the argument of periastron of the primary and $\mathrm{\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

${\mathrm{RV}}_{1}(t)={K}_{1}[\mathrm{cos}(\nu +{\omega}_{1})+e\mathrm{cos}{\omega}_{1}]$ | (7.49) |

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

${K}_{1,2}={\displaystyle \frac{\kappa}{P}}{\displaystyle \frac{{a}_{1,2}\mathrm{sin}i}{\sqrt{1-{e}^{2}}}}$ | (7.50) |

where $\kappa =2\pi $ is $\sim 10879$ when ${K}_{i}$ is expressed in $\mathrm{km}{\mathrm{s}}^{-1}$, $P$ in days and ${a}_{i}={\stackrel{\u030a}{a}}_{i}/\varpi $ in au.

In order to avoid the non-linear part due to the Campbell orbital angles ($\omega $, $i$, $\mathrm{\Omega}$) and ${\stackrel{\u030a}{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$:

$\stackrel{\u030a}{A}$ | $=$ | $+{\stackrel{\u030a}{a}}_{0}(\mathrm{cos}\omega \mathrm{cos}\mathrm{\Omega}-\mathrm{sin}\omega \mathrm{sin}\mathrm{\Omega}\mathrm{cos}i)$ | |||

$\stackrel{\u030a}{B}$ | $=$ | $+{\stackrel{\u030a}{a}}_{0}(\mathrm{cos}\omega \mathrm{sin}\mathrm{\Omega}+\mathrm{sin}\omega \mathrm{cos}\mathrm{\Omega}\mathrm{cos}i)$ | |||

$C$ | $=$ | $+{a}_{1}\mathrm{sin}\omega \mathrm{sin}i$ | |||

$\stackrel{\u030a}{F}$ | $=$ | $-{\stackrel{\u030a}{a}}_{0}(\mathrm{sin}\omega \mathrm{cos}\mathrm{\Omega}+\mathrm{cos}\omega \mathrm{sin}\mathrm{\Omega}\mathrm{cos}i)$ | (7.51) | ||

$\stackrel{\u030a}{G}$ | $=$ | $-{\stackrel{\u030a}{a}}_{0}(\mathrm{sin}\omega \mathrm{sin}\mathrm{\Omega}-\mathrm{cos}\omega \mathrm{cos}\mathrm{\Omega}\mathrm{cos}i)$ | |||

$H$ | $=$ | $+{a}_{1}\mathrm{cos}\omega \mathrm{sin}i$ |

The motion can then be described by the normal equations:

$\xi (t)$ | $=$ | $\stackrel{\u030a}{B}X+\stackrel{\u030a}{G}Y$ | (7.52) | ||

$\eta (t)$ | $=$ | $\stackrel{\u030a}{A}X+\stackrel{\u030a}{F}Y$ | |||

${\mathrm{RV}}_{1}(t)$ | $=$ | $C{X}^{\prime}+H{Y}^{\prime}$ | (7.53) |

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

$X$ | $=$ | $\mathrm{cos}E-e$ | (7.54) | ||

$Y$ | $=$ | $\sqrt{1-{e}^{2}}\mathrm{sin}E$ | |||

${X}^{\prime}$ | $=$ | $\frac{-\kappa \mathrm{sin}E}{P(1-e\mathrm{cos}E)}$ | |||

${Y}^{\prime}$ | $=$ | $\frac{\kappa \mathrm{cos}E\sqrt{1-{e}^{2}}}{P(1-e\mathrm{cos}E)}$ |

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

The Thiele-Innes (T-I) $\stackrel{\u030a}{A},\stackrel{\u030a}{B},\stackrel{\u030a}{F},\stackrel{\u030a}{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 $, $\mathrm{\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}{\mathrm{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.