Double Star Calculator - Technical Documentation

Version : 1.2
Author  : H.Wichmann
Date    : 04.09.2026
License : CC BY 4.0

Content

Abstract

Core Astrometric and Kinematic Functions

Auxiliary Astrometric Functions

Orbital Elements

Orbit Determination

History

Disclaimer

Acknowledgements

References



Abstract

This document provides a detailed methodological description of the procedures implemented in the Double Star Calculator [1]. It is intended to serve as a technical reference for users of the Double Star Calculator. The current version of this document is located at [2].

The Double Star Calculator derives a comprehensive set of astrometric and kinematic quantities for double star systems, including angular and spatial separations, position angles, proper motion vectors, distance estimates, tangential and spatial velocities, and derived physical parameters such as absolute magnitudes, luminosities, and mass estimates. All computations are based on established geometrical relations, classical error propagation, and standard astronomical conventions. The mathematical formulations underlying each calculation are documented to ensure transparency, reproducibility, and independent verification of the results.



Core Astrometric and Kinematic Functions

This section describes the core astrometric and kinematic computations performed for stars and double star systems. These calculations form the basis of the physical interpretation and are directly used in the analyses.

For the uncertainty estimation, the following conditions apply:



Angular Separation

This section describes the mathematical formulation used to compute the angular separation (ρ) between two stellar components (A and B) based on Gaia astrometric data.

Arguments

Results

Angular Separation

To calculate the angular separation ρ between two celestial objects based on their Gaia DR3 equatorial coordinates (αA, δA) and (αB, δB), the Haversine Formula is used. This method is numerically superior to the Spherical Law of Cosines for small angular distances, as it avoids precision loss when the cosine of a small angle approaches. The calculation is performed in radians using the following steps:

Δδ = δB - δA
Δα = αB - αA
hav (ρ) = sin2(Δδ 2) + cos(δA) cos(δB) sin2(Δα 2)
Calculation of Separation ρ :

The final angular separation is derived using the atan2(y, x) function. The atan2 implementation is preferred because it is better conditioned for all angles and avoids potential domain errors due to floating-point rounding.

ρ = 2 · atan2 hav(ρ) , 1-hav(ρ)

Error Propagation

The uncertainty of the separation was derived using first-order Gaussian error propagation, assuming uncorrelated uncertainties in right ascension and declination:

σρ = i=1 4 ( ρ x i σ x i ) 2 Where xi ∈ {αA, δA, αB, δB}


Position Angle

This function computes the position angle θ of a double star measured from North towards East (0°–360°), based on Gaia DR3 coordinates of the two components.

Arguments

Results

Position Angle

The position angle θ is calculated using the arctangent of the differential coordinates, where atan2(y, x) denotes the quadrant-correct two-argument arctangent, ensuring the correct quadrant of the position angle.

θ = atan2 ( cos δ B sin ( α B α A ) , cos δ A sin δ B sin δ A cos δ B cos ( α B α A ) )

The resulting angle is converted to degrees and shifted to the range 0°–360°.

Error Propagation

The uncertainty σθ is calculated using first-order Gaussian error propagation, based on the partial derivatives of atan2:

σθ = i=1 4 ( θ x i σ x i ) 2

Where xi ∈ {αA, δA, αB, δB}



Separation and position angle as a function of Epoch

The Double Star Calculator extrapolates the position of two stars, as well as their separation and position angle, from the Gaia DR3 reference epoch J2016.0 to user-defined target epochs (Δt = target-epoch - J2016.0). The calculation assumes a linear motion model over time.

Coordinates are projected using a linear motion model. The calculation accounts for the spherical geometry of the celestial coordinate system. The total uncertainty is calculated using Gaussian error propagation, combining the initial position error with the cumulative error of the proper motion over the elapsed time.

Right Ascension for target epoch

αtarget-epoch= αref+ ( μα*cos(δref) ) Δt

Declination for target epoch

δtarget-epoch= δref+ μδΔt

Error Propagation

The total uncertainty at the target epoch is calculated using Gaussian error propagation.

σα,total = σα,ref2 + ( Δt σμα* cos δref ) 2
σδ,total = σδ,ref2 + ( Δt σμδ ) 2

Parameters



Spatial Separation

This function calculates the spatial separation between two stars in parsecs, using their distances and angular separation. It also computes the uncertainty of the spatial separation via error propagation.

Arguments

Results

Spatial separation

s = dA2 + dB2 2 dA dB cos ( θ )

Error propagation

The uncertainty of the spatial separation is calculated using partial derivatives:

σs = ( ∂s ∂dA σdA ) 2 + ( ∂s ∂dB σdB ) 2 + ( ∂s ∂θ σθrad ) 2

Note: The linear error propagation assumes that the relative parallax uncertainties are small. Larger relative uncertainties are approximated using first-order Gaussian propagation due to the non-linear transformation from parallax to distance.


Parallax Significance Indicator

This indicator quantifies whether the observed difference in parallaxes between two stars is statistically significant or merely a result of measurement uncertainties.

A high significance indicates that the stars are physically located at different distances, whereas a low significance suggests that the stars could be at the same distance within their measurement errors. The indicator is calculated by dividing the absolute difference of the parallaxes by the combined standard deviation:

Sϖ = | ϖ A - ϖ B | σ ϖ , A 2 + σ ϖ , B 2

Classification Thresholds:

The Parallax Significance Indicator is mapped to qualitative labels to simplify the interpretation of the 3D data:

Parallax Significance Label Status Description
0 ≤ σ < 3 LOW Stat. unresolved The parallax difference is within the 3-sigma measurement uncertainty; 3D separation is statistically unresolved.
3 ≤ σ < 5 MED Moderate Difference is likely real, but the 3D distance carries significant uncertainty.
σ ≥ 5 HIGH Significant Highly significant difference. Stars are clearly located at different depths.

Example:

Spatial Separation                 :       38.97     pc
  1-Sigma Range                    : [     36.55,    41.39] pc
  Significance                     :       13.09     σ 
  Note: High-confidence 3D separation


3D Space Velocity Vector Angle Analysis

Evaluating whether a star pair shares a common space motion (co-moving pair) or merely represents a chance alignment requires comparing their three-dimensional space velocity vectors v1 and v2. The angle θ between these two 3D vectors provides a direct indicator of velocity alignment in space.

3D Space Velocity Vector Construction

For each component, the tangential velocity components derived from proper motions (μα* and μδ in mas/yr) and distance (d in parsecs) are converted into physical velocities (km/s) using the astronomical conversion factor k=4.74057 km·yr/(pc·s·mas):

v = [ vx vy vz ] = [ k·(μα*1000)·d k·(μδ1000)·d vr ]

where μα*=μαcosδ is the true right ascension proper motion and vr is the line-of-sight radial velocity in km/s.

Numerically Stable 3D Vector Angle

The opening angle θ is computed using the atan2 of the cross-product magnitude and dot product:

θ = atan2 ( v1×v2 , v1·v2 ) · (180ˆπ)

where the vector cross-product magnitude v1×v2 and dot product v1·v2 are defined as:

v1×v2 = (v1,yv2,z-v1,zv2,y)2 + (v1,zv2,x-v1,xv2,z)2 + (v1,xv2,y-v1,yv2,x)2
v1·v2 = v1,xv2,x + v1,yv2,y + v1,zv2,z

Uncertainty Propagation via Numerical Finite Differences

The calculation depends on 8 observational parameters x = ( μα,1, μδ,1, d1, vr,1, μα,2, μδ,2, d2, vr,2 ) with associated standard errors σi. Assuming uncorrelated errors, total uncertainty σθ is propagated according to Gaussian error propagation:

σθ = i=1 8 (θxi·σi)2

The partial derivatives θxi are computed numerically using 2nd-order central finite differences with an adaptive step size hi:

θxi θ(xi+hi) - θ(xi-hi) 2hi mo> where hi = max(|xi|·10-6,10-8)

This scale-invariant step size prevents numerical truncation errors for both very large parameters (e.g. distances) and small values (e.g. low proper motions).



Proper Motion and Velocity Analysis

This function performs a kinematic analysis of a single star based on Gaia astrometric data. It derives the direction and magnitude of the proper motion vector, the tangential velocity, and, if available, the total space velocity including the radial component. All quantities are accompanied by uncertainty estimates.

Proper Motion Vector Angle

