Documentation

Draft. Sections marked planned describe tools that are not written yet.

Overview

Oracle fits orbits to real data and simulates the dynamics of planetary and multiple star systems planned. Both activities follow the same path (prepare, run, follow, analyze).

The fit adjusts Keplerian orbits to relative astrometry, radial velocities and Gaia epoch astrometry. A Levenberg-Marquardt fit gives a starting point; an MCMC then samples the posterior distribution of the orbital elements, masses and other parameters.

The orbits are computed in universal variables, suited to very eccentric, poorly covered, or unbound orbits, and each orbit is sampled in the parametrisation that suits its data. Classical elliptic elements, the former model, are still run from parameter files that ask for them.

Installation

Preparing and analyzing a fit or a simulation need nothing but this site. Running one needs the oracle command on the computer that computes, and following it is easiest with oracle serve, which that command also gives. Two steps, once.

  1. Install the command (Python 3.11 or later). It comes precompiled for macOS and Linux. Oracle goes into a Python environment of its own, which keeps it apart from the Python of the system (most systems refuse a plain pip install there). Two ways.
    • With pipx, the simplest. pipx makes the environment by itself, and oracle works in any terminal.
      pipx install oracle-orbits          # on macOS, pipx comes with brew install pipx
      pipx upgrade oracle-orbits          # to update
    • In an environment of your own, to have other Python packages next to it.
      python3 -m venv ~/oracle-env
      source ~/oracle-env/bin/activate     # in each new terminal, before using oracle
      pip install oracle-orbits
      pip install --upgrade oracle-orbits  # to update
    The compiled programs and the pages of the site stay in that environment. Removing it removes them, but never your runs, which are in your own folders.
  2. Let the system start oracle serve at each login, in the background, without a terminal. The first oracle run in a terminal offers it (once), or at any time
    oracle serve start --login
    Then oracle open opens Oracle in your browser. Install it as an app if you like (see below). When Oracle is updated, oracle serve starts again by itself with the new code, and the runs under way go on. All the commands are listed below.

New versions. oracle serve asks PyPI for the last version of Oracle, once a day at most, and the pages it serves say when there is a newer one. Nothing is installed by itself. Update there, or oracle update in a terminal, installs the program and the pages together. Nothing about you or your data is sent. To never ask, set ORACLE_NO_UPDATE_CHECK=1 before oracle serve start.

The port. oracle serve and your browser meet on a port of your computer, 8765 unless you choose another. If another program, or another user of a shared server, already holds it, oracle serve takes the next free port, says so, and keeps it. oracle serve start --port 8766 chooses one yourself, kept as well. oracle open always finds the right one, and oracle serve status gives yours and lists those of other users. The address, its bookmarks and the installed app belong to their port, so install the app again after a change.

SystemWhat to do
macOS, LinuxThe two steps above.
WindowsInstall WSL first (in PowerShell, wsl --install), then the two steps above in WSL. oracle serve start --login starts it with Windows, and the Windows browser opens http://localhost:8765 as usual.
Computing serverOnly the first step. Run oracle serve start there when you want to follow your runs. It goes to the background and outlives the ssh session, until oracle serve stop. Bring it to your laptop through an SSH tunnel, ssh -L 8765:localhost:8765 server (with the port oracle serve gives, if not 8765). Then open http://localhost:8765 on the laptop.

oracle serve answers only on its own computer. It reads the folders you add on the Follow page, and the files you choose in its chooser, never anything else. It keeps the folders by their path in ~/.oracle/folders.json, with its log (~/.oracle/serve.log). To keep them in another folder, set ORACLE_HOME to it before oracle serve start --login. Without it, the Follow page still reads a folder you choose, but only Chrome and Edge keep it from one visit to the next.

With oracle serve, the Follow, Prepare and Analyze pages choose files and folders in a chooser of Oracle, the same in every browser. It goes back where you were, lists the folders added on Follow, tells which folders are runs, and grays the files the page cannot read. The page then knows where the files are, which lets Prepare start a fit. Without oracle serve, the pages use the chooser of the system.

Where no precompiled version fits, pip compiles the Fortran itself (gfortran and make needed, on macOS brew install gcc), which takes about a minute. To force it, add --no-binary oracle-orbits to the install command. To change the Fortran yourself, clone the code and run pip install -e . in it, in an environment of your own, and oracle then uses the programs of the clone, rebuilt with make compile.

Commands

All the commands of oracle, in a terminal. oracle --help, or oracle serve --help and the like, says the same. A word between < > stands for what you give, <run> for the folder of a run (or its parameter file), <file.toml> for a parameter file.

CommandWhat it does
Runs
oracle run <file.toml>Runs a parameter file, in a folder of the run (workflow). From a terminal it gives the terminal back at once and goes on in the background, even once the terminal is closed. In a batch job (Slurm, OAR, PBS, LSF) it stays in the foreground.
oracle stop <run>Stops a run, from any terminal that sees its folder. Past its burn-in, it saves its state first.
oracle continue <run>Continues a stopped run from its last save, whenever you want.
The pages
oracle openOpens Oracle in your default browser, and starts oracle serve first if it does not run.
oracle serve startStarts the server of the pages now, in the background, until oracle serve stop or the computer stops. It lets the pages read your folders and start, stop and continue runs.
oracle serve statusA table of yours (running or stopped, started at each login or not, its port and address) and of those of the other users of the computer that run.
oracle serve stopStops it now. The runs under way go on. Started at login, it comes back at the next login.
oracle serve start --loginStarts it now and at each login, by the system (macOS, Linux, Windows through WSL), for good.
oracle serve stop --loginStops it, and no longer at login.
The version
oracle updateInstalls the last version of Oracle, if there is a newer one. Refused while a run goes on this computer.
Options
--foregroundWith run, continue or serve start, keeps the terminal until the end (Ctrl-C then stops it).
--threads <n>With continue, another number of threads than the one of the run.
--verboseWith run or continue in the foreground, shows all the Fortran writes.
--dry-runWith run, checks the parameter file and writes the folder of the run, without starting the Fortran.
--port <port>With serve start, another port for Oracle, kept from then on (the port).
--versionThe version of Oracle.

