1 Introduction

Double stars make observing targets which are popular for various reasons including an interest in the practicalities of obtaining valuable scientific data with small telescopes. Such measurements can indicate whether the two stars, observed to be close to the sky, are a physical double, as the two stars should slowly shift their relative positions with time as they orbit about each other. Binary stars are important to astronomy as they allow direct determination of stellar masses. Where the stars are not observed to be following such orbits, their proximity in the sky might mean that they are actually gravitationally remote from each other and simply in a similar line of sight from Earth (i.e., an optical double). In practice, it turns out that this situation is often not the case. In passing, we note that Argyle (2004), MacEvoy & Tirion (2015) and Argyle et al. (2019) provide useful background materials for observing and analyzing visual doubles.

Table 1 Parameter estimates from MCMC fitting to the Miller &  Pitman systems. Uncertainties are single sigma (one standard deviation). See the text for the explanation of the symbols used as the column titles other than ‘Epoch’, which is the time of phase zero  for the orbital ephemeris, the orbital period  (P)  in years, and‘WDS’, which  gives the Washington  Double Star  catalog ID. The final  column  (G)  on the right employs the orbit grading scheme of  Worley & Heintz (1983)  as outlined inHartkopf et al. (2001).

A major goal of the current paper is to outline the testing of an algorithm based on Markov Chain Monte Carlo (MCMC) optimization. This note documents our final testing of a Bayesian-based methodology by comparing systems with known results and placing these results into the literature for later use by the double-star community. The rationale behind these tests is that agreement of our findings with literature results would lend confidence for later general applications of the method, such as for systems without known orbital solutions. A noteworthy point is that our method provides uncertainties for the derived parameters, something not provided for many orbital solutions in the literature.

The paper, therefore, outlines the automated estimation of values and uncertainties of orbital parameters to a selection of physical double binaries listed in Miller & Pitman (1922), and in particular from their Table 1 of ‘First Class’ systems that those authors considered to possess well determined orbital estimates (and therefore good systems for the planned testing). Miller & Pitman (1922) did not present the orbital solutions and so we make use of the parameter estimates adopted in the Washington Double Star (WDS) catalog (Mason et al. 2022). We sourced the positional data from the WDS, current to 2023. Our paper presents estimates for the orbital parameters for these systems using all the available data. These results are in agreement with the solutions given in the WDS with the advantage that single sigma uncertainties are presented for all the estimated parameters. This is reached through the use of an optimization technique based on Bayesian statistics, which is described in the following section.

2 Markov Chain Monte Carlo

A Markov Chain is a probabilistic model describing the likelihood of future states based on the currently observed state. It is a ‘memory-less’ process, typically based on a matrix giving the transition probabilities between one observed state to another. The current state of the process depends only on the immediately previous one. A chain is built up of repeated steps through this transition matrix.

Markov Chain Monte Carlo (MCMC) combines such chains with a Monte Carlo approach, or basically random probabilities (Privault 2013; Hogg & Foreman-Mackey 2018). This combination allows MCMC to explore and then characterize a distribution by randomly sampling that distribution without requiring knowledge of the distribution’s mathematical properties (van Ravenzwaaij et al. 2018). It is a Bayesian statistical technique where inferences about unknown quantities (such as model parameters or predictions) are made by combining prior ‘knowledge’ (often called ‘beliefs’ in the literature) about those quantities together with observations.

No u-turn sampler (NUTS) avoids the random walk behavior of more simple MCMC algorithms, making a faster exploration of possible model parameter sets and a faster convergence to an optimal set of parameter estimates. It handles multiple parameter models better than simpler techniques, which struggle with these higher dimensional problems. We used this Hamiltonian Monte Carlo (HMC) technique for these reasons.

We are not the first authors to apply an MCMC method to visual double star data, but the technique is not yet widely used in the field (see, e.g., Sahlmann et al. 2013; Lucy 2014; Mendez et al. 2017).

Fig. 1
figure 1

Observations and model orbits are shown for two representative systems from those analyzed in this paper. North is upwards and east increases to the right, as is the convention in many visual binary papers. The red curve plots the model orbit, while observations (the position of the secondary star relative to the primary star at a given time) are shown as black dots. Blue lines connect the observations to their predicted positions given the derived orbital parameters. The star symbol at \((\Delta x, \Delta y) \sim (0,0)\) is the location of the primary star in each system. (a) \(\eta \) Cor Bor and (b) \(\Sigma \, 2052\).