The position angle of the proper motion vector is calculated relative to the north direction, measured counterclockwise from north through east (0°–360°). The quadrant-correct two-argument arctangent is used.

θ = atan2 ( μ α* , μ δ )

Here, μα* and μδ denote the proper motion components in right ascension and declination, respectively.

Uncertainty of the Proper Motion Angle

The uncertainty of the proper motion position angle (σθ) is derived via Gaussian error propagation of the atan2 function. By using partial derivatives with respect to μα* and μδ, the following equation provides an error estimation that accounts for the relative magnitudes of the proper motion components:

σ θ = ( μ δ μ α* 2 + μ δ 2 σ μ α* ) 2 + ( μ α* μ α* 2 + μ δ 2 σ μ δ ) 2


Total Proper Motion

The total proper motion is calculated as the magnitude of the proper motion vector:

μ = μα*2 + μδ2

Uncertainty of Total Proper Motion

σμ = ( μα* μ σμα* ) 2 + ( μδ μ σμδ ) 2


Tangential Velocity

The tangential velocity is derived from the total proper motion and the parallax:

Vt = 4.74057 μ ϖ

The numerical factor 4.74057 converts proper motion in milliarcseconds per year and distance in parsecs into velocity in km s−1.

Uncertainty of Tangential Velocity

σVt = ( 4.74057 ϖ σμ ) 2 + ( 4.74057 ϖ2 μ σϖ ) 2


Space Velocity

This equation calculates the 3D velocity magnitude of a single star by combining its tangential and radial velocity components. For details refer to chapter Relative Velocity (3D) Difference.

By default, the Radial Velocity is retrieved from the Gaia DR3 record. If this data is missing, the Double Star Calculator automatically queries the SIMBAD database as a fallback. In this case, the field is labeled Radial Velocity (Simbad) and includes the corresponding Bibcode to identify the original scientific publication and its precision. If a Radial Velocity measurement is available, the total space velocity is computed as:

V = Vt2 + Vr2

Uncertainty of Space Velocity

σV = ( Vt V σVt ) 2 + ( Vr V σVr ) 2


Results



Kinematic and Dynamical Linkage Analysis

This chapter describes algorithms to analyze the association between the two components of a double star. It details the calculation of the traditional Harshaw rPM (2D) algorithm and evaluates potential associations based on the Uncertainty Weighted Likelihood Estimator (UWLE). Furthermore, the equations describing orbital and binding dynamics are presented.


Harshaw 2D Methodology (rPM)

The Harshaw method [3] focuses on the ratio of Proper Motion (rPM), a dimensionless quantity comparing the angular velocity difference to the maximum magnitude. It is robust against distance uncertainties but ignores depth (parallax) and radial motion.

μ A = μ α*A 2 + μ δA 2 μ B = μ α*B 2 + μ δB 2

The dimensionless ratio of proper motion (rPM) is then computed using consistent tracking of the components:

rPM = ( μα*A - μα*B ) 2 + ( μδA - μδB ) 2 max ( μA , μB )

Harshaw Classification Levels

Indicator Type Threshold Classification
Harshaw rPM < 0.2 CPM (Common Proper Motion)
Harshaw rPM 0.2 - 0.6 SPM (Similar Proper Motion)
Harshaw rPM > 0.6 DPM (Distinct Proper Motion)



Uncertainty-Weighted Likelihood Estimator

The core algorithm uses a variance-summation model. The Evidence Indicator E is defined by a Gaussian kernel multiplied by a normalization pre-factor that accounts for the relative weight of the measurement uncertainty.

E = s 0 s 0 2 + σ 2 e ( Δ x 2 s 0 2 + σ 2 )

Normalization Pre-factor: This term term of the equation above acts as a data-quality weight. It has two functions:


Impact of Measurement Uncertainty (σ)

This plot demonstrates how the Likelihood Estimator adapts to varying levels of data quality while keeping the scale factor constant (s0 = 1.0).

Evidence Factor for different sigma
Likelihood Estimator for different σ and for a Scale Parameters s0 = 1.0

Note: An increasing σ not only lowers the peak (Data Quality Weighting) but also broadens the distribution, meaning that at high uncertainty levels, the estimator becomes less sensitive to small changes in Δx.




Velocity Evidence Indicator

A specialized version of the Uncertainty-Weighted Likelihood Estimator is used to calculate the Velocity Evidence Indicator. It evaluates the kinematic consistency of a pair by analyzing relative velocities while accounting for physical constraints and data quality.


1. Robustness against Signal-to-Noise (SNR) Issues

To maintain reliability in the presence of measurement noise, the algorithm monitors the Signal-to-Noise Ratio (SNR). In cases of a Low SNR (< 3.0), the system additionally calculates the Evidence Indicator based on the projected separation. This mitigates the risk of large radial distance uncertainties distorting the kinematic assessment.


2. Scale Factor Configuration (v0)

The scale factor v0 determines the tolerance of the likelihood curve. The algorithm distinguishes between two search modes:


3. Evidence Classification Labels

To assist in the interpretation of the numerical results (ranging from 0.0 to 1.0), the Velocity Evidence Index is categorized into four qualitative labels:

Evidence Index Label Interpretation
0.7 – 1.0 Strong High probability of physical association (CoMov or Binary).
0.3 – 0.7 Moderate Potential association; data supports kinematic similarity.
0.1 – 0.3 Weak Low kinematic agreement; likely a chance alignment.
< 0.1 Unlikely Significant velocity discrepancy; association improbable.




Distance Evidence Indicator

The Distance Evidence Indicator utilizes a specialized version of the Uncertainty-Weighted Likelihood Estimator to evaluate the spatial proximity of a stellar pair. By analyzing geometrical consistency and relative distance while accounting for physical constraints and data quality, it provides a robust measure of whether two stars are truly co-located.


1. Robustness against Signal-to-Noise (SNR) Issues

To maintain reliability in the presence of measurement noise, the algorithm monitors the Signal-to-Noise Ratio (SNR). In cases of a Low SNR (< 3.0), the system additionally calculates the Evidence Indicator based on the projected separation. This mitigates the risk of large radial distance uncertainties distorting the kinematic assessment.


2. Scale Factor Configuration (s0)

Depending on the selected analysis mode, the algorithm adjusts its internal scale factor (s0) and units to match the expected physical dimensions:


3. Evidence Classification Labels

Similar to the kinematic assessment, the Distance Evidence Index is mapped to qualitative labels to provide a quick interpretation of spatial consistency:

Evidence Index Label Interpretation
0.7 – 1.0 Strong Excellent spatial agreement; the pair is clearly co-located.
0.3 – 0.7 Moderate Good spatial agreement; consistent with a common origin or group.
0.1 – 0.3 Weak Marginal spatial agreement; distance difference is significant.
< 0.1 Unlikely Significant spatial discrepancy; co-location is improbable.





Total Evidence Indicator

The kinematic and spatial results are synthesized into a single, unified metric. This provides a final assessment of the physical association between two stars. The total evidence is calculated using the geometric mean of the Velocity Evidence (Evelocity) and the Distance Evidence (Edistance):

E total = E velocity E distance

1. Final Probability Classification

The resulting index serves as the final "Confidence Score" for the pair's Co-Moving (CoMov) or Binary status:

Total Evidence Final Label Physical Interpretation
0.7 – 1.0 Strong High confidence pair; kinematic and spatial data are fully consistent.
0.3 – 0.7 Moderate Likely association; supported by data but may have moderate uncertainties.
0.1 – 0.3 Weak Suspicious pair; discrepancies in either motion or distance suggest a chance alignment.
< 0.1 Unlikely No physical association; the stars are very likely independent field stars.





Evidence Indicators - Summary

The table below provides a quick overview of the calculated UWLE Evidence Indicators and their parametrization:


Condition Mode Type Distance Scaling s0 Velocity Scaling v0 Δx Uncertainty
- Co-Moving COMOV 1.0 pc 5 km/s spatial σspatial
- Wide Binaries (3D) WBS 20,000 au 1/ dspatial spatial σspatial
Sϖ < 3.0 Wide Binaries (2D) WBS 20,000 au 1/ dprojected projected σspatial
Sϖ < 3.0 Tight Binaries (2D) TBS 1,000 au 1/ dprojected projected σprojected



3D Spatial Distance Probability Analysis