Workflow

  1. Prepare a fit or a simulation on the Prepare page. Each run gets a folder of its own in the folder of the system, named after the run (fit_2026-11-15/ by default), with its parameter file and a copy of the measurements it uses. Your data files stay whole in a data folder of the system.
    my_system/
      data/                  your data files, whole
        astrometry_rel.csv
        rv.csv
      fit_2026-11-15/        a run
        fit_2026-11-15.toml  its parameter file
        astrometry_rel.csv   the measurements it uses
        rv.csv
        status.json, results.dat.gz, …  written by the run
    A run folder holds all it needs, so it can be copied as it is to a server. To try a variant of a run, open its parameter file with Open a parameter file. The form is filled as it was, with the same seed and the run name fit_2026-11-15_2.
  2. Run it. With oracle serve, the Run button of Prepare asks for the folder of the system (the chooser can make a new folder) and the name of the run, shows what it will write there, writes your data files whole in its data folder (never over a different file of the same name) and the folder of the run, starts the fit in the background and opens Follow. Otherwise, Download gives fit_2026-11-15.zip, the folder of the run. Unzip it in the folder of the system and run it there, or on a server (in a batch script if needed).
    oracle run fit_2026-11-15/fit_2026-11-15.toml
    The results go into the folder of the run.
    • Never overwritten. Running the same parameter file again makes fit_2026-11-15_2/, with a copy of the parameter file and of the measurements. A parameter file next to its data files, as before, works too. Its run goes into a new folder of its name, with a copy of both. The folder of a run, or one above it, can be renamed or moved while it runs.
    • In the background. From a terminal, oracle run gives the terminal back as soon as the folder of the run is made, and closing the terminal, or leaving an ssh session, does not stop the run. What it says goes into log.txt, with what the Fortran writes. --foreground keeps the terminal until the run ends.
    • Stop and continue. oracle stop fit_2026-11-15 stops a run from any terminal that sees its folder, and oracle continue fit_2026-11-15 continues it whenever you want. Past its burn-in, a few seconds after the start of the MCMC, a run saves its state as it stops (dump.dat), so nothing is computed twice. Asked earlier, oracle stop waits for the end of the burn-in. Stopped otherwise during the Levenberg-Marquardt, a run has nothing to save and can only be run again.
    • On a computing server. In a batch job (Slurm, OAR, PBS, LSF), oracle run stays in the foreground by itself, so that the job lasts as long as the run. When the queue stops the job at its time limit, the run saves its state too, if the queue gives some seconds between its stop signal and the kill (Slurm gives 30 s by default). A Slurm script, for instance
      #!/bin/bash
      #SBATCH --time=48:00:00
      #SBATCH --cpus-per-task=8
      #SBATCH --signal=B:TERM@120        # the stop signal 2 min before the limit, for more margin
      exec oracle run fit_2026-11-15/fit_2026-11-15.toml   # exec, so that the signal reaches it
      Then oracle continue fit_2026-11-15, in another job, takes it up again.
  3. Follow it on the Follow page. Add the folder of the system, or a folder holding several systems. Each folder is a zone that opens and closes, and closed still tells what its runs do. Each run shows its note, its setup, its steps and the version of the code it ran with, and opens in Analyze or in Prepare. A run that has said nothing for 2 min while under way is shown as having no news (the computer slept, or the job was stopped). With oracle serve, Stop the run stops a run under way on that computer (as oracle stop would), and Continue the run continues a stopped run, both from the page. Otherwise they give the command to type. The trash icon moves the folder of a run to the Trash of that computer, where it can be put back. A run under way is stopped first.
  4. Analyze the results on the Analyze page, from Follow or by dropping results.dat.gz there. The file is read in the browser, and a sample of its orbits (50 000 by default) feeds every tool: the summary of the parameters, ready to copy in LaTeX, the orbits on the sky and against time with the data and their residuals, histograms in one and two dimensions, the corner plot, where a companion will be on a given date, and the Gaia transits. Every plot follows one selection. Drag across a histogram or draw around points to keep part of the orbits, or add conditions, including a measurement made elsewhere that weighs the orbits. Up to three families of orbits can be compared. Any formula of the parameters becomes a quantity of its own. Keys 1 to 8 open the tools, and pinching zooms. On the sky, an outer orbit is seen from the central body, so it carries the wobble that the inner orbits give that body. Every plot downloads as SVG (vector) or PNG (four times the screen size), always in day colors on white. For LaTeX, use the PNG with pdflatex, or turn the SVG into a PDF with Inkscape (inkscape plot.svg --export-type=pdf) or the svg package.

Model

The notations below are used everywhere in Oracle, in the forms, the parameter file and the results.

Central body. Choose one body as the reference of the system. It is called the central body and has index 0 (mass m0), for example the star of a planetary system or one of the stars of a multiple system. The companions are numbered 1, 2, … and defined from it, in Jacobi coordinates. Companion k orbits the center of mass of the central body and of companions 1 to k − 1. The positions and velocities measured are those of the companions relative to the central body, so the orbit of an outer companion seen from the central body wobbles with the inner orbits.

Each companion k has a Keplerian orbit in its Jacobi coordinates, described by these elements.

SymbolMeaningUnit
mMass of the companionMjup or Msun
aSemi-major axisau
qPeriastron distance, q = a(1 − e), used instead of a with universal variables since it stays defined for unbound orbitsau
eEccentricity, below 1 with elliptic elements, any value with universal variables, for an orbit in a Cartesian parametrisation (a resolved orbit seen on a partial arc), below 1 in the others
iInclination°
ΩLongitude of the ascending node (see the conventions)°
ωArgument of periastron°
tpTime of a periastron passageMJD
PPeriod, set by a and the masses inside the orbit, P2 = 4π2a3 / G(m0 + … + mk)days
βWith Gaia data, the fraction of the G-band flux that comes from the companion (0 for a dark companion)

What fixes the masses

The data never weigh a body directly. They measure the size of an orbit and its period, and Kepler’s third law turns them into a mass. Which masses come out depends on which motions are seen.

DataMotion seenWhat they fix
Relative astrometrythe companion around the central body, in mas (in au with the distance)the total mass inside each orbit, m0 + … + mk, not how it splits, but for the differences of these totals and the pull of the companions on the central body (below)
Relative radial velocitiesthe companion around the central body, in km/sthe total mass times sin3 i, the total mass once i is known (from relative astrometry or Gaia)
Absolute radial velocities, Gaiathe central body around the center of massonly the mass function m3 / (m0 + m)2 (times sin3 i with velocities alone)
Both kindsboth motionsevery mass, from the ratio of the two orbits, once the size of the relative orbit is known, from relative astrometry (with the distance, given, or measured by Gaia or by relative radial velocities) or from relative radial velocities with Gaia

Why a prior is needed with the data of the central body alone. The mass function is one equation for two masses. Every pair (m0, m) on its curve fits the data exactly as well, up to infinite masses. For Gaia BH3, whose mass function is 33.2 Msun, a star of 0.1, 0.76 or 10 Msun gives a companion of 33.4, 34.7 or 48.4 Msun. The data still say much, since the companion is at least 33 Msun whatever the star, but not where on the curve the system sits. Without a prior, the L-M has no minimum to reach and the chains of the MCMC drift along the curve without converging. So Prepare and oracle run refuse such a run without a prior on a mass, most often that of the central body, known from its spectrum. Prepare says so above the parameter file, with the priors that would do, and the quick fit waits for one.

Which mass. With Gaia, which sees the orbit of the central body on the sky and so its inclination, a prior on any one mass, or on the total mass, fixes all the others. The mass function then ties m0 and m without sin i, and with several companions each orbit ties its companion to the mass inside it. With radial velocities alone, the inclination stays free. A prior on m0 then gives m sin i, and m itself follows from the prior on i (isotropic orbits). A prior on a companion or on the total mass gives a run too, but the central mass then moves with i and is hardly learnt, so the usual choice there is m0, known from the spectrum.

Companions seen in relative data only. With one orbit, only the total mass m0 + m1 is fitted, so a prior on the masses bears on it (Prepare and oracle run refuse one on m0 or m1 alone). With several, the data still weigh the mass inside each orbit, so each outer companion as the difference of two of these totals, which is loose for a light companion far out, and m0 apart from m1 only through the pull of the companions on the central body, which moves the positions of the outer ones. No prior is needed, but some masses may be hardly weighed. The quick fit measures how well each one is, and Prepare warns for those known to worse than 50 %: a prior on them, or data of the central body, fixes them. On the example with two companions, relative astrometry alone gives m1 to ±49 % and hardly weighs m2 (7.6 Mjup out of 1.05 Msun inside its orbit), while the radial velocities of the central body bring both to a few percent.

What Prepare imposes. Only what the run cannot do without: a prior on a mass with the data of the central body alone, and the distance with relative astrometry when neither the data nor a prior on a mass fix it. Each is an error above the parameter file, which names the priors that would do, and goes away once one is given. The rest is warned of, not refused. The first guesses, the parallax when it is fitted and the central mass, which gives the period of the starting orbit, are filled by the quick fit or from a prior, so that there is nothing to type once the quick fit runs, but for the mass of a companion that the data do not weigh (one orbit in relative data alone, where only the total mass is fitted), which the run still needs to start from. The run needs the seven values of every orbit, whatever the method.

