Skip to content

src/core/relations.js ​

Published relations used to estimate a value a catalogue does not give. No DOM.

Every relation has an entry in RELATIONS with its citation, what it needs and where it holds; the functions return plain numbers (NaN outside the range of validity unless stated) and the gap filler in src/core/sources/fill.js attaches the entry to each estimate so that a page can say what a number came from. Tested in test/relations.test.mjs against test/relations_reference.json (test/make_relations_reference.py: the forecaster package's posterior, astropy constants and units, numpy interpolation of the original table).

Units follow the catalogue code: planet masses and radii in Jupiter units unless a name says Earth, stellar ones in solar units, periods and durations in days, angles in degrees, a in au, K in m/s.

Import: import { … } from './src/core/relations.js' — no DOM, runs in Node and the browser.

RJUP_REARTH ​

js
const RJUP_REARTH

Jupiter in Earth units, from the IAU 2015 nominal values (equatorial radii; GM ratio).

MJUP_MEARTH ​

js
const MJUP_MEARTH

No description in the source.

RELATIONS ​

js
const RELATIONS

No description in the source.

CK17_RMAX_SINGLE ​

js
const CK17_RMAX_SINGLE

Largest radius [Rearth] that Chen & Kipping's relation maps to one mass: the radius at the Jovian / Stellar transition.

radiusFromMassCK17 ​

js
function radiusFromMassCK17(mEarth)

Chen & Kipping (2017) mean radius for a mass, both in Earth units. Returns { value, sigmaLog (intrinsic scatter in log10 R), regime } or null outside 3e-4 Mearth to 0.87 Msun.

massFromRadiusCK17 ​

js
function massFromRadiusCK17(rEarth)
text
The inverse on the Terran and Neptunian branches: the mass [Mearth] whose mean radius is rEarth.
Returns { value, sigmaLog (scatter in log10 M: that of R divided by the slope), regime }, or null where the
relation is not single-valued (rEarth above CK17_RMAX_SINGLE = 11.3: hot Jupiters, brown dwarfs and small stars
share those radii) or below its range.

radiusFromMassOtegi20 ​

js
function radiusFromMassOtegi20(mEarth, rocky = mEarth < 5)

Otegi et al. (2020) eq. 1 and 2, Earth units. rocky picks the branch; by default rocky below 5 Mearth. NaN above 120 Mearth.

massFromRadiusOtegi20 ​

js
function massFromRadiusOtegi20(rEarth, rocky = rEarth < 1.8)

Otegi et al. (2020) inverse fits, Earth units. By default rocky below 1.8 Rearth (where their two populations separate at low mass). NaN when the mass would exceed 120 Mearth.

DWARF_SEQUENCE ​

js
const DWARF_SEQUENCE

Mamajek's mean dwarf sequence, version 2022.04.16: [spectral type, Teff K, log10 L/Lsun, R/Rsun, M/Msun], B9V to M9.5V.

dwarfFromTeff ​

js
function dwarfFromTeff(teff)

A main-sequence star of this effective temperature on the mean dwarf sequence: { rstar, mstar, logL, sptype }. Linear interpolation in log10 Teff (of log R, log M and log L) between the tabulated types; sptype is the nearer one. Returns null outside 2350 to 10700 K.

massFromLogg ​

js
const massFromLogg

Stellar mass [Msun] from log g (cgs) and radius [Rsun].

radiusFromLogg ​

js
const radiusFromLogg

Stellar radius [Rsun] from log g (cgs) and mass [Msun].

loggFromMassRadius ​

js
const loggFromMassRadius

log10 of the surface gravity (cgs) from mass [Msun] and radius [Rsun].

luminosity ​

js
const luminosity

Luminosity [Lsun] from radius [Rsun] and Teff [K] (IAU 2015 nominal solar values).

semiMajorAxis ​

js
const semiMajorAxis

Semi-major axis [au] from the total mass [Msun] and the period [days].

scaledAxis ​

js
const scaledAxis

a/R* from a [au] and R* [Rsun].

radiusRatio ​

js
const radiusRatio

Rp/R* from Rp [Rjup] and R* [Rsun].

transitDepth ​

js
const transitDepth

Transit depth as a fraction, no limb darkening.

insolation ​

js
const insolation

Insolation in units of the Earth's from Teff [K], R* [Rsun] and a [au].

equilibriumTemperature ​

js
const equilibriumTemperature

Equilibrium temperature [K] for Bond albedo A and redistribution factor f (1/4: whole planet, 1/2: day side only).

impactParameter ​

js
const impactParameter

Impact parameter from a/R*, inclination, e and omega [deg].

inclinationFromImpact ​

js
function inclinationFromImpact(ars, b, ecc = 0, omega = 0)

Inclination [deg] that gives impact parameter b; NaN when b is not reachable.

transitDuration ​

js
function transitDuration(per, ars, rprs, b = 0, ecc = 0, omega = 0)
text
First-to-fourth-contact duration [days] (Winn 2010 eq. 14 with the eccentricity factor of eq. 16), from the
period, a/R*, Rp/R*, the impact parameter b and e, omega [deg]. 0 when (1 + k) <= b (no transit).

rvSemiAmplitude ​

js
function rvSemiAmplitude(mp, mstar, per, ecc = 0, inc = 90)
text
RV semi-amplitude [m/s] of the star. mp [Mjup] (true mass with inc, or M sin i with inc = 90), mstar [Msun], per [d], inc [deg].

massFromRvAmplitude ​

js
function massFromRvAmplitude(K, mstar, per, ecc = 0, inc = 90)
text
Planet mass [Mjup] (or M sin i with inc = 90) from K [m/s]: the inverse of rvSemiAmplitude.

planetDensity ​

js
const planetDensity

Mean density [g/cm^3] of a planet of mass [Mjup] and radius [Rjup].

_internals ​

js
const _internals

No description in the source.

MIT licensed · Kyle A. Pearson