Determining the true 3D spatial separation (d3D) between two binary components from astrometric observations (such as Gaia parallaxes) involves significant measurement uncertainties. While the calculated 3D distance is typically represented as a mean value μ with a standard deviation σ, assessing whether the pair is consistent with a physically bound system benefits from a probabilistic treatment of the spatial separation uncertainty.

Physical Boundary Condition & Truncation Motivation

In observational astronomy, the projected separation on the sky plane (dproj) represents an absolute physical lower bound for the true spatial distance:

d3D = dproj2 + Δz2 dproj

where Δz is the unknown distance along the line of sight. Standard Gaussian models assign non-zero probabilities to values below dproj and even to unphysical negative distances. To eliminate these physical impossibilities, the probability density function is truncated below dproj and renormalized over the physically allowed domain [dproj,).

Cumulative Probability

Let the unconstrained 3D spatial separation be modeled as a normally distributed random variable D N ( μ , σ ) , where μ=d3D and σ=σ3D. The standard Gaussian cumulative distribution function Φ(z) is given by:

Φ(z) = 12 [1+erf(z2)] mo> with z=x-μσ

To ensure numerical stability in the extreme upper tails of the distribution, the survival function S(x)=P(D>x) is calculated via standard normal symmetry as S(x)=Φ(-z). The probability that the true distance lies above the physical lower bound dproj serves as the normalization factor S(dproj).

For any distance threshold T>dproj, the cumulative probability conditioned on Ddproj is derived as:

P(DTDdproj) = P(dprojDT) P(Ddproj) = S(dproj)-S(T) S(dproj)

Dynamic & Astrophysical Threshold Evaluation

The probability pipeline evaluates the system against both dynamic thresholds specific to the pair's geometry and established astrophysical milestones:

Fixed thresholds that fall below the dynamic lower limits are automatically filtered out to ensure monotonically increasing evaluations.




Critical Binding Distance according to Letchford et al. (2022)

To physically assess whether a binary star system is gravitationally bound, the Double Star Calculator utilizes the specific binding energy approach defined by Letchford et al. (2022) [11]. A binary pair is considered gravitationally bound if the total energy of the system in the center-of-mass frame is negative.

The calculated threshold Dcritical serves as a physical upper integration limit within the lower-truncated normal distribution (3D Spatial Distance Probability Analysis). If the true 3D spatial separation exceeds Dcritical, gravitational attraction is insufficient to maintain a bound orbit against the observed relative velocity. Evaluating the cumulative probability distribution from the projected separation up to Dcritical directly yields the physical binding probability of the binary system.

Ebinding = Ekin + Epot < 0

By applying the reduced mass μ = mA·mB mA+mB for the relative motion of two bodies, the energy balance is formulated as follows:

12 · μ · (Δv3D) 2 G · mA · mB D < 0

Substituting and simplifying the reduced mass μ, the condition for gravitational binding reduces to:

12 · (Δv3D) 2 < G · (mA+mB) D

The critical binding distance Dcritical defines the exact spatial separation at which the kinetic energy of relative motion equals the gravitational potential energy (Ebinding=0).

Dcritical = 2 · G · (mA+mB) (Δv3D) 2

Integration into the Probability Framework

The threshold Dcrit serves as a physical upper integration limit within the lower-truncated normal distribution. If the true 3D spatial separation exceeds Dcrit, gravitational attraction is insufficient to maintain a bound orbit against the observed relative velocity. Evaluating the cumulative probability distribution from the projected separation dproj up to Dcrit directly yields the physical binding probability Pbound of the binary system.





Orbital & Binding Dynamics

When a potential binary is identified, the tool evaluates the gravitational relationship:

Est. Orbital Period
The estimated time (in years) required for one full revolution. This calculation assumes the current projected separation as the semi-major axis of a circular orbit.
Escape Velocity (vesc)
The maximum relative velocity at which the two stars remain gravitationally bound. If the measured velocity difference exceeds this threshold, the stars are considered "Likely Unbound."
Circular Orbital Velocity (vcirc)
The theoretical velocity required for a stable, perfectly circular orbit at the given separation. It serves as a benchmark for the "depth" of the gravitational bond.
Binding Indicator (η)
A dimensionless index representing the ratio of kinetic energy to the magnitude of gravitational potential energy.
η < 0.5 : Strongly bound system (deep gravity well)
0.5 ≤ η < 1.0 : Bound, but on a high-energy or highly eccentric orbit
η ≥ 1.0 : Unbound; the system has reached or exceeded escape velocity


Calculation of Orbital Period (P):
P = r 3 M A + M B

Calcuation of Escape Velocity (vesc):
v esc = 42.12 M A + M B r

Calcuation of Circular Orbital Velocity (vcirc):
v circ = v esc 2

Calculation of the Binding Indicator (η):
η = ( v rel v esc ) 2

Derivation of the Binding Indicator (η)

Definition of specific energy:

ε = ε kin + ε pot = v rel 2 2 - G M r

Definition of Escape Velocity:

v esc 2 2 = G M r

Substitution:

ε = v rel 2 2 - v esc 2 2

Final equation:

η = v rel 2 / 2 v esc 2 / 2 = ( v rel v esc ) 2

Definitions:






Metallicity Analysis [M/H]

The Metallicity Analysis [M/H] routine is designed for the comparative analysis of the chemical composition of stellar pairs using Gaia DR3 GSP-Phot (Aeneas) data. By comparing the iron abundance ([M/H]), the algorithm assesses whether a stellar pair exhibits a consistent chemical signature—a primary indicator of a shared origin (co-natal stars). The methodology incorporates the statistical processing of asymmetric MCMC (Markov Chain Monte Carlo) confidence intervals, the calculation of combined uncertainties in quadrature, and a quality weighting based on photometric transit integrity.

1. Deriving Standard Deviation from MCMC Percentiles

Gaia GSP-Phot provides metallicity as the median of an MCMC sample, along with the 16th (lower) and 84th (upper) percentiles. To convert these asymmetric confidence intervals into a symmetric standard deviation σ suitable for error propagation, the routine calculates the arithmetic mean of the absolute deviations:

σM/H = |[M/H]-[M/H]lower| + |[M/H]-[M/H]upper| 2

2. Statistical Significance (Z-Score)

To evaluate the chemical consistency between both stars, a Z-Score is calculated. While measurement errors are assumed to be independent and normally distributed, the statistical uncertainties from Gaia DR3 often underestimate systematic effects like parameter degeneracies. To ensure a robust comparison, a systematic uncertainty floor (σsys = 0.21 dex) is incorporated into the Gaussian error propagation. This floor is based on the Median Absolute Deviation (MedAD) observed in validation studies (cf. R.Andrae, M.Fouesneau et al. (2023) [7]), comparing Gaia GSP-Phot with high-resolution spectroscopy.

σcombined = σA2 + σB2 + σsys2

The resulting Z-Score represents the number of standard deviations separating the two measurements:

Z = |[M/H]A-[M/H]B| σcombined

3. Photometric Metallicity Confidence Factor (PMCF)

To evaluate the reliability of the spectroscopic data, a proprietary Photometric Metallicity Confidence Factor (PMCF) is calculated. This factor accounts for contaminated and blended transits in the BP/RP spectra. Contaminated transits are fully weighted, while blended transits are weighted at 50% (0.5) to reflect their partial impact on spectral purity:

PMCF = 1.0 - ncontam + 0.5 nblend ntotal_obs

Note: A low PMCF (< 0.80) indicates poor data quality, suggesting that even low Z-scores should be interpreted with caution.


Interpretation of Results
Z-Score Range Scientific Interpretation
Z ≈ 0 Chemically consistent. High probability of a shared origin.
Z < 3 Marginally consistent within the 3σ threshold.
Z ≥ 5 Highly significant difference. Physical association is statistically excluded.




Residual Analysis

If historical measurements of the separation and position angle are provided, the Double Star Calculator performs a trend analysis on the astrometric residuals of the double star. It quantifies the deviations of the historical measurements from a kinematic motion predicted reference model based on Gaia proper motion data.

Methodology

The core of the residual analysis is the computation of a trend analysis (sequential polynomial fit) with three different competing regression models. For each model the Root Mean Square (RMS) is calculated and the Durbin-Watson Test are performed:


Implementation notes

Temporal Centering

To mitigate numerical instabilities and loss of precision during higher-order polynomial fitting, the observational epochs are centered around a user-defined reference epoch (T0 = 2000.0). For each epoch ti, the relative epoch Δti is computed as:

Δt i = t i T 0