In the quick fit. The quick fit of Prepare uses the priors of the form as the run does, and fills the central mass of the first guess, from a prior on it when there is one, else from the data. With the data of the central body alone, it needs a prior on a mass (or a central mass you type), fits the central mass too when the prior bears on another mass, and the companion mass follows from the motion of the star. With relative astrometry and a prior on a mass that fixes its scale, it fits the parallax, the dynamical parallax, and fills the parallax of First guess. With radial velocities alone, it starts from i = 60°, which they cannot correct. Relative astrometry seen at a few dates can also be fitted by an orbit that makes several turns between them, with a much shorter period and so a much larger mass (an alias of the sampling). Such orbits are not hidden. When several orbits fit the data about as well, Prepare says so and lists them in a window, the first being the one that agrees with the priors, then the lightest of those that fit as well. Choosing another one only changes where the run starts.

What the data and the priors weigh

A click on the message of the quick fit, in Prepare, opens its χ², then for each orbit its period, its size and its eccentricity, which tell whether the data cover it, and the masses and the parallax, each with the uncertainty that the data and the priors give it, in its unit and relative in parentheses, for instance m1 45 ± 22 Mjup (49 %). It tells, before any run, which masses the data fix, which ones a prior would help, and what a prior on the distance or on a mass is worth. An orbit whose period or eccentricity the data hardly constrain is said to be covered in part, without the uncertainties of its elements, which mean little there (another minimum may fit as well). Its mass is still given when the data weigh it, since the motion of the central body or a prior can weigh it all the same.

How. At the best orbit of the quick fit, the derivatives of every residual (each measurement minus the model, over its uncertainty, and each prior as a residual too) with respect to the parameters give the curvature of the χ². Its inverse is the covariance of the parameters, the Laplace approximation, the same as the errors that the Levenberg-Marquardt fit of the run prints. The masses and a fitted parallax are fitted in logarithm, so their standard deviation is directly a relative uncertainty. With relative data of one orbit alone, only the total mass is fitted, and it is the one given. A prior on the distance counts as in the run, the parallax fitted and held by it, so that a normal law passes its uncertainty on to the masses (three times larger, the masses going as the cube of the distance) and a fixed one passes none.

Checked against the run. On the examples of this site, the uncertainties of the quick fit and of the L-M of oracle run agree. Relative astrometry of two orbits with the distance fixed, m0 ±2.2 % and m1 ±49 against ±48 %, m2 not weighed by either. With the radial velocities of the central body, ±0.28 and ±0.29 against ±0.28 %. Gaia with a prior of 10 % on m0, m1 ±6.8 against ±7.0 % and the parallax ±0.06 %. One orbit with a prior on the total mass, the total ±4.1 % and the parallax ±1.4 % on both sides. The same orbit with the distance at 30 ± 1 pc instead, the total ±10.0 % and the parallax ±3.3 % on both sides.

Its limits. It is local, so it says nothing of other solutions (the window of the solutions does) and is only roughly right when the posterior is far from Gaussian. Beyond some ±70 % it no longer tells how loosely a mass is weighed, and Prepare says only that it is hardly constrained. The quick fit has no jitter, so with data noisier than their error bars the uncertainties of the run are larger. The MCMC of the run gives the real ones.

The distance

The distance turns the positions measured in mas into au, and through Kepler’s law into masses, which go as the cube of the distance. One question decides what Oracle does with it, whether the data measure it.

The data…For exampleYou giveThe run
measure itGaia, or relative astrometry with relative radial velocities of the companion (the positions give a in mas, the velocities a sin i in au), or relative astrometry with a prior on a mass that fixes its scale (below)nothing, or an outer measurement of it as a priorfits the parallax, freely or with your prior
need it without measuring itrelative astrometry alone, or with radial velocities of the central body, without such a prior on a mass (only the product of a and the parallax is seen)its prior, fixed (a value) or normal (a value and its uncertainty), or a prior on a mass that fixes the scalefixed, its uncertainty kept out of the masses, or following your prior, which the data do not change, its uncertainty passed on to the masses
do not use itradial velocities only, which give the orbit in au directlynothing, or a distance for the resultsnothing, the distance only goes with the results

A prior on a mass instead of the distance. Relative astrometry gives the orbit in mas and its period, so Kepler’s law ties the mass inside the orbit to the parallax, M = (amas/ϖ)3/P2 (in Msun, years and au). A prior on that mass thus fixes the parallax, the dynamical parallax, ϖ = amas/(M P2)1/3, three times more precisely than the mass, σϖ/ϖ = σM/3M (a total mass known to 3 % gives the parallax to 1 %). It holds the same information as a prior on the distance. With relative astrometry alone, the prior must bear on a mass that the positions weigh, the total mass, or more generally one with the same coefficient for m0 and m1. With radial velocities of the central body too, which weigh every mass up to the scale, a prior on any mass does, m0 most often. The parallax is then fitted, without a prior on it, from the parallax of First guess.

In Prepare, the prior on the distance is in the box Priors, with those on the masses. When the data need one, an error above the parameter file says so, with the priors that would do (on the distance, or on a mass that fixes the scale). The + of the box adds a prior at any time, and Distance in its menu, beside the masses, makes it a prior on the distance (one at most). When the data measure the distance, the parallax of First guess, filled by the quick fit, is only where the run starts. When they do not use it, the prior does not change the fit and gives the distance of the results. A prior added to Gaia must come from elsewhere (a cluster, another catalog), since a parallax of Gaia itself would count the same measurements twice.

In the parameter file, the prior is a table of its own, in pc or mas.

[priors.distance]
law = "normal"              # or "fixed", with value = …
mean = 30
sigma = 0.3
unit = "pc"

When the data measure the distance, or a prior on a mass fixes it, [system] gives the parallax to start from, parallax = 33.2 # mas. Without astrometry, nothing is needed. The former key [system] distance = { value = 30, unit = "pc", uncertainty = 0.3 } is still read. A prior given where the data do not use the distance does not change the fit, and log.txt says so.

Priors

The prior is the knowledge of the system before the data. Oracle sets it on the physical quantities, the elements of each orbit and the global parameters, and not on the parameters that the chains move in (parametrisation). The Jacobian of the change of variables carries it from one to the other, so the prior is the same whatever the parametrisation, and it is generally not uniform in the parameters sampled. It is the product of four factors, the default prior below, the priors you give on the masses and the distance, the prior of the unbound orbits, and the allowed ranges.

The default prior

It says only what holds for any system, that the scale of an orbit is unknown by orders of magnitude, that its orientation is random, and that the system is seen at any moment of its orbit.

QuantityPriorMeaning
a, or q with universal variableslog-uniform, a density 1/ano preferred scale
P, or Pq with universal variables (the period of a circular orbit of radius q)log-uniform, a density 1/Pno preferred time scale, so with a no preferred mass inside the orbit
euniform in its range
ia density sin iorbital planes oriented at random
Ω, ωuniform
tpuniform mean anomaly, a density 1/P per day of tp for a bound orbitthe system seen at any moment of its orbit, more often near the apoastron where it moves slowly (Kepler’s second law)
m0, when the masses are fitted apartlog-uniformthe masses of the companions follow from their orbits
Offset of the radial velocitiesuniform
Jitter σjita density 1/(σjit + σ0), σ0 = 0.1 km/s for radial velocities, 0.01 mas for Gaialog-uniform above σ0, flat below, so that no jitter at all stays possible
Position, proper motion and parallax of Gaiauniformthe values of the catalog only start the fit

An unbound orbit (e ≥ 1, universal variables) has no period. Its phase takes the density 1/Pq per day of tp, times the weight of a passing star (bound or unbound).

Priors on the masses

A prior bears on a mass or on a sum of masses (its coefficients, the central body first, so 1 0 for m0, 1 1 for m0 + m1). Its law is one of these.

  • Normal, a mean and a standard deviation, for a mass measured otherwise.
  • Log-normal, the same in logarithm, for a relative uncertainty.
  • Uniform, a lower and an upper bound, flat between them and excluded outside. This is an allowed range for a mass, as for a, e and P.
  • Fixed, one value (a normal law of relative width 10−6).