Fig. 2
figure 2

Comparison between MCMC (this paper) and WDS optimal parameter estimates for Pae and \(\omega \) by the system. Linear regressions have been fitted to the data, resulting in best-fit (blue-colored) lines in the charts. Two sigma confidence limits are shown as the grey-shaded regions. The dashed grey lines are those of perfect agreement, which are essentially in agreement with the regression lines, indicating good agreement between the two sets of parameter estimates.

Fig. 3
figure 3

Comparison between HMC and WDS optimal parameter estimates for i and \(\Omega \) by system.

3 Analysis

Table 2 Dynamical solar masses (\(M_D\)) based on Hipparcos parallaxes (given in the column ‘Hipparcos’ as milli-arcsec) and parameter estimates from the MCMC orbital fitting. Column \(M_M\) lists the dynamical masses given in Malkov et al. (2012). \(M_{VL}\) lists the dynamical mass estimates using the van Leeuwen (2007) parallaxes (listed in column ‘van Leeuwen’ and units of milli-arcsec). Errors in \(M_D\) and \(M_{VL}\) are one standard deviation.

The orbit of a (visual) binary star system can be described on the xy plane as (see, e.g., Ribas et al. 2002):

$$\begin{aligned} x&= \frac{a ( 1 - e^2 )}{1 + e \cos {\nu }} [ \cos { (\nu + \omega )} \sin {\Omega }\\&\quad \,\,+ \sin {(\nu + \omega )} \cos {\Omega } \cos {i}], \\ y&= \frac{a ( 1 - e^2 )}{1 + e \cos {\nu }} [ \cos {(\nu + \omega )} \cos {\Omega }\\&\quad \,\,- \sin {(\nu + \omega )} \sin {\Omega } \cos {i} ], \end{aligned}$$

where a is the semi-major axis of the orbit, measured in arcsec. e is the orbital eccentricity. \(\nu \) is the true anomaly (or function of time) of the orbit of the stars about their barycenter. i is the inclination, the angle between the plane of projection and the orbital plane. Position angles were precessed to the year 2000.

We implemented this model as the fitting function in the stan programming language,Footnote 1 using the NUTS MCMC variant to perform the optimization. We note that if we were only interested in point estimates for the parameters, there are superior optimization techniques which can reach such estimates with less computational effort. Our key interest in using MCMC was to see how well-constrained the parameter estimates are rather than just the optimal estimates alone. The stan code was called from the R programming language (R Core Team 2021), where we handled data processing and additional analysis. The role of MCMC was to adjust the model parameters so that the predicted positions became close to the actual data. In other words, the optimizer trialed different estimates for the parameters in the model function, measuring how well the model based on this function fitted the observed data. The measure of fit employed the \(\chi ^2\) function (see Bevington 1969). The minimum chain length was 100,000 steps, with four chains being run simultaneously. Convergence about an optimal solution set was assessed through trace plots (charts plotting parameter estimates by step position along the chains), which should be statistically random about the optimal estimates, i.e., no trends should remain. We also used the R̂ statistic (Sinharay 2003) to assess convergence.

Best-fit solutions (and one standard deviation uncertainty) are listed in Table 1 for each modeled system. Figure 1 plots data for two example systems, along with the best-fit projected orbits based on the parameters given in Table 1.

The orbital solutions generally agree with those listed by WDS as the adopted solutions for that catalog, with the advantage that uncertainties for the parameters are given for all solutions. Not all WDS solutions have uncertainties provided for the parameter estimates, as seen in Figures 2 and 3. The NUTS-based uncertainties are generally larger than those given for the WDS solutions, even with our naive handling of errors. Eccentricity has the highest relative uncertainty out of the optimized parameters, followed by the argument of periastron. 42 Com Ber (BD \(+\) 18 2697) has an inclination close to 90\(^{\circ }\) and was difficult to model, leading to large uncertainties in parameter estimates for that system.

Fig. 4
figure 4