Raw Residual Computation

The raw residuals are computed directly from the difference between historical measurements and the Gaia reference model. For angular separations (ρ), a linear difference is used, while Position Angles (PA) require a wrap-around correction to account for the 360° periodicity:


Angular Separation Residuals (ρ):
R ρ , i = ρ hist , i ρ Gaia , i

Position Angle Residuals (PA):
R PA , i = ( ( θ hist , i θ Gaia , i + 180.0 ) mod 360.0 ) 180.0

Baseline Statistical Metrics

The global metrics for the raw residual dataset consisting of N measurements are defined as follows. The implementation in Python is based on NumPy (np):


Mean Absolute Error (MAE)
MAE = 1 N i = 1 N | R i |
PYTHON: mae = np.mean(np.abs(residuals))

Bias (Arithmetic Mean)
Bias = 1 N i = 1 N R i
PYTHON: bias = np.mean(residuals)

Root Mean Square Error (RMSE)
RMSE = 1 N i = 1 N R i 2
PYTHON: rmse = np.sqrt(np.mean(residuals**2))

Sample Standard Deviation (STDEV)

Calculated using Delta Degrees of Freedom (ddof = 1) to provide an unbiased estimator for smaller sample sizes:

STDEV = 1 N 1 i = 1 N ( R i Bias ) 2
PYTHON: stdev = np.std(residuals, ddof=1)

Durbin-Watson Test Statistic

The Durbin-Watson score (DW) checks for sequential first-order autocorrelation between successive data records. It is computed both for the raw residuals and the post-fit residuals of the regression models using the following equation, Where εi represents the evaluated series (either raw residuals or post-fit residuals):

DW = i = 2 N ( ε i ε i 1 ) 2 i = 1 N ε i 2
PYTHON: dw = durbin_watson(residuals)

Regression Modeling

The application fits three competing polynomial orders to the raw residuals (Ri) over the relative epochs (Δti). The execution uses algebraic matrix inversion via least squares minimization. For each model, the Root Mean Square (RMS) of the remaining post-fit residuals is computed.


Model 1: Constant Model

Models a systematic, static baseline shift by applying the arithmetic mean:

f const ( Δt i ) = a
PYTHON:
a_const   = np.mean(residuals)                          
fit_const = np.full_like(residuals, a_const)            
rms_const = np.sqrt(np.mean((residuals - fit_const)**2))
dw_const  = durbin_watson(residuals - fit_const)        

Model 2: Linear Model

Models a constant velocity drift discrepancy using a standard linear slope:

f linear ( Δt i ) = b · Δt i + a

The coefficients b (velocity drift) and a (intercept) are obtained by minimizing the squared errors over the array. Implemented in Python as:

PYTHON:
coeff_linear = np.polyfit(t_rel, residuals, 1)              
b_lin, a_lin = coeff_linear                                 
fit_linear   = np.polyval(coeff_linear, t_rel)              
rms_linear   = np.sqrt(np.mean((residuals - fit_linear)**2))
dw_linear    = durbin_watson(residuals - fit_linear)        

Model 3: Quadratic Model

Captures a constant acceleration component to trace non-linear orbital trends:

f quad ( Δt i ) = c · Δt i 2 + b · Δt i + a

Where $c$ represents the acceleration coefficient. Implemented in Python as:

PYTHON:
coeff_quad             = np.polyfit(t_rel, residuals, 2)            
c_quad, b_quad, a_quad = coeff_quad                                 
fit_quad               = np.polyval(coeff_quad, t_rel)              
rms_quad               = np.sqrt(np.mean((residuals - fit_quad)**2))
dw_quad                = durbin_watson(residuals - fit_quad)        

Model RMS Calculation

For each specific model fit, the remaining scatter (RMS) of the post-fit residuals is mathematically defined via:

RMS model = 1 N i = 1 N ( R i f model ( Δt i ) ) 2



Auxiliary Astrometric Functions

This chapter describes auxiliary functions used in the analysis of stellar kinematics and physical association. These functions support the main astrometric routines and provide derived quantities and comparison metrics.



Distance from Parallax

This function converts the stellar parallax into distance, expressed in parsecs and light-years, including the propagation of the parallax uncertainty.

The calculation follows the standard astronomical relation between parallax and distance and assumes Gaussian error propagation.

Distance in parsecs

d pc = 1000 ϖ

where ϖ is the parallax in milliarcseconds (mas).

Uncertainty of the distance

σ dpc = 1000 ϖ2 σ ϖ

The uncertainty is derived using standard Gaussian error propagation.

Conversion to light-years

d ly = d pc C pc→ly
σ dly = σ dpc C pc→ly

with the conversion constant C pc→ly = 3.26156 .

Results



Projected Separation

Calculates a conservative lower bound of the projected physical separation in parsec between two stars by evaluating the projected separation at the average distance davg of both components.

s = d avg tan ( θ )

Uncertainty of the projected separation

σ s = d avg 1 cos 2 ( θ ) σ θ

where θ is the angular separation and σθ the uncertainty of the angular separation.

Note: For pairs with very small angular separations (≤ 100″), the geometric projection term tan(θ) approaches zero. Consequently, the impact of the distance uncertainty (σd) on the physical separation error is minor and has been intentionally omitted.

Results



Absolute Magnitude

This function calculates the absolute magnitude of a star from its apparent Gaia G-band mean magnitude mG and its distance in parsecs dpc. This value is corrected for stellar extinction AG (G-band) and indicated, whenever the corresponding data is available in the Gaia database.

Absolute magnitude

MG = mG 5 log10 ( dpc ) + 5 AG

Uncertainty of absolute magnitude

σMG = ( 5 ln(10) dpc σdpc ) 2 + σ AG 2

Results



Proper Motion Angular Difference

Computes the absolute angular difference between two proper motion position angles, normalized to the range 0°–180°.

Δθ = | θB θA |

Uncertainty:

σΔθ = σA2 + σB2

Total Proper Motion Difference

Computes the absolute difference in total proper motion between two stars.

Δμ = | μA μB |

Uncertainty:

σΔμ = σA2 + σB2

Velocity Differences

The following auxiliary functions compute absolute differences in tangential, radial, and total space velocity using identical mathematical formulations.

Generic Equation:

Δv = | vA vB |

Uncertainty:

σΔv = σA2 + σB2

This formulation applies to:



Relative Velocity (3D) Difference

The magnitude of the vectorial difference between the stars' 3D velocity vectors. Unlike the scalar version, this value accounts for the stars' actual directions of motion. It represents the total relative speed between the two components. The following function computes the 3D velocity difference.

Velocity Component Calculation:

vα,i = k · μα*,i ϖi , vδ,i = k · μδ,i ϖi

Error Propagation of Individual Components:

σvα,i = ( kϖi σμα*,i ) 2 + ( k·μα*,i ϖi2 σϖi ) 2

Total Velocity Difference (Δvrel):

Δvrel = Δvα2 + Δvδ2 + (wr·Δvr) 2

Final Error Propagation (σΔv):

σΔvrel = ( Δvα·σΔvα Δvrel ) 2 + ( Δvδ·σΔvδ Δvrel ) 2 + ( wr · Δvr · σΔvr Δvrel ) 2

where wr{0,1}.



Nomenclature & Constants

Symbol Description Value / Unit / Definition
k au to km/s conversion factor 4.74057
wr Radial velocity weighting factor 1.0 (enabled) or 0.0 (disabled)
ϖ Parallax mas
μα* Proper Motion in Right Ascension (μα · cos δ) mas/yr
μδ Proper Motion in Declination mas/yr
σ Standard uncertainty (Sigma) Associated error of a variable
vtan Tangential velocity component km/s
vr Radial velocity component km/s
Δvrel Relative Velocity (3D) Difference km/s (Vectorial Difference)


Spectral Type Estimation

Estimates the stellar spectral class and temperature using the Gaia BP–RP color index based on empirical color boundaries. The temperatures are derived from data provided by the University of Northern Iowa [8].

    Spectral class |  BP-RP  Color-Index    |  Temperature 
    ---------------|--------------------------------------
    O:             |         bp_rp < -0,1   |    50000
    B:             | -0,1  ≤ bp_rp ≤  0,3   |    15000
    A:             |  0,3  < bp_rp ≤  0,5   |     8750
    F:             |  0,5  < bp_rp ≤  0,72  |     6700
    G:             |  0,72 < bp_rp ≤  1,14  |     5800
    K:             |  1,14 < bp_rp ≤  1,8   |     4800
    M:             |         bp_rp >  1,8   |     3300
    ------------------------------------------------------