A range of mass and the ranges of a and P. Kepler’s law ties the mass inside an orbit to a and P, so the ranges of a and P already bound that total mass, but very loosely (the default ranges allow masses from far below a planet to far above a galaxy). A uniform prior on the total mass is thus not redundant, it cuts the plane (a, P) along Kepler’s law. A range on one mass, such as m0, is new information altogether, since Kepler’s law says nothing of how the total splits.

The prior on the distance, given or fitted, is described with the distance.

Bound or unbound

With universal variables an orbit may be unbound (e ≥ 1) as well as bound, within the range of e of the run. Positions on a short arc give the position and the motion on the sky, not the depth or the velocity along the line of sight, so they often fit bound and unbound orbits equally well. Where the data do not decide, the posterior follows the prior, so the prior of an unbound orbit has to say how likely one is.

The prior. For a bound orbit, the phase is a uniform mean anomaly, a density (1 − e)3/2/Pq per day of tp, which vanishes at e = 1. An unbound companion is a star passing by, and its prior is weighted by how rare such an encounter is and by how fast the stars around move,

ε (e − 1)3/2/Pq × exp(−v∞2/2σ2), with v∞2 = GM(e − 1)/q,

where v∞ is the velocity at infinity, M the mass inside the orbit, σ the velocity dispersion of the stars around the system (their relative velocities following a Maxwell law) and ε the chance that an encounter is under way at the time of the data, compared with a bound companion. The prior vanishes at e = 1 on both sides, so the distribution of e goes down continuously through 1 when the data leave it open, instead of filling the range above 1. Everything else is unchanged, log-uniform in q and Pq, uniform in e, isotropic in orientation.

The values. By default ε = 10−4 and σ = 2 km/s, those of a young association such as Taurus, where the stars move at 1 to 4 km/s relative to one another (Galli et al. 2019, Kerr et al. 2021) and a star is caught in an encounter some 10−4 to 10−5 of the time (from the rate of Winter et al. 2024). They rarely matter. When the projected velocity exceeds the escape velocity at the projected separation, no bound orbit fits and the result is unbound whatever they are (Pearce et al. 2015). When radial velocities or a long arc require a bound orbit, they do not count either. They decide only when the data cannot tell, and then any reasonable value gives a bound orbit. With the defaults, the data must favor the unbound orbits by a factor of 104 or more, a χ² lower by about 18, and a fast passage (v∞ well above σ) even more. A real fast flyby seen on a short arc is thus called bound. To test that hypothesis, run again with σ = 0, the former prior without the weight, and compare. In the field, where stars move at tens of km/s, give a larger σ.

In Prepare, the rate and the velocity dispersion have a box of their own, Unbound orbits, after the allowed ranges, shown with universal variables when the range of e reaches 1. In the parameter file, they are a table of their own, [priors.unbound] with rate = 1e-4 and dispersion = 2 # km/s, where dispersion = 0 leaves the unbound orbits without the weight. For a system known to be bound, a range of e below 1 leaves out the unbound orbits altogether.

Allowed ranges

The allowed ranges are the last factor of the prior, strict bounds, the same for every orbit. An orbit outside one of them is never kept, so a range too narrow cuts the solution without warning in the results.

  • P and a both apply, and since they are tied by the masses, the narrower of the two decides. By default P goes from 1 day to 107 days, wide enough never to cut, so that only the range of a matters (0.01 to 10 000 au).
  • With universal variables, the ranges bear on q and e only, and e goes up to 1.5 by default.
  • The quick fit of Prepare checks them. When it finds an orbit near a bound, Prepare warns that the range may cut the solution.

Parametrisation of the MCMC

With universal variables, the chains of the MCMC do not move in the elements themselves (a, e, i, …) but in seven parameters per orbit, built so that the posterior looks as much as possible like a Gaussian in them. The sampler of Oracle moves well along straight correlations and badly along curved ones, so the parameters are the quantities that the data measure, and an angle that the data cannot fix is carried by a radius that vanishes where the angle is undefined (at the center of a disk, where it costs nothing).

Each orbit gets its own parametrisation, chosen from the data and the quick fit. The choice changes how fast the chains converge, never the result. The prior is set once in the elements and the Jacobian of each change of variables is included, so every parametrisation samples the same posterior, and the results are always written in elements. In Prepare, the Parametrisation box gives each orbit its angles, its scale and its direction, in lapis as the quick fit chooses them, until a choice by hand. The empty entry at the top of a menu goes back to the choice of the quick fit. Automatic angles leave the orbit to the run, which chooses it at the start of the MCMC, as without a quick fit. Retrograde is the mirror image, marked by a prime. The scale and the direction belong to the polar angles only, and the direction not to SEP. Former is the former parametrisation, for comparisons. The parameter file keeps the choice as a list of names in [fit], one per orbit from the innermost out, such as parametrisation = ["SD′", "Cart-g"], where "automatic" leaves an orbit to the run. With parametrisation = "automatic", as in files written by hand, the run chooses every orbit at the start of the MCMC with the same tree, an orbit counting as determined when its relative astrometry spans at least 0.99 of its period, and "former" puts every orbit in the former parametrisation. Unknown names are refused, and an orbit unbound at the start keeps the former parametrisation instead of a polar one, with a warning. Follow shows the parametrisation of each orbit of a run, and log.txt gives it at the start of the MCMC. With elliptic elements there is no choice, every orbit is sampled in the parameters of SD without radial velocities and of SN with them.

How it is chosen

An orbit is resolved when the position of its companion relative to the central body is measured (relative astrometry). It is determined when the quick fit weighs its period to better than 3 %, from the curvature of the χ² at its best orbit (what the data weigh), else it is seen on a partial arc, as is any orbit unbound at the start. How much of the period the data span is not enough, since their precision and the part of the orbit they see count as much. An arc around the periastron can fix the orbit from a third of the period, one around the apoastron not before the whole period. It is seen by radial velocities with velocities of the central body, or relative velocities of its companion or of an outer one.

The name of a parametrisation is its angles, then its scale, as in SN-EA. Each comes from its own tree.

Angles

  • Is the orbit resolved?
    • Yes, determined SD without radial velocities, SN with them
    • Yes, on a partial arc
    • No, seen by astrometry, Gaia or its reflex in the positions of an outer companion SD or SN, as above
    • No, seen by radial velocities only SEP

Scale, except Cart

  • Has the orbit data of its own, the positions or relative velocities of its companion?
    • Yes ln a, no suffix
      • except relative velocities with no astrometry ln(a sin i), -ER
    • No, seen through the motion of the central body ln(a⋆ sin i), -EA
  • A retrograde orbit (i > 90° at the start) takes the same parametrisation on its mirror image, marked by a prime (SD′, SN′, SD′-EA, SN′-EA). Not for the Cartesian ones, which have no angles, nor for SEP, since radial velocities alone do not tell a prograde orbit from a retrograde one.
  • Warnings, not refusals. The run goes on and log.txt warns for an orbit seen face-on (i < 5° or > 175°) on a partial arc, for an orbit seen by Gaia alone with a flux fraction β close to its mass fraction (a second solution of the same χ²), for several resolved orbits on partial arcs, and for an orbit not resolved and unbound at the start, which keeps the former parametrisation.
  • Common to all. The mass of the central body is one more parameter, ln m0, with the jitters. The parameters on which the model depends linearly (V0 of the radial velocities, and with Gaia the offsets Δα*, Δδ, the proper motion and the parallax) are not sampled but integrated exactly at each step, then drawn for each orbit kept.

The parametrisations