A comparison of dynamical masses calculated in this study. Sub-figure 4(a) is based on the Hipparcos parallaxes while sub-figure 4(b) is based on van Leeuwen (2007), as per Equation (1). These estimates are compared with those made by Malkov et al. (2012), who did not provide uncertainties for their values. Overall agreement is good. Error bars are not plotted for Epsilon Equilei in sub-figure 4(a) as they are large and lead to a vertical compression of the chart when they are included, obscuring details. The shaded region corresponds to 95% statistical confidence for the regression. A zero intercept was assumed. Note the improved scatter in sub-figure 4(b) is largely driven by changes in the mass estimates for \(\epsilon \) Equ, \(\beta \) 1111, and \(\eta \) Cor Bor. See Table 2 for the data plotted in these figures.

The dynamical (or combined stellar) mass \(M_d\) of such binary systems can be calculated if the parallax is known via an equation (Malkov et al. 2012) based on Kepler’s third law:

$$\begin{aligned} M_{d} = \frac{a^3}{\pi ^3 P^2}, \end{aligned}$$
(1)

where both a and the parallax \(\pi \) are in milli-arcsec, P is in years, and \(M_d\) is in solar masses. Thirteen of the systems had Gaia DR3 parallaxes, and all 27 had Hipparcos parallaxes. The Hipparcos (ESA 1997; Perryman 2008) and Gaia (Gaia Collaboration 2016, 2022) parallaxes agreed well (regressing the Hipparcos parallaxes onto the corresponding Gaia values resulted in a slope of \(0.998 \pm 0.007\) assuming a zero intercept). We therefore used the Hipparcos parallaxes for comparison given the good correlation and also the fact that more systems had parallax estimates in the Hipparcos dataset than the Gaia one. We compared our estimates for the dynamical masses (Table 2) with those from Malkov et al. (2012), see Figure 4. We found good agreement, indicating that our methodology appears reasonable, with the advantage that confidence intervals are generated for the optimized parameters. However, we also note that Malkov et al. (2012) made use of the reduction by van Leeuwen (2007) of Hipparcos astrometric data which improved parallax accuracies by up to a factor of four times for stars brighter than \(H_p = 8\), as well as the later analyses of Al-Wardat et al. (2021) and Masda & Al-Wardat (2023) which demonstrated that the van Leeuwen (2007) parallaxes were superior to both the original Hipparcos and the DR3 Gaia estimates. Calculating dynamical masses using the van Leeuwen (2007) parallaxes (see Table 2) led to an improvement in the Pearson correlation coefficient from 0.905 to 0.960 (for the masses calculated in the current paper compared with those from Malkov et al. 2012), in line with the comments by van Leeuwen 2007, Al-Wardat et al. (2021) and Masda & Al-Wardat (2023). We therefore recommend using the mass estimates given in the column \(M_{VL}\) of Table 2 as the final estimates of the dynamical masses for the studied systems.

4 Discussion

This paper presents in Table 1 new estimates of the orbital elements and uncertainties for a selection of systems listed in Miller & Pitman (1922), based on MCMC optimization. We also calculate dynamical masses using Equation (1) plus original (ESA 1997; Perryman 2008) and refined (van Leeuwen 2007) Hipparcos parallaxes (see Table 2), which we show to be in good agreement with Malkov et al. (2012). Figure 4(b) shows the best comparison between our results and those of Malkov et al. (2012). Comparison of the orbital elements is made between those adopted by the WDS and those derived by our MCMC method (see Figures 2 and 3). The estimates agree well, with the NUTS-based uncertainties tending to be significantly larger than those in the WDS-adopted solutions (not all such solutions provide formal errors). This comparison of known systems gives us confidence that the HMC-based technique presented could be reliably applied to new systems without previously published solutions. Indeed, we have used an earlier version of this methodology to analyze a multiple star system (Erdem et al. 2022), with the astrometric analysis complementing and extending the spectroscopic and photometric analyses. We intend to use this methodology as we extend our survey of detailed studies of multiple systems (such as Erdem et al. 2022) and recommend it to other researchers interested in not only estimating the orbital parameters but gaining insight into the accuracy of these estimates. We also hope that the orbital parameters (and accompanying uncertainties) presented by this paper for the 27 systems involved in the testing will be of interest to double-star researchers and that the paper acts as a record of the careful testing made of the methodology before its use for systems with no published estimates for orbital parameters or dynamical masses.