The function returns one of the spectral classes: O, B, A, F, G, K, M.

This is an approximate classification intended for statistical and comparative analysis.



Mass–Luminosity Relation

This chapter describes the estimation of stellar luminosity and mass for main-sequence stars based on their absolute magnitude and spectral type. The implemented method follows the segmented mass–luminosity relations presented by Eker et al. (2018) [9], adapted here to broad spectral-type intervals for practical application. The luminosity is derived from the absolute magnitude relative to the Sun, including a bolometric correction. The stellar mass is subsequently computed by inverting the logarithmic mass–luminosity relation.

Luminosity:

The stellar luminosity expressed in units of the solar luminosity where MG is the absolute Gaia G-band magnitude of the star and M is the solar absolute bolometric magnitude, adopted here as M = 4.74. A bolometric correction factor (BC) according to Pecaut and Mamajek (2013), updated via the online dwarf star properties compilation (Mamajek 2022) [10] is applied based on the estimated spectral type to determine the bolometric magnitude:

    "O5V" => -3.76
    "B5V" => -1.34
    "A5V" =>  0.00
    "F5V" => -0.02
    "G5V" => -0.105
    "K5V" => -0.63
    "M5V" => -3.11
L L = 10 0.4 ( MG + BC M,bol )

Given an uncertainty σM in the absolute G-band magnitude, lower and upper luminosity limits are computed as:

Lmin = 10 0.4 ( MG + σM + BC M,bol )
Lmax = 10 0.4 ( MG σM + BC M,bol )

Mass–Luminosity Relation and Mass Estimation:

Eker et al. (2018) describe the mass–luminosity relation for main-sequence stars as a segmented power law based on the stellar mass (expressed in solar masses, /M):

log10 ( L ) = α log10 ( ) + C

Here, α is the slope and C the intercept of the logarithmic relation, both depending on the stellar mass regime. For mass estimation, the relation is inverted to yield:

= 10 log10 ( L ) C α
Notes and Assumptions

Hertzsprung-Russell Diagram

The positions of both components are plotted in a simplified Hertzsprung–Russell diagram (HRD). The positions are derived from their calculated stellar luminosities, expressed in solar luminosities and converted to logarithmic scale, and from their effective temperatures (Teff) as provided by Gaia (plotted as solid circles). The effective temperatures are taken from the Gaia GSP-Phot Aeneas solution based on BP/RP spectra (teff_gspphot) and are likewise converted to logarithmic scale. In case the effective temperature is not available, the temperature is estimated from the color index (bp_rp) measured by Gaia (plotted as open circles). Upper and lower bounds of both luminosity and effective temperature are propagated into logarithmic space to derive symmetric uncertainties for the HRD coordinates.

In addition to the stellar positions, the HRD includes schematic regions indicating the approximate locations of the main sequence, giant stars, supergiants, and white dwarfs. These regions are intended for qualitative orientation within the HR diagram and are based on standard tabulated relations between spectral type and effective temperature, such as those provided by the University of Northern Iowa [8].




Orbital Elements

The Double Star Calculator – Orbital Elements generates orbit diagrams and a corresponding ephemeris table showing the separation and position angle of a double star based on its orbital elements. This section documents the mathematical functions used to compute the apparent visual positions of a binary star system.

Mean Anomaly

The Mean Anomaly represents the time elapsed since the last periastron passage, scaled by the orbital period and expressed as an angular measure wrapped into the range 0 to 2π.

M = [ 2 π P · ( t T ) ] mod ( 2 π )

Kepler's Equation

Kepler's equation relates the eccentric anomaly E to the mean anomaly M, where the mean anomaly serves as the time-dependent parameter.e is the orbital eccentricity:

M = E e · sin ( E )

Kepler's equation is a transcendental equation and therefore cannot be solved analytically. It is solved numerically using the Newton-Raphson method. The initial guess is selected dynamically. For low-eccentricity orbits (e < 0.8), the iteration starts with E = M. For highly eccentric orbits (e ≥ 0.8), the initial guess is set to π to improve numerical convergence. The estimate of E is then iteratively refined using:

E n + 1 = E n E n e · sin ( E n ) M 1 e · cos ( E n )

The iteration terminates once the residual error falls below the specified tolerance (10-9). A strict safety limit of 100 iterations prevents infinite loops. This is particularly important for highly eccentric binary systems (e ≈ 0.98), where convergence may become significantly slower near periastron.

True Orbital Coordinates

Once the Eccentric Anomaly is successfully resolved, the physical orbital track is evaluated using three sequential mathematical relations:

Projection Onto the Sky Plane

To display the orbit as observed on the sky, the true orbital coordinates are projected onto the plane of the sky using the three Campbell elements: the position angle of the ascending node, the argument of periastron, and the orbital inclination. This transformation produces the apparent orbital ellipse:

x = r · ( cos ( Ω ) · cos ( θ + ω ) sin ( Ω ) · sin ( θ + ω ) · cos ( i ) )
y = r · ( sin ( Ω ) · cos ( θ + ω ) + cos ( Ω ) · sin ( θ + ω ) · cos ( i ) )



Orbit Determination

The Double Star Calculator – Orbit Determination (DSC-OD) determines the visual orbital elements of a binary star system from a time series of relative astrometric measurements. The observational dataset consists of N discrete epochs tk, angular separations ρk (in arcseconds), and position angles θk (in degrees, measured east of north):

D = { ( tk , ρk , θk ) k = 1 , , N }

From these visual observations on the celestial sphere—representing the apparent projection of a true two-body Keplerian orbit—the module fits the seven classical orbital elements (the Campbell parameters):

Due to the non-linear relationship between the orbital elements and the apparent visual positions (ρ, θ), finding the global minimum of the objective function requires suitable initial parameter estimates. To ensure robust convergence of the non-linear solver, the algorithm provides three distinct initialisation strategies:



Simple Initial Guess Method

The Simple Initial Guess Estimator provides a robust starting point directly derived from the observational time domain and projected astrometric geometry for the seven orbital Campbell elements. The method is intentionally heuristic and is designed to provide stable initial values for subsequent non-linear optimization rather than physically accurate orbital elements.

Orbital Period (P0)

The orbital period estimate is evaluated using the continuous, unwrapped total angular rotation Δθ=|θunwrapped(tmax)θunwrapped(tmin)| over the observation time span Δt=max(tmaxtmin,1.0). If the observations cover approximately three-quarters of a full revolution or more (Δθ1.5π), the time span itself serves as the period estimate; otherwise, it is conservatively scaled to twice the covered time span:

P0 = { Δt if Δθ1.5π 2.0·Δt otherwise

Semi-Major Axis (a0)

The semi-major axis is estimated using the arithmetic mean of the maximum and minimum observed angular separations (ρmax and ρmin):

a0 = maxk(ρk) + mink(ρk) 2

Longitude of Ascending Node (Ω0)

The longitude of the ascending node Ω0 is aligned with the observed position angle corresponding to the epoch of maximum angular separation ρmax:

Ω0 = θargmax(ρ) mod 2π

Argument of Periastron (ω0)

The argument of periastron is initialized to zero:

ω0 = 0.0

Time of Periastron Passage (T0)

The epoch of periastron passage is estimated by starting at the earliest observation epoch tmin and shifting forward by 20% of the estimated orbital period P0:

T0 = tmin + 0.2 · P0

Inclination and Eccentricity (i0, e0)

Inclination and eccentricity are assigned fixed default values. The inclination is initialized to its theoretical expectation value for isotropically oriented orbital planes in three-dimensional space (i=1.0 rad):

i0 = 1.0 rad 57.30° , e0 = 0.3


Thiele-Innes Initial Guess Method

The Thiele-Innes Initial Guess Estimator simplifies orbit determination by decoupling the seven orbital parameters into two distinct sets: three non-linear orbital shape and timing parameters ((P,T0,e)), and four linear spatial orientation constants known as the Thiele-Innes constants ((A,B,F,G)). By scanning a candidate grid over the non-linear parameter space, the optimal spatial orientation constants are determined at each node via linear least-squares. If fewer than four observations are available, or if the grid search fails to yield a physically valid solution, the algorithm automatically falls back to the Simple Initial Guess Method.

By evaluating a candidate grid of (P,T0,e), the spatial orientation parameters (A,B,F,G) are solved instantly via linear least-squares at each node. The parameter set yielding the lowest residual error is selected and analytically transformed into the geometric Campbell orbital elements ((a,i,Ω,ω)).

1. Coordinate System Transformation

Observed polar astrometric coordinates (angular separation ρk and position angle θk) are mapped into standard relative Cartesian coordinates on the celestial tangent plane, where x represents Right Ascension offset (East) and y represents Declination offset (North):

xk = ρk · sin (θk) , yk = ρk · cos (θk)

2. Non-Linear Parameter Space Grid Discretization

A candidate grid evaluates combinations over the bounded domain of non-linear parameters:

3. Linear System Matrix Formulation

For each candidate grid node (P,T0,e), the mean anomaly Mk=2π(tkT0)Pmod2π is converted to eccentric anomaly Ek via Kepler's equation (Mk=EkesinEk). Normalized coordinates in the true orbital plane are computed as:

Xk = cos(Ek)e , Yk = 1e2 · sin(Ek)

The projected positions follow the linear relations xk=AXk+FYk and yk=BXk+GYk. This forms an overdetermined linear system L·c=b:

[ X1 Y1 0 0 0 0 X1 Y1 XN YN 0 0 0 0 XN YN ] [ A F B G ] = [ x1 y1 xN yN ]

The system is solved via linear least squares:

c^ = ( L T L ) 1 L T b

The grid combination (P,T0,e,A,B,F,G) yielding the minimum sum of squared Cartesian residuals:

S = b L c^ 2 2

is selected as the global initial guess.

4. Analytical Transformation to Campbell Elements

The optimal Thiele-Innes constants (A,B,F,G) are analytically inverted into geometric Campbell parameters (a,i,Ω,ω). First, two fundamental algebraic invariants are evaluated:

k = A2+B2+F2+G2 = a2 (1+cos2i)
m = AGBF = a2cosi

Solving the characteristic quadratic equation—including numerical safeguards against floating-point underflow—yields the semi-major axis a and inclination i:

a = k + k2 4 m2 2 , i = arccos ( m a2 )

The longitude of the ascending node Ω and argument of periastron ω are decoupled via the van den Bos (1926) sum and difference angle equations:

θ1 = Ω+ω = atan2 ( BF,A+G )
θ2 = Ωω = atan2 ( B+F,AG )

Solving for Ω and ω yields:

Ω = θ1+θ22 mod2π , ω = θ1θ22 mod2π


Orbit Fitting

The orbit determination of visual binary stars represents a non-linear inverse problem in astrometry. Given a set of N observational epochs tk, angular separations ρk (in arcseconds), and position angles θk (in degrees, measured from North through East), the goal is to determine the seven canonical Campbell orbital elements:

The bounds for the calculation of the orbital elements are defined as follows:



Definition and Processing of Measurement Errors

Astrometric measurements of visual binary stars originate from diverse observational techniques spanning over two centuries of historical and modern astronomy. Consequently, observational uncertainties range from subjective visual estimates to sub-milliarcsecond space-based measurements. To perform a statistically rigorous weighted orbit determination, each measurement pair, comprising angular separation (ρ) and position angle (θ), must be assigned individual, physically realistic 1-σ standard uncertainties (σρ and σθ).

The preprocessing pipeline parses raw observation catalogs compliant with the United States Naval Observatory (USNO) Washington Double Star (WDS) specification. It executes a deterministic multi-tier error allocation model. This model imports published formal catalog errors, applies category-specific systematic error floors in quadrature, imputes technique-dependent default values for unquantified historical data, and enforces strict defensive bounds against unphysical or zero-uncertainty values.

Catalog Import and Data Parsing Layout

Raw observation data lines adhere to the post-May/June 2012 expanded fixed-width USNO WDS observation catalog format. Data parsing is performed by extracting specific column ranges via fixed-width slicing:

Quantity Symbol WDS Columns Format Unit Description
Observation Date t 008–017 f10.5 Decimal Years Epoch of observation
Position Angle θ 020–026 f7.3 Degrees (°) Observed position angle (0° to 360°)
PA Formal Error σcat,θ 028–033 f6.3 Degrees (°) Published formal uncertainty in θ
Separation ρ 036–044 f9.5 Arcseconds (″) Observed angular separation
Separation Error σcat,ρ 047–053 f7.5 Arcseconds (″) Published formal uncertainty in ρ
Technique Code tech 112–113 a2 Text Code Two-character observational technique identifier

Observational Technique Classification

The primary character of the two-letter technique code (column 112) maps the measurement into one of seven broad astronomical technique categories (C). If no technique code is supplied, or an unmapped character is encountered, the record is assigned to the default fall-back category (DEF).

Category Code WDS Technique Prefixes Observational Methodology Default Uncertainty (σdef,ρ, σdef,θ) Systematic Floor (σsys,ρ, σsys,θ)
VIS M, V, D, T Visual micrometrical, meridian circle, heliometer, transit circle 0.100″, 1.000° 0.050″, 0.500°
PHO P Photographic plates / analog emulsions 0.060″, 0.600° 0.030″, 0.300°
CCD C, E, A Ground-based CCD, CMOS, electron multiplication, lucky imaging 0.035″, 0.400° 0.010″, 0.200°
SPE S Speckle interferometry 0.004″, 0.200° 0.002″, 0.100°
INT I, J, K Long-baseline optical, infrared, radio, or aperture-masking interferometry 0.002″, 0.100° 0.0005″, 0.050°
SPA H Space-based astrometry (e.g., Hipparcos, Tycho-2, Gaia, HST) 0.001″, 0.050° 0.0005″, 0.050°
SPC X, Z, O Spectroscopic binaries, eclipse minimum timing, occultation timing 0.050″, 0.500° 0.020″, 0.300°
DEF Unmapped / Blank Global fall-back for unspecified observational methods 0.100″, 1.000° 0.010″, 0.200°

Mathematical Error Model and Quadrature Addition

The assignment of final effective uncertainties (σρ and σθ) follows a deterministic decision matrix designed to prevent over-weighting due to underestimated internal errors published in catalogs.

When a published formal error value σcat is present and strictly positive (σcat>0), it is combined in quadrature with the corresponding category-specific systematic error floor σsys:

σρ = σcat,ρ2 + σsys,ρ2

σθ = σcat,θ2 + σsys,θ2

This quadrature addition ensures that even if an observer reports extremely small formal measurement uncertainties, the weight of the observation within the orbit fitting routine remains bounded by the physical limits of the underlying technique (e.g., atmospheric seeing limits, optical diffraction limits, or detector pixel scales).

Treatment of Missing Values, Zeroes, and Exceptional Cases

Historical catalogs frequently omit error estimates or use placeholder tokens. To ensure numerical stability and prevent mathematical singularities during matrix inversions, exception handling is governed by the following rules:

Role of Effective Uncertainties in Optimization

The effective uncertainty arrays (σρ and σθ) generated during preprocessing form the statistical foundation for the subsequent orbit determination routines. By supplying strict, non-zero standard errors for every observational pair, the pipeline enables a fully weighted χ2-minimization.



Ephemeris Computation and Projective Geometry

For a given epoch tk and parameter vector p = [P, a, i, Ω, T, e, ω]T, the theoretical position of the secondary star relative to the primary is evaluated through Kepler's laws and Campbell projection equations.

Kepler's Equation and True Anomaly

First, the mean anomaly Mk is computed from the mean motion n = 2π / P:

Mk = ( 2πP · (tk-T) ) mod 2π

The eccentric anomaly Ek is obtained by solving Kepler's transcendental equation:

Mk = Ek - e · sin (Ek)

The true anomaly νk and the orbital radius vector rk (in the true orbital plane) are derived using standard half-angle relations:

νk = 2 · arctan2 ( 1+e · sin(Ek2) , 1-e · cos(Ek2) )
rk = a (1-e·cos(Ek))

Projection onto the Plane of the Sky

The true orbit is projected onto the tangential sky plane using the argument of latitude uk = νk + ω. According to standard astronomical conventions, x represents the offset toward East (Δα cos(δ)) and y represents the offset toward North (Δδ):

xmod,k = rk · [ sin(Ω) · cos(uk) + cos(Ω) · sin(uk) · cos(i) ]
ymod,k = rk · [ cos(Ω) · cos(uk) - sin(Ω) · sin(uk) · cos(i) ]

The apparent model separation ρmod,k and position angle θmod,k are extracted via:

ρmod,k = xmod,k2 + ymod,k2
θmod,k = arctan2 ( xmod,k , ymod,k )


Computation of the normalized cartesian residuals

The normalized cartesian residuals are computed between the observed and model-predicted relative positions of a visual binary. The observed polar measurements (separation and position angle) and their uncertainties are transformed into Cartesian East and North coordinates using rigorous error propagation. The resulting weighted residual vector is intended for least-squares optimization of the orbital elements.

Observations are mapped onto orthogonal Tangential Sky Coordinates (xobs, yobs):

xobs,k = ρobs,k · sin(θobs,k) , yobs,k = ρobs,k · cos(θobs,k)

Applying Gaussian error propagation to this coordinate transformation yields cartesian variance estimates sx,k2 and sy,k2:

sx,k = sin2(θobs,k) · σρ,k2 + cos2(θobs,k) · (ρobs,k·σθ,rad,k)2 }
sy,k = cos2(θobs,k) · σρ,k2 + sin2(θobs,k) · (ρobs,k·σθ,radk)2 }