The polar parametrisations are named after their angles, then their scale. Their notations are s = e/√(1 − e2), which vanishes when e → 0, t = (1 − e2)1/4 sin(i/2), which vanishes when i → 0, t′ = (1 − e2)1/4 cos(i/2), which vanishes when i → 180°, the mean longitude λ = M + ω + Ω at the reference epoch T0, and a⋆ = a mk / (m0 + … + mk), the semi-major axis of the reflex motion. A pair x (cos, sin) θ stands for (x cos θ, x sin θ). They hold bound orbits only (e < 1), whereas the Cartesian ones cross e = 1 freely.

SD type 10

Resolved, determined, without radial velocities. The sum and difference of the angles do not change under the flip (ω, Ω) → (ω + 180°, Ω + 180°) that astrometry cannot tell, so both solutions fall on the same point.

ParametersQuantity
p1ln a
p2, p3s (cos, sin)(ω + Ω)
p4, p5t (cos, sin)(ω − Ω)
p6, p7(1/P) (cos, sin) λ

SN type 20

Resolved, determined, with radial velocities. The velocities give the sign of z and so tell the two solutions apart, so Ω stands alone.

ParametersQuantity
p1ln a
p2, p3s (cos, sin)(ω + Ω)
p4, p5t (cos, sin) Ω
p6, p7(1/P) (cos, sin) λ

SD-EA type 11

Not resolved, seen by Gaia without radial velocities, or only in the astrometry of an outer companion. The data see the reflex motion of the central body, whose size is a⋆ sin i, not a nor the masses apart.

ParametersQuantity
p1ln(a⋆ sin i)
p2, p3s (cos, sin)(ω + Ω)
p4, p5t (cos, sin)(ω − Ω)
p6, p7(1/P) (cos, sin) λ

SN-EA type 21

Not resolved, seen by Gaia and by radial velocities.

ParametersQuantity
p1ln(a⋆ sin i)
p2, p3s (cos, sin)(ω + Ω)
p4, p5t (cos, sin) Ω
p6, p7(1/P) (cos, sin) λ

SEP-EA type 31

Not resolved, no Gaia, seen by the velocities of the central body. They measure a⋆ sin i but neither i nor Ω, so the angles are kept separate and Ω turns freely without moving what is measured.

ParametersQuantity
p1ln(a⋆ sin i)
p2, p3s (cos, sin) ω
p4, p5t (cos, sin) Ω
p6, p7(1/P) (cos, sin)(λ − Ω)

SEP-ER type 32

Not resolved, no Gaia, seen only by its own relative radial velocities, which measure a sin i.

ParametersQuantity
p1ln(a sin i)
p2, p3s (cos, sin) ω
p4, p5t (cos, sin) Ω
p6, p7(1/P) (cos, sin)(λ − Ω)

The mirror parametrisations apply the same formulas to the mirror image of the orbit, (i, Ω, ω, λ) → (180° − i, −Ω, ω, λ − 2Ω). For a retrograde orbit seen nearly face-on, the defined combination is ω − Ω, so it moves to p2, p3, and the undefined one is carried by t′, which vanishes there. The change has a Jacobian of 1.

SD′ type 110

As SD, for a retrograde orbit.

ParametersQuantity
p1ln a
p2, p3s (cos, sin)(ω − Ω)
p4, p5t′ (cos, sin)(ω + Ω)
p6, p7(1/P) (cos, sin)(λ − 2Ω)

SN′ type 120

As SN, for a retrograde orbit.

ParametersQuantity
p1ln a
p2, p3s (cos, sin)(ω − Ω)
p4, p5t′ (cos, sin)(−Ω)
p6, p7(1/P) (cos, sin)(λ − 2Ω)

SD′-EA type 111

As SD-EA, for a retrograde orbit.

ParametersQuantity
p1ln(a⋆ sin i)
p2, p3s (cos, sin)(ω − Ω)
p4, p5t′ (cos, sin)(ω + Ω)
p6, p7(1/P) (cos, sin)(λ − 2Ω)

SN′-EA type 121

As SN-EA, for a retrograde orbit.

ParametersQuantity
p1ln(a⋆ sin i)
p2, p3s (cos, sin)(ω − Ω)
p4, p5t′ (cos, sin)(−Ω)
p6, p7(1/P) (cos, sin)(λ − 2Ω)

The Cartesian parametrisations use the position and velocity of the companion relative to the central body at the reference epoch T0, along the axes of the conventions. A short arc measures them almost directly, whereas the elements are very curved functions of them, and whether the orbit is bound is read on its energy, with nothing singular at e = 1. They differ only by p7, with σ = G(m0 + … + mk) the mass of the orbit and r the distance at T0.

Cart-σ type 40

Resolved, on a partial arc, with other orbits in the same case. With several such orbits, the masses add up along the hierarchy, and σ keeps each of them away from the poorly measured z.

ParametersQuantity
p1, p2, p3x, y, z (au)
p4, p5, p6vx, vy, vz (au/day)
p7ln σ

Cart-g type 50

Resolved, on a partial arc, the only orbit in this case. The arc measures the acceleration σ/r3. With ln σ, the data would set ln σ − 3 ln r, a curved ridge when z is poorly measured (arcs around the apastron), straight with this parameter.

ParametersQuantity
p1, p2, p3x, y, z (au)
p4, p5, p6vx, vy, vz (au/day)
p7ln(σ/r3)

Former type 0

The parametrisation of Oracle before the automatic choice, and that of the runs made before it, Former in Prepare. It is kept for an orbit not resolved and unbound at the start, where no polar parametrisation applies. Its angles are those of SN with radial velocities and of SD without, and λ is the true longitude ν + ω + Ω at T0.

ParametersQuantity
p1ln q
p2, p3e (cos, sin)(ω + Ω)
p4, p5sin(i/2) (cos, sin) Ω with radial velocities
sin(i/2) (cos, sin)(ω − Ω) without
p6, p7(1/Pq) (cos, sin) λ, with Pq = 2π √(q3/σ)

Conventions

  • Axes. x points north, y toward increasing right ascension, and z toward the observer.
  • Units. Dates in MJD (JD − 2400000.5), angles in degrees, distances in au, sky positions in mas, velocities in km/s, masses in Mjup or Msun as chosen.
  • Longitude of the node. Because z points toward the observer, Ω in Oracle equals Ω of most catalogs (Gaia, radial-velocity orbits, orvara) plus 180°. Add 180° before comparing.
  • Without radial velocities, (Ω, ω) and (Ω + 180°, ω + 180°) fit the astrometry equally well, and both solutions are kept. The choice is made for each orbit on its own, so with several orbits what joins two of them, like their mutual inclination, takes two values for the same sky (ΔΩ and ΔΩ + 180°). Analyze shows them both under Branch › Both.

Parameter file format in progress

All the settings of a run are in one TOML file with named keys and explicit units. The order of the keys does not matter. It stays in the folder of the run, with the measurements it uses and the results, so that every run can be reproduced.

[fit]
method = "lm+mcmc"
variables = "universal"
parametrisation = "automatic"
reference_epoch = 57936.0   # MJD
precision = 7
threads = 8
models = 50000

[data.relative_astrometry]
file = "astrometry_rel.csv"
format = "seppa"

[data.absolute_rv]
file = "rv.csv"
offset_guess = 0            # km/s, first guess
jitter = true
jitter_guess = 0.01         # km/s, first guess

[system]
central_mass = { value = 1.2, unit = "Msun" }
[priors.distance]
law = "fixed"               # relative astrometry alone: the distance is given
value = 19.4
unit = "pc"

[orbits.1]
mass = { value = 10, unit = "Mjup" }
q = 8.4                     # au
e = 0.3
i = 80.0                    # deg
Omega = 30.0                # deg
omega = 90.0                # deg
tp = 55000.0                # MJD

