Skip to content

JavaScript core ​

The science code of the site (src/core): plain ES modules with no DOM, the same files the web pages, the Python package and the MCP server run. Every model is tested in test/ against an independent reference before anything is built on it.

ModuleExportsWhat it is
aavso.js7The AAVSO Exoplanet Watch report that EXOTIC writes for a ground-based light curve (exotic/output_files.py, OutputFiles.aavso and aavso_dicts; exotic/utils.py round_to_2), reproduced character for character so a reduction made here can be submitted to the AAVSO Exoplanet Database the same way.
aliases.js7Period aliases of a planet seen in only a few, widely spaced transits.
astro.js50Positional astronomy for the sky view: time scales, sidereal time, precession and nutation, coordinate changes, refraction, and low-precision positions of the Sun, Moon and planets.
catalog.js16System parameters from a static snapshot of the NASA Exoplanet Archive ps table (every published reference per planet), built by tools/build_catalog.py into public/catalog/.
config.js4Save and load a fit set-up (parameter values, which are free, and their priors) as JSON or YAML.
data.js18Light curve inputs: synthetic generation and text parsing.
derive.js5Derived system parameters, following the rows of Table 7 in Pearson et al.
detrend.js12Photometric detrending: the columns a light curve is decorrelated against, and how they enter the one likelihood (buildProblem in model.js).
ephemeris.js4Transit ephemerides from mid-transit times.
exomoon.js20A planet with a moon in front of a limb-darkened star: geometry, photometry, timing, search.
exportScript.js7Text exports of a session (docs/FORMAT.md): a Python script that reproduces the analysis with the exoplanet-science-lab package (python/, import name esl), a Markdown report, and LaTeX tables.
fitRunner.js1Drives MiniNest in small slices so the host (worker or main thread) can report progress and react to a stop request.
fits.js31FITS reader for the cases photometry needs, with no dependency: primary image HDU, IMAGE extensions, BINTABLE extensions (TESS / Kepler target pixel files, TESScut cutouts), BITPIX 8/16/32/64/-32/-64, BSCALE/BZERO/BLANK, gzip through DecompressionStream, tile-compressed images (fpack, .fz: RICE_1, GZIP_1, GZIP_2, PLIO_1, NOCOMPRESS, quantised floats with every dither method), headers without END, cubes, Bayer frames.
gp.js6Gaussian-process regression with a Gaussian (squared-exponential) kernel, used to remove the part of a light curve's residuals that follows the star's position on the detector (the way Spitzer intrapixel systematics are handled: flux residual as a smooth function of the x and y centroid, optionally of time too).
horizon.js20The apparent horizon of a place from terrain elevation tiles: for every azimuth, the highest elevation angle of the ground along that bearing, with the curvature of the Earth and terrestrial refraction.
hz.js3Habitable zone from the Kopparapu et al.
imexam.js10Image examination, as IRAF's imexam and DS9's analysis tools do it: radial profiles with Gaussian and Moffat fits, curves of growth and half-flux diameters, line cuts, region statistics, a pixel table, the focus across the field (FWHM, ellipticity and elongation direction of every star, mapped and summarised), and a ranking of comparison stars for differential photometry.
k2.js5K2 systematics: the spacecraft rolls about its boresight under solar pressure and the thrusters fire every 6 h to bring it back, so the star slides along an arc on the detector and the flux follows the pixel response.
kepler.js14Keplerian orbit geometry for transit modelling.
lcfits.js2Light curves stored as FITS binary tables: TESS and Kepler/K2 light-curve files (SPOC, TESS-SPOC, QLP, K2SFF, EVEREST, ...) and any table with a time column and a flux column.
lcprep.js24Preparing long space light curves (TESS, Kepler, K2) for transit fitting: quality masks, per-sector stitching, transit-aware detrending, outlier clipping, per-transit cut-outs, the injection test that picks the detrending window, the alias scan of a planet seen in a few transits, and lightkurve's CDPP noise metric.
ldest.js10Limb darkening coefficients from stellar parameters.
ldspec.js9Limb darkening for ANY bandpass from the wavelength-resolved table (src/data/ld_spectral.js, built from PHOENIX specific intensities by tools/build_ld_spectral.py; accuracy measured in test/ldspec.test.mjs).
limbdark.js7Stellar limb darkening laws.
methodsText.js6"How to cite and report": a methods paragraph for a paper, written from a session document (docs/FORMAT.md), and the BibTeX of exactly the references that session's model components need.
missionbands.js5Named wavelength ranges of space-mission spectroscopic modes, for limb darkening (ldspec.js takes any [nm, nm] range) and for the spectroscopic simulator (spectroscopy.js).
model.js29Parameter registry and likelihood construction shared by the UI, the worker and the tests.
nbody.js25Gravitational N-body dynamics for planetary systems: dynamical transit and eclipse times, transit timing variations, radial velocities of the star, sky positions for photodynamical light curves, stability checks (Hill, AMD, MEGNO), and the interpretation of an O - C signal by a grid of simulations over a hypothetical perturber.
nested.js2MiniNest: a compact nested sampler in the spirit of UltraNest's ReactiveNestedSampler (Buchner 2021).
observability.js44Where a target, the Sun and the Moon are in the sky of an observing site, when it is dark, and when a planet transits.
periodogram.js10Periodic signals in transit-timing residuals.
phasecurve.js31Secondary eclipses, phase curves and eclipse mapping.
photometry.js47Photometry on images: background, centroids, aperture and PSF photometry, source detection, tracking stars from frame to frame, and the choice of aperture / sky annulus / comparison star by residual scatter, the way EXOTIC does it (exotic/exotic.py: aperPhot, skybg_phot, fit_centroid and the loop over apers and annuli).
physical.js6Physical-viability priors for multi-planet fits: configurations that cannot exist (crossing orbits, planets inside each other's Hill spheres, too much angular-momentum deficit, a planet inside the star or its own Roche limit, chaotic orbits) get zero prior mass.
priors.js4Prior distributions as unit-cube transforms (the form nested sampling needs): each maps u ~ U(0,1) to a draw from the prior via its inverse CDF.
psd.js21Detrending diagnostics for light-curve residuals: is the noise white, and does the flux follow the star's position on the detector? fft complex FFT of any length (radix-2; Bluestein's chirp-z for the other lengths) periodogramPsd one-sided power spectral density of an evenly sampled series, = scipy.signal.periodogram welchPsd averaged over overlapping windows, = scipy.signal.welch; windows can be kept inside gap-free segments (splitSegments) for space-based series with gaps lombScarglePsd the same quantity for uneven sampling, from periodogram.js's lombScargle whiteNoiseLevel / photonNoiseLevel / photonNoise / scintillation the horizontal lines to compare a PSD with: error bars, CCD-equation noise logBinPsd log-spaced averaging for display and for the fit fitRedNoise P(f) = W + A f^-gamma by least squares on ln P, and the knee where the two terms cross rmsVsBin "rms versus bin size" (time averaging: Pont et al.
pyentry.js8The core as a service: what the Python package (python/esl) calls.
pyshim.js3Host shims for running the core outside a browser or Node: an embedded V8 (PyMiniRacer) or QuickJS has the language but none of the web platform.
relations.js27Published relations used to estimate a value a catalogue does not give.
report.js2The project report: one Markdown document, always in the same order, that gathers an observing project from the target to the result.
rm.js10Rossiter–McLaughlin effect: the radial-velocity anomaly while a planet covers part of a rotating star.
rv.js4Radial velocity of the star from the reflex motion of its planets.
rvsources.js13Radial velocities from public archives: which catalogues hold RV time series that a browser can fetch, how to ask them, and how to read what they return.
session.js9The ESL session: one JSON document that describes an analysis completely (the system, the data, what is free with which priors, the sampler settings) and, once run, its result.
sources/eslcatalog.js1Reader for the ESL catalogue, public/esl-catalog/catalog.json: the NASA Exoplanet Archive and exoplanet.eu merged into one row per planet, with gap-filled estimates and suggested priors, built offline by tools/build_esl_catalog.py (which runs buildTable, systemFromRows and suggestPriors and packs what they return).
sources/eu.js0The Extrasolar Planets Encyclopaedia, exoplanet.eu (snapshot built by tools/build_catalog_eu.py).
sources/fields.js2The common fields every catalogue plug-in maps its columns onto, in ESL units: periods, times and durations in days (times are JD, normally BJD_TDB as the catalogue gives them), depth as a fraction, planet mass and radius in Jupiter units, stellar ones in solar units, a in au, angles in degrees, K in m/s, temperatures in K, distance in pc.
sources/fill.js1Gap filling: estimate what a catalogue row lacks from what it has, with a named relation for every estimate.
sources/index.js15The catalogues the Search and Plan pages read, as plug-ins, and the table built from them.
sources/match.js8Matching the planets of two catalogues.
sources/nea.js0NASA Exoplanet Archive: composite parameters, one row per planet (snapshot built by tools/build_catalog_table.py).
sources/snapshot.js3Reader for the compact catalogue snapshots written by tools/build_catalog_table.py and tools/build_catalog_eu.py: { v, source, table, url, date, nrows, columns: [[name, kind], ...], refs: [[label, url], ...], strs: [...], rows: [[cell, ...], ...] } kind 'q' quantity: cell = value | [value, err1, err2, ref index, lim] (err1 upper, err2 lower and negative, as the archive has them) kind 's' string: cell = index into strs kind 'n': a number or string as is.
sources/toi.js0TESS Objects of Interest, from the NASA Exoplanet Archive's toi table (snapshot built by tools/build_catalog_table.py).
spectroscopy.js33Time-series spectroscopy: spectra per integration in, a transmission or emission spectrum out.
stats.js9Small numerical toolbox: seeded RNG, normal distribution helpers, weighted summaries.
stellar.js3Stellar mass and radius from spectroscopic parameters.
transit.js5Transit light curve for a limb-darkened star.
zip.js9Reading .zip archives in the browser (and Node 18+) without a library and without inflating them whole.

MIT licensed · Kyle A. Pearson