The normalized residual vector r(p) ∈ ℝ2N is assembled by concatenating weighted orthogonal components:

r(p) = [ xmod,1-xobs,1sx,1 , , xmod,N-xobs,Nsx,N , ymod,1-yobs,1sy,1 , , ymod,N-yobs,Nsy,N ]T


Optimization Architecture

The central orbit fitting routine employs an adaptive strategy balancing global exploration and local refinement.

Local Refinement via Least Squares

Once a promising starting guess is established (via DE, Thiele-Innes grid search, or catalog values), a local Trust-Region Reflective (TRF) algorithm refines the parameters. TRF solves the bounded non-linear least-squares problem:

minlpu S(p) = 12 r(p)2 = 12 m=12N rm2(p)


Statistical Evaluation and Uncertainty Analysis

Chi-Square and Degrees of Freedom

χ2 = m=12N rm2 , dof = 2N-7 , χred2 = χ2dof

Covariance Matrix and Parameter Standard Errors

The local curvature of the cost function is derived from the 2N × 7 Jacobian matrix J, where Jm,j = ∂rm / ∂pj. To handle potential rank deficiency or strong parameter correlations robustly, the covariance matrix C is evaluated via Singular Value Decomposition (SVD) pseudo-inversion:

C = (JTJ)+

If unweighted fitting is performed (σρ = None), the covariance matrix is scaled by χred2. Formal 1σ standard errors for each orbital parameter pj are given by:

σpj = Cj,j

Additionally, the condition number κ(JTJ) = σmax / σmin is recorded to diagnose ill-conditioned systems.



Optimization Summary

The Optimization Summary provides quantitative measures describing the quality, robustness, and statistical consistency of the orbit determination based on the supplied observations and measurement uncertainties. It should be interpreted as a whole. Individual metrics are most meaningful when considered together, particularly in relation to the number of observations, the orbital phase coverage, and the assumed measurement uncertainties.

N observations

Number of observations used in the orbit determination. Each observation consists of a measured separation (ρ) and position angle (θ), contributing two residuals (x and y) to the fit.

Time span

Time interval covered by the observations, given by the minimum and maximum observation epochs. A larger time span generally improves orbit determination, especially for long-period systems, as it increases orbital phase coverage.

Orbital phase coverage

Fraction of the orbital period covered by the observations, where P is the fitted orbital period. Values close to or exceeding one full period generally provide stronger constraints on the orbital elements, while smaller values indicate limited phase coverage and potential parameter degeneracies.

phase coverage = tmax tmin P

χ² (Chi-squared)

The total chi-squared value of the fit, defined as the sum of squared, uncertainty-weighted residuals, where (x, y) are the Cartesian coordinates derived from the separation and position angle, and σx, σy are the corresponding propagated uncertainties. χ² measures the overall disagreement between the model and the observations. In this implementation, χ² is calculated from normalized Cartesian residuals.

χ2 = [ ( xmodelxobs σx ) 2 + ( ymodelyobs σy ) 2 ]

Degrees of freedom (dof)

Number of independent residuals available to evaluate the fit after accounting for the fitted model parameters. For N observations and seven fitted orbital elements (P, a, i, Ω, T, e, ω), the degrees of freedom are given by the equation below. A positive and sufficiently large number of degrees of freedom is required for a meaningful statistical interpretation of χ² and reduced χ².

dof = 2 · N 7

Reduced χ²

The reduced χ² indicates how well the orbital model matches the observations relative to the assumed measurement uncertainties.

χred2 = χ2 dof

Optimization status

Indicates whether the numerical optimization converged (Converged or Not converged).

Covariance condition number

The condition number (κ) of the covariance matrix. Quantifies the numerical stability of the inversion and parameter correlations during the fit. It serves as a scalar measure for the numerical stability of the linear inversion and the degree of parameter correlation.

Excellent (< 105)
: Negligible parameter correlation; orbital elements are well constrained.
Good (105 – < 108)
: Minor parameter correlation; typical for orbits with good phase coverage.
Fair (108 – < 1012)
: Moderate to strong parameter coupling (e.g., period P vs. semi-major axis a); parameter errors are interdependent.
Poor (1012 – < 1016)
: Strong parameter degeneracy; standard uncertainties (σ) are numerically and statistically unreliable
Very Poor (≥ 1016)
: Ill-Conditioned, near-singular matrix; severe parameter degeneracy (e.g., straight-line arc, i ≈ 0°, or e ≈ 0)
Unknown
: Covariance matrix could not be inverted

RMS separation

Root-mean-square (RMS) residual of the separation (ρ), calculated from the differences between observed and modeled separations. This value quantifies the typical deviation of the observations from the model.

RMS ( ρ ) = 1 N · ( ρ model ρ obs ) 2

Weighted RMS (WRMS) Residuals

While standard RMS residuals treat all observation epochs equally, the Weighted Root Mean Square (WRMS) residuals account for varying measurement uncertainties. Each residual is weighted by the inverse square of its individual observational error (σ), ensuring that high-precision measurements (e.g., modern interferometry or space-based astrometry) have a stronger influence on the overall quality assessment than historical visual observations with higher uncertainties.

The weighting factor wi for an observation epoch i is calculated as:

wi = 1 σi 2

The WRMS residuals for the separation (WRMSρ) and position angle (WRMSθ) are defined as:

Weighted RMS Separation (arcsec):

WRMSρ = i=1 N wρ,i · rρ,i2 i=1 N wρ,i
Weighted RMS Position Angle (deg):

WRMSθ = i=1 N wθ,i · rθ,i2 i=1 N wθ,i

Where rρ,i=ρobsρcalc and rθ,i=θobsθcalc represent the individual O−C residuals at epoch i. If individual observational errors are omitted, the calculation falls back to standard unweighted RMS statistics.

RMS position angle

Root-mean-square (RMS) residual of the position angle (θ), calculated from the differences between observed and modeled angles. The RMS position angle reflects the typical angular discrepancy between the model and the observations.

Note: Angular differences (θmodelθobs) are phase-wrapped to the range [−180°, 180°] prior to squaring to handle the 360° boundary discontinuity correctly.

RMS ( θ ) = 1 N · [ ( θ model θ obs ) wrapped ] 2

RMS spatial PA arc (ρ·sinΔθ)

The root-mean-square (RMS) of position angle residuals projected into spatial arc length by multiplying the angular offset Δθ (in radians) by the observed separation ρ.

Max separation residual

Maximum absolute residual of the separation (ρ). This value highlights the largest individual deviation between an observed separation and the corresponding model prediction.

max | ρmodel ρobs |

Max PA residual

Maximum absolute residual of the position angle (θ), dynamically wrapped to ensure correct boundary evaluation. This value highlights the largest individual angular deviation.

max | ( θmodel θobs ) wrapped |


Estimated 1-σ Parameter Uncertainties

This subsection lists the formal 1-σ standard uncertainties for the 7 fitted orbital elements. When a valid 7×7 covariance matrix cov is available, uncertainties are evaluated from the diagonal elements:

σi = covi,i

If a diagonal element is non-positive (covi,i0) or the covariance matrix cannot be computed, the uncertainty for that parameter is set to NaN. Angular uncertainties (i, Ω, ω) are automatically converted from radians to degrees.