method is "lm+mcmc" (a Levenberg-Marquardt fit first, then the MCMC from its result, the default), "mcmc" (the MCMC starts from the orbits given) or "lm". With variables = "universal", the ranges and the orbits give the periastron distance q (au) instead of a, and there is no period range, since a has no meaning for an unbound orbit. variables = "elliptic", the default of a file that says nothing, runs the former program in elliptic elements, with a and a period range. parametrisation is described above. Each orbit is a table numbered from 1, [orbits.1], [orbits.2]…, the innermost first, the number being the index of its companion in the data files and its place in the coefficients of the priors. The former form, a list of tables [[orbits]] in the order of the file, is still read. models is the number of orbits kept after convergence, the sample of the results, 50 000 by default. Each chain keeps at most one orbit every 100 iterations, nearly independent of the one before, so 50 000 give as many independent samples, plenty for the distributions and their tails. The chains usually converge in minutes, and collecting the orbits takes most of the run, in proportion to their number. The prior of the unbound orbits, [priors.unbound], is described in Bound or unbound. A note in [fit] says why the run was made. It is shown again in Follow.

The data files of each type are named in its own table, by their place from the parameter file, and stay next to it. Several files of one type go in a list, file = ["naco.csv", "sphere.csv"], and are read as one, in that order. The Prepare page reads your data files, writes this file for you and checks it.

Data files format in progress

The data are in CSV files (values separated by commas), which any spreadsheet opens and writes, one or more for each type of data, for instance one per instrument. The first line names the columns, with their unit in the name, and the columns can come in any order. Other columns, such as the source, are ignored by the fit, and so are lines starting with #. An instrument column, if there is one, lets Prepare keep or leave out the measurements of each instrument. Files saved by a spreadsheet with semicolons or tabs between the values are read too. Dates are in MJD everywhere (the converter below turns a date into MJD).

What is kept. In Prepare, a line under each file says how many of its measurements are kept, and opens on a choice by companion, by instrument (with an instrument column) and by dates. In the plots, hovering a measurement tells its file and instrument and how far it is from the quick fit, in error bars, and a click leaves it out of the fit (a gray ring) or takes it back. Only what is kept is fitted and copied into the folder of the run. A copy that keeps part of its file starts with a line saying where it comes from and what was left out, so that the run tells what it was made with, and Prepare, opening the run again with oracle serve, reads the whole file from data with the same choice, ready to take a measurement back. Absolute radial velocities from several instruments need an offset each, which the fit does not have yet, so Prepare keeps those of one instrument only for now.

The index column gives the companion of each measurement, 1, 2, … as in the parameter file (the central body has index 0, see the model).

DataColumns
Relative astrometry, in (Dec, RA)index, mjd, dec_mas, ra_mas, ddec_mas, dra_mas, and corr, the correlation coefficient of the two errors (between −1 and 1), if they are correlated
Relative astrometry, in (Sep, PA)index, mjd, sep_mas, pa_deg, dsep_mas, dpa_deg, and corr if the errors are correlated
Absolute radial velocitiesindex, mjd, rv_kms, drv_kms, with index 0 for the central body (absolute velocities of companions are planned)
Relative radial velocities, of each companion with respect to the central bodyindex, mjd, rv_rel_kms, drv_rel_kms
Gaia epoch astrometryindex, mjd, w_mas, dw_mas, psi_deg, fplx, and color for the color term (written by Prepare from the epoch astrometry of Gaia DR4, see below), with index 0 for the central body (Gaia measurements of resolved companions are planned)

In Prepare, each type of data gets a Plot button, and all the measurements kept are fitted together as soon as they are read. This quick fit runs in your browser, in a second or a few. It fits one orbit per companion of the data, the highest index of the relative data kept (one with data of the central body alone), and the + under the table adds one for a companion seen only through the motion of another body. It fits Keplerian orbits in Jacobi coordinates, without jitter, with the priors on the masses of the form (what fixes the masses), so it is a starting point for the L-M of oracle run, not the Oracle fit. Its curves are drawn in the plots, solid between the first and the last measurement and dashed beyond (over the rest of one period for an orbit on the sky, so that you see whether the data cover a whole turn), with the residuals (data minus fit) under them, its orbits fill the first guess, and its offset and jitters the first guesses of the radial velocities and of Gaia, from the scatter of the residuals around the error bars (unless you typed them yourself), and it tells when the data allow other solutions. Its values are in lapis until you type over them, and a box you empty gets the value of the fit back. The reference epoch, the middle of the data, is in lapis too, as soon as the data are read, without the fit. When several orbits fit about as well, Choose another orbit opens a table of them, with only the elements that tell them apart, Δχ², and a small curve of each, drawn as in the plots, when the curves tell them apart. Without radial velocities, each orbit comes with its mirror (Ω + 180°, ω + 180°), which gives the same positions on the sky. The run starts from the one you choose, explores it, and writes both in its results. The plot of Gaia epoch astrometry then shows the central body on the sky around the center of mass, once the parallax and the proper motion are taken out, each transit moved from the fitted position by its residual along the scan, since Gaia measures one direction at a time. With one companion, the orbit closes over one period. With several, the central body circles the inner companions while it moves around the outer ones, so the curve only goes a little beyond the data. Each mass of the first guess has its unit beside it, Msun for a mass above 0.08 Msun, else Mjup, which you may change. The run gives the masses of its results in these units. On simulated systems, the L-M started from it reached the best fit every time.

An example of relative astrometry in (Sep, PA):

index, mjd, sep_mas, pa_deg, dsep_mas, dpa_deg, source
1, 55912.5, 31.2, 203.4, 2.0, 3.5, NIRC2
1, 56620.0, 33.0, 207.9, 1.5, 2.6, SPHERE

Date to MJD

=

It works both ways, from the date or from the MJD. The day may carry a fraction (1.5 is noon on the 1st). Gregorian calendar, MJD = JD − 2400000.5.

Example systems

Two made-up systems to try Oracle. Their data were computed from the true orbits given here, with error bars like those of published measurements (each measurement its own, dates grouped in observing seasons) and noise drawn from them, so a fit should find these values again within its uncertainties.

A first fit

A planet of 10 Mjup around a star of 1.2 Msun at 30 pc, seen by imaging at 20 dates over 20 years, about two thirds of its orbit. One file, astrometry_rel.csv, in (Sep, PA), at 4 to 8 mas and 0.2 to 0.5° with NACO until 2014, then 1.5 to 3 mas and 0.08 to 0.2° with SPHERE.

Indexm (Mjup)a (au)eiΩωtp (MJD)P
110100.4050°140°70°5850029 years

In Prepare, drop the file and give a distance of 30 pc in Priors. The quick fit gives a central mass near 1.2 Msun. Relative astrometry alone shows two limits of this kind of data. It weighs only the total mass of the star and the planet, not each one, and it does not tell which way the planet moves along the line of sight, so Ω and ω come out twice, 180° apart.

The parameter file of this example, fit.toml, opens in Prepare (Open a parameter file, then drop the data file), or runs as it is with oracle run fit.toml next to the data file.

Every type of data

A star of 1 Msun at 50 pc with two companions, a brown dwarf close in and a giant planet farther out. Each file lifts a limit of the others.

FileWhat it holdsWhat it brings
astrometry_rel.csvRelative astrometry, 7 dates at 30 to 80 μas for companion 1 (interferometry, GRAVITY), 10 dates at 2 to 5 mas for companion 2 (imaging, SPHERE)The shape and orientation of both orbits, and the masses inside them
rv.csv40 absolute radial velocities of the star (HARPS), at 1 to 3 m/s, with a jitter of 4 m/s that the error bars leave out and the fit findsThe reflex motion of the star along the line of sight, hence the mass of companion 1
rv_rel.csv3 relative radial velocities of companion 2 (CRIRES+), at 0.5 to 1.5 km/sWhich way companion 2 moves along the line of sight, which lifts the ambiguity on Ω and ω
astrometry_gaia.csv70 Gaia transits at 0.04 to 0.09 mas, 35 visits each seen in both fields of viewThe reflex motion of the star on the sky, its parallax and proper motion
fit.tomlThe parameter file, written by Prepare with the first guess of its quick fitOpens in Prepare with the four data files, or runs as it is with oracle run fit.toml