Key Parameter Symbol Description Units
P Period P Orbital period yr
a Semi-major axis a Semi-major axis arcsec
i Inclination i Inclination angle degrees
Omega Node Ω Longitude of the ascending node degrees
T Periastron passage T Epoch of periastron passage yr
e Eccentricity e Orbital eccentricity --
omega Arg. of periastron ω Argument of periastron degrees

Note: For highly non-linear fitting problems or large condition numbers, these asymptotic 1-σ errors represent a lower bound on the true uncertainties (Cramér-Rao bound).



Estimated Orbit Grade

To provide an automated and objective assessment of the calculated orbital elements, the software computes an Estimated Orbit Grade on a numerical scale from 1 (Definitive) to 5 (Indeterminate). This classification scheme is conceptually aligned with the grading system used in the USNO Sixth Catalog of Orbits of Visual Binary Stars, combining observational completeness, parameter stability, and numerical quality into a single metric.

Methodology and Evaluated Parameters

The grading algorithm evaluates the fit results in a hierarchical decision tree based on five primary key performance indicators:

Decision Logic and Grade Criteria

Grades are assigned sequentially from Grade 1 down to Grade 5. The first set of conditions that is fully satisfied determines the final grade. Unless explicitly stated otherwise (e.g., using an explicit OR or ANY operator), all conditions listed for a particular grade must be satisfied simultaneously (logical AND).

Grade Rating Label Evaluation Criteria / Decision Rules Description
1 Definitive
  • Phase coverage Δt/P0.90 (90%)
  • Relative period error σP/P<0.05 (5%)
  • Number of observations Nobs30
  • Condition number K<107
  • Weighted RMS separation WRMSρ0.15
Full or near-full orbital coverage; extremely well-constrained parameters and low residuals.
2 Good
  • Phase coverage Δt/P0.55 OR (Δt/P0.35 with Periastron observed)
  • Relative period error σP/P<0.15 (15%)
  • Number of observations Nobs20
  • Weighted RMS separation WRMSρ0.30
Well-observed arc with reliable parameters, well-managed residuals, and high confidence.
3 Reliable
  • Phase coverage Δt/P0.30 OR (Δt/P0.20 with Periastron observed)
  • Relative period error σP/P<0.30 (30%)
  • Number of observations Nobs10
Partial orbit coverage; key features or periastron passage captured.
4 Preliminary
  • Phase coverage Δt/P0.10 (10%)
  • Relative period error σP/P0.60 (60%)
Short observational arc; period and major semi-axis remain subject to revision.
5 Indeterminate Triggered if ANY of the following apply:
  • Condition number K1016 (ill-conditioned matrix)
  • Phase coverage Δt/P<0.10
  • Relative period error σP/P>0.60
  • Weighted RMS separation WRMSρ>1.00
  • Optimization failure, invalid P, or uninvertible covariance matrix
Extremely short arc, severe parameter degeneracy, excessive observational scatter, or numerical instability.


Diagnostic Notes

Automated health flags and diagnostic messages evaluated during orbit optimization to highlight numerical instabilities, data coverage limitations, or statistical anomalies:



History

Version 1.0 : https://doi.org/10.5281/zenodo.19160070

Version 1.1 : https://doi.org/10.5281/zenodo.19474677

Version 1.2 : https://doi.org/10.5281/zenodo.22309756



Disclaimer

The algorithms used in the Double Star Calculator were developed and implemented by me to the best of my knowledge and belief. I have thoroughly tested the tool, and it provides plausible results based on GAIA data. However, I do not warrant the accuracy, completeness, or correctness of the results. This tool is provided "as is" without any guarantees regarding its suitability for a specific purpose or non-infringement of third-party rights.

The use of this tool is entirely at your own risk. I assume no liability for any damages, including but not limited to direct, indirect, incidental, or consequential damages, arising from the use of this tool or any errors or inaccuracies in the results.

This tool is intended for informational and research purposes only and is not a substitute for professional scientific or astronomical analysis. I reserve the right to modify, update, or discontinue the tool at any time without prior notice.

If the Double Star Calculator has been helpful in your work, a citation or acknowledgment would be greatly appreciated.

Privacy Notice: This tool does not collect, store, or process any personal data from users.

Copyright (C) 2026. The documentation is licensed under CC BY 4.0. Unless otherwise noted, all output generated by the Double Star Calculator including orbit diagrams, ephemerides, and analytical reports is licensed under CC BY 4.0.


Acknowledgements

The Double Star Calculator makes use of data from the European Space Agency (ESA) mission Gaia, processed by the Gaia Data Processing and Analysis Consortium (DPAC). Funding for the DPAC has been provided by national institutions, in particular the institutions participating in the Gaia Multilateral Agreement. Additionally, it incorporates data from the Washington Double Star Catalog, maintained at the U.S. Naval Observatory, makes use of the Aladin Sky Atlas developed at CDS, Strasbourg Observatory, France, and makes use of the SIMBAD database, operated at CDS, Strasbourg, France.



References

[1] Wichmann, H. (2026), Double Star Calculator, https://www.stella-vega.de/ds/

[2] Wichmann, H. (2026), Double Star Calculator - Technical Documentation, https://stella-vega.de/ds/ds_documentation.html

[3] Harshaw, Richard W. (2016), CCD Measurements of 141 Proper Motion Stars: The Autumn 2015 Observing Program at the Brilliant Sky Observatory, Part 3 (Journal of Double Star Observations, Vol. 12 No. 4 April 22, page 394), http://www.jdso.org/volume12/number4/Harshaw_394_399.pdf

[4] Tian, Hai-Jun; El-Badry, Kareem; Rix, Hans-Walter; Gould, Andrew (2020), The Separation Distribution of Ultrawide Binaries across Galactic Populations (The Astrophysical Journal Supplement Series, 246:4), https://ui.adsabs.harvard.edu/abs/2020ApJS..246....4T/abstract

[5] El-Badry, Kareem; Rix, Hans-Walter; Heintz, Tyler M. (2021), A million binaries from Gaia eDR3: sample selection and validation of Gaia parallax uncertainties (Monthly Notices of the Royal Astronomical Society, Volume 506, Issue 2, Pages 2269–2295), https://ui.adsabs.harvard.edu/abs/2021MNRAS.506.2269E/abstract

[6] J. A. Correa-Otto and R. A. Gil-Hutton (2017), Galactic perturbations on the population of wide binary stars with exoplanets (A&A, Volume 608, December 2017), https://www.aanda.org/articles/aa/abs/2017/12/aa31229-17/aa31229-17.html

[7] R. Andrae, M. Fouesneau, R. Sordo, et al. (2023), Gaia Data Release 3, Analysis of the Gaia BP/RP spectra using the General Stellar Parameterizer from Photometry (A&A, Volume 674, June 2023), https://www.aanda.org/articles/aa/full_html/2023/06/aa43462-22/aa43462-22.html

[8] University of Northern Iowa, Spectral type characteristics, https://sites.uni.edu/morgans/astro/course/Notes/section2/spectraltemps.html

[9] Eker, Z.; Bakış, V.; Bilir, S.; et al. (2018), Interrelated main-sequence mass–luminosity, mass–radius, and mass–effective temperature relations, (Monthly Notices of the Royal Astronomical Society, Volume 479, Issue 4, Pages 5491–5511), https://ui.adsabs.harvard.edu/abs/2018MNRAS.479.5491E/abstract

[10] Pecaut, M. J.; Mamajek, E. E. (2013), Intrinsic Colors, Temperatures, and Bolometric Corrections of Pre-main-sequence Stars, (The Astrophysical Journal Supplement, Volume 208, Issue 1, article id. 9), https://ui.adsabs.harvard.edu/abs/2013ApJS..208....9P/abstract, updated via the online compilation: Mamajek, E. E., 2022, A Modern Mean Dwarf Stellar Color and Effective Temperature Sequence, Version 2022.04.16, https://www.pas.rochester.edu/~emamajek/EEM_dwarf_UBVIJHK_colors_Teff.txt

[11] Roderick R. Letchford, Graeme L. White, Carolyn J. Brown (2022), Orbital Elements of visual binary stars with very short arcs: With application to double stars from the 1829 southern double star catalog of James Dunlop, (Astronomical Notes, Volume 343, Issue3), https://onlinelibrary.wiley.com/doi/10.1002/asna.20210113



www.stella-vega.de