The true orbits, in Jacobi coordinates (companion 2 orbits the center of mass of the star and companion 1).

Indexm (Mjup)a (au)eiΩωtp (MJD)P
14030.3060°110°40°572005.1 years
28200.1075°30°250°5200087 years

The systemic velocity is −12.3 km/s. For Gaia, the parallax is 20 mas, the proper motion (45, −60) mas/yr and the offsets (0.3, −0.2) mas, at MJD 57936.375 (J2017.5). Give this reference epoch to find them as they are. In Prepare, give β = 0 for both companions, which give no light. The parallax factors come from a circular orbit of the Earth, so the Gaia file shows the format but not the real scanning law.

Gaia epoch astrometry

Oracle fits the along-scan measurements w of the star, one per CCD or one per transit. Each line gives the date, w and its uncertainty (mas), the scan angle ψ (0 toward north, 90° toward east), the parallax factor, and the color factor. Prepare writes this file from the epoch astrometry of Gaia DR4 (below).

Fitted with Gaia
Δα*, Δδoffsets at the reference epoch from the Gaia reference point (mas)
μα*, μδproper motion (mas/yr)
ϖparallax (mas); it also sets the distance used for relative astrometry and masses
Δνeffcolor term (optional)
σjitGaia jitter (optional)

Gaia DR4 data in the fit

  1. Download the epoch astrometry of your star from the Gaia archive, one file per star. The name and format of the files of DR4 will be checked at its release, on 2 December 2026. A file holding several stars works too (the pre-release gives 12 in one file), and Prepare then asks which one.
  2. Drop it in the Data box of Prepare, as any data file, compressed (.gz) or not. Nothing is uploaded, the file is read in your browser.
  3. Choose the measurements to keep, in the window that opens (see below). It says at once how many lines the choice gives.
  4. Make astrometry_gaia.csv. It joins the data files of the page, with a line saying where it comes from and how it was made. With oracle serve, Run writes it in the data folder of the system, and in the folder of the run what is kept of it. Otherwise, it comes in the zip of the run, and Download it gives the whole file, to keep in the data folder.

Each time Gaia scans a star (a transit), it measures it on 8 or 9 CCDs. The window decides which measurements are kept, and whether they are averaged per transit.

Measurements kept
As Gaia’s own solutionThe CCDs used by the astrometric solution of Gaia (used_by_agis_al), with their uncertainties, as in the notebook of the ESA for Gaia BH3. The simple choice, which suits an isolated star.
Cleaned as in BinarysThe cleaning of the Gaia epoch astrometry in the code Binarys (C. Babusiaux and collaborators). Binarys is described by Leclerc et al. (2023). The cleaning is not yet in its public version nor in a paper, and is used here with the agreement of its authors. In each transit, the detection CCD and the CCDs more than 5 MAD from the median are left out, and the uncertainties are multiplied by the TUWE (the scatter of the transit, in units of its uncertainties) when it is above 1.1. Transits before the start of DR4, blended transits and transits of odd TUWE are left out. Made for stars polluted by a neighbor.
One line per
Transit (recommended)The CCDs of a transit averaged, weighted by 1/σ², with the uncertainty 1/√Σ(1/σ²). The CCDs of a transit share part of their errors, so a transit counts as one measurement.
CCDEvery measurement on its own.

Two corrections are offered, for some stars only.

  • Perspective acceleration, given the radial velocity of the system (km/s, from spectroscopy, which the Gaia catalog or SIMBAD give for most bright stars) and its parallax (mas, a rounded value is enough, and left empty, the one of the measurements themselves is taken). The model of Gaia divides w by 1 + μr t, with μr the radial proper motion. The effect reaches 0.4 mas for ε Indi and 5 mas for Barnard’s star, but stays below 0.01 mas for most targets (0.0007 mas for Gaia BH3).
  • Parallax zero point, the bias ϖGaia − ϖtrue in mas, published with the catalog for each star (a few hundredths of a mas, depending on its magnitude, color and position). It is removed from the measurements, so that the fitted parallax is the true one. Its relative effect on the parallax is the bias over the parallax, about 0.1 % at 50 mas and 1 % at 7 mas, and about three times that on the masses.

For Gaia BH3 in the pre-release of DR4, 63 of its 77 transits are kept either way, from 558 CCDs as Gaia’s own solution and 549 cleaned as in Binarys.

Things to know

  • Masses. Gaia alone, or Gaia with absolute radial velocities but no relative astrometry, does not separate the masses, so give a prior on one mass, for example that of the central body (why).
  • Photocenter. Gaia measures the photocenter. For each companion, give β, its fraction of the flux in the G band (0 for a dark companion). β is fixed, not fitted.
  • Parallax zero point. The bias of Gaia parallaxes (a few tens of µas) cannot be fitted, as it is fully degenerate with ϖ, so it is given when the file is made (above). The sign convention of the DR4 column will be checked at the release of DR4.

Output files

A full description of the results file (header lines, then one line per model, with the columns depending on the data types and options) is to be written.

Angles are written in radians, a in au, P in days. With Gaia data, the Gaia parameters follow the orbital columns, and the flux fractions β are written in the header.

Reading the results

  • Eccentricity is slightly overestimated. An eccentricity is the length of a vector, (e cos ω, e sin ω), so measurement noise lengthens it more often than it shortens it. Noisy data give a larger e than the true one, all the more as e is small compared with its uncertainty (Lucy & Sweeney 1971). A small e with a posterior that reaches 0 is compatible with a circular orbit. On simulated systems with e = 0.3, the true value fell below the 68% interval in about a third of the runs and above it in less than a tenth.
  • Masses close to zero. Masses are kept positive. When the data barely constrain a mass (for example the outer companion of a hierarchical system with relative astrometry only), its posterior is cut at 0 and its median is pushed up, so read its upper limit rather than its median.
  • Mass scale. Without relative astrometry or relative radial velocities, the data do not fix the mass scale, and a run without a prior on the masses is refused (why). Give a prior on the central mass, or fix it.

Reference frames on the sky

The orbits can be seen from the central body or around the barycenter, the center of mass of the whole system. The same orbits look different in the two frames, and with several companions each frame shows its own kind of wobble.

From the central body. This is what relative astrometry and relative radial velocities measure, so the data are shown as they are. The central body stays at the origin. An outer companion is seen from a central body that itself goes around the inner companions, so its orbit wobbles with the inner ones. In Jacobi coordinates, companion k goes around the center of mass of the bodies 0 to k − 1, and the central body moves around that point.

Around the barycenter. Every body, the central one included, moves around the center of mass of the system. The outermost companion goes around the center of mass of all the other bodies, which goes the opposite way around the barycenter, so its orbit is a plain Keplerian ellipse, without wobble. The wobble moves to the inner bodies instead. An inner pair drifts as a whole under the outer orbits, so:

  • an inner companion does not come back to its starting point after one of its periods, since its pair has moved meanwhile. Its turn is drawn centered on the middle of its data, so that its two ends, where the gap is, fall at the edges of the time it was measured;
  • an inner orbit takes part of the uncertainty of the outer ones. From the central body, the orbit of an inner companion is what relative astrometry measures, and every drawn orbit lies on it. Around the barycenter, it is also moved by its pair, whose place depends on the outer orbits and on the masses, so it spreads as much as they are uncertain;
  • the central body makes loops around its inner companions while it slowly follows the outer ones, and over the years of the data it sits on one side of the barycenter, not around it. With several orbits it is drawn over the time of the Gaia transits (of all the data without Gaia) and 15% of it more on each side, where the loops can still be told apart.

The data around the barycenter. Gaia measures the photocenter, the center of light of the unresolved source, around the barycenter once the proper motion and the parallax are taken out. The photocenter is the central body moved toward each companion k by βk times its position from the central body, so it is drawn in the colors of these bodies blended by their share of the light. With β = 0 for every companion, it is the central body itself. A transit measures one direction only, along the scan, so it is placed where the reference orbit puts the photocenter at its date, moved by its residual along the scan, with its error bar in that direction. A relative position is placed on the central body of the reference at its date, plus the measurement. Both depend on the reference, and they move when it changes.

The drawn orbits and the data. With Gaia, every orbit of the sample has its own offset and proper motion, those of its barycenter, fitted together with the orbit. A larger orbit can be balanced by a slightly different proper motion and fit the transits as well. The transits, however, are placed with the offset, proper motion and parallax of the reference, the solution chosen in Residuals of (the best fit or the L-M solution). To be compared to them, each drawn orbit is moved by

(its offset − the offset of the reference) + (its proper motion − that of the reference) × (t − tref)

in right ascension and declination, where tref is the reference epoch of Gaia. A few points follow:

  • the shift comes from fitted parameters only, never from the data points, so an orbit that does not fit the data still misses them;
  • it moves the barycenter of the orbit, so every body moves with it and the bodies keep their places from one another. The reference itself does not move, and the cross marks its barycenter;
  • it applies in the barycentric frame, in Sky (the three views) and in Time for the positions, whether the data are shown or not. The depth does not change;
  • the difference of parallax is left out, since the file holds the parallax factor along the scan only;
  • it grows with time away from the transits, so an orbit whose period is longer than the time Gaia observed does not quite close;
  • without Gaia there is no offset and no proper motion to compare, so nothing is moved. Relative data say where a companion is from the central body, not where the barycenter is on the sky. Aligning the central bodies would be the frame of the central body again.

The barycentric frame shows the geometry of the system. To judge a fit, look at the data where they are measured: from the central body for the relative data, and in Time along the scan for Gaia.

Why not the other way. A relative position keeps both of its coordinates around the barycenter, and with one companion it only shrinks by m0/(m0 + m). A Gaia transit turned into a position from the central body would grow by (m0 + m)/m, a factor of 100 to 1000 for a planet, error bar included, and with several companions it could not be shared between them, since the central body moves under all of them at once.

The masses. The barycentric frame needs the mass of each body, not only their sum. Without Gaia or absolute radial velocities, nothing measures the place of the barycenter itself. Each orbit gives the total mass inside it. With one companion, how this mass is shared comes from the priors. With several, the outer orbits also give the mass of the outer companions, and the wobble of the inner pair gives its mass ratio, but a poorly covered orbit leaves these masses to the priors. The drawn orbits then spread with the barycenter, so the fit is better judged from the central body (what fixes the masses).

Derived quantities

Analyze computes, for every orbit of the sample, a few quantities from the parameters, in the Derived group: the periastron and apoastron distances, the minimum mass, the mass ratio, the total mass Mj that drives orbit j, the semi-amplitude Kj of the radial velocity of the central body due to orbit j, the angular semi-major axis ajϖ when the parallax is known, the mutual inclination and the period ratio of two successive orbits, and the reduced χ². Each one is written as a formula, shown next to its name, and can be called by that name in a formula of your own.

Added formulas. Any formula of the parameters becomes a quantity of its own, in the Added group of every menu (Add a formula…). It may hold several lines: each line but the last names a step with =, the last gives the value, and # starts a comment. if(condition, a, b) gives a where the condition holds and b elsewhere. nan (not a number) leaves an orbit out of the quantity, as does any value that does not exist, such as the square root of a negative number. It can call the derived quantities and the other added formulas by their name. Two of them are put there at first, the inner edge of a circumbinary disk and the secular resonance of a disk, described below: they can be changed or removed like yours. The added formulas are kept in the browser, so they outlive the page and a restart, and, when the page comes from oracle serve, in ~/.oracle/formulas.json on that computer (or under ORACLE_HOME), so that every browser of the computer finds them. That file is outside the code, so an update of Oracle never touches it. When the two lists differ, the one changed last wins.

Below, Mk = m0 + … + mk is the mass inside orbit k + 1, and orbit k goes around the center of mass of the bodies 0 to k − 1 (Jacobi coordinates).

Inner edge of a circumbinary disk, Rcav,j. The bodies 0 to j − 1 and the body j are taken as a binary of semi-major axis aj and eccentricity ej, and the mean radius of the innermost stable orbits of a disk around it is the fit of Pichardo, Sparke & Aguilar (2008, MNRAS 391, 815, eq. 6):

Rcav,j = 1.93 aj (1 + 1.01 ej0.32) [Mj−1 mj / Mj2]0.043

The last factor is q(1 − q) for the mass ratio q = mj / Mj, so it does not matter which body is the secondary. The fit holds for 0 ≤ e ≤ 0.9 and 0.1 ≤ q ≤ 0.9, to 0.09 a (one standard deviation), for a disk in the plane of the binary. It comes from test particles, with neither pressure nor viscosity, so it is a lower bound: a viscous gas disk can come closer. It means nothing for a planet (q < 0.1).

Secular resonance of a disk, ares,j(j+1). Outside orbit j + 1, a particle of a disk in its plane precesses under the quadrupole of that orbit, faster closer in, while orbit j + 1 itself precesses under the quadrupole of orbit j. The two apsidal precessions are equal at

ares = [ 2 mj+1 Mj3 / (Mj−1 mj Mj+12) × aj+111/2 / aj2 × (2 + 3ej+12)(1 − ej+12)2 / (2 + 3ej2) × 1 / (3 cos2 I − 1) ]2/7

with I the mutual inclination of orbits j and j + 1. It follows from the precession of the particle, (3/8) np μout (aj+1/ap)2 (2 + 3ej+12), and that of the outer orbit, (3/16) nj+1 μin (aj/aj+1)2 (2 + 3ej2)(3 cos2 I − 1) / (1 − ej+12)2, where μin = Mj−1 mj / Mj2, μout = Mj mj+1 / Mj+12 and both mean motions are taken around Mj+1. It assumes:

  • the quadrupole only, a hierarchical system (aj ≪ aj+1 ≪ ares) and a disk in the plane of orbit j + 1;
  • an inner orbit carrying much less angular momentum than the outer one, so that it precesses fast around it and its mean quadrupole is reduced by the factor (3 cos2 I − 1)/2. The term in ej2 sin2 I cos 2ωj is left out: it averages to zero when ωj circulates, not when it librates in Kozai-Lidov cycles;
  • test particles: neither the pressure nor the gravity of the disk, which both change the precessions in a massive gas disk.

When I is between 54.7° and 125.3°, the outer orbit precesses backwards, there is no resonance, and the quantity is left out (not a number), so its histogram holds only the orbits that have one. Near these angles ares grows without bound. Without radial velocities, I has two values for the same sky (conventions): choose Branch › Both in Analyze to count both, or a single branch keeps only one of the two families.

Reproducibility

Prepare draws a random seed and writes it in the parameter file, so running the same parameter file again repeats the run exactly. The seed is also in the log.txt of the run. A parameter file without a seed gets one drawn by the run.

[fit]
seed = 123456789

The same parameter file, data and seed give the same results with the same number of threads.

Your data

The pages of this site read your files in your browser, or through oracle serve on your own computer. Nothing is ever uploaded elsewhere.

Install as an app

This site works offline and can be installed like an application, with its own window and its icon in the Dock or the Start menu. Install it from http://localhost:8765, the address of oracle serve, so that the app finds your runs.

  • Safari (macOS): File › Add to Dock.
  • Chrome, Edge: the install icon at the right of the address bar, or menu › Install Oracle.