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.
| Module | Exports | What it is |
|---|---|---|
aavso.js | 7 | The 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.js | 7 | Period aliases of a planet seen in only a few, widely spaced transits. |
astro.js | 50 | Positional 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.js | 16 | System 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.js | 4 | Save and load a fit set-up (parameter values, which are free, and their priors) as JSON or YAML. |
data.js | 18 | Light curve inputs: synthetic generation and text parsing. |
derive.js | 5 | Derived system parameters, following the rows of Table 7 in Pearson et al. |
detrend.js | 12 | Photometric detrending: the columns a light curve is decorrelated against, and how they enter the one likelihood (buildProblem in model.js). |
ephemeris.js | 4 | Transit ephemerides from mid-transit times. |
exomoon.js | 20 | A planet with a moon in front of a limb-darkened star: geometry, photometry, timing, search. |
exportScript.js | 7 | Text 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.js | 1 | Drives MiniNest in small slices so the host (worker or main thread) can report progress and react to a stop request. |
fits.js | 31 | FITS 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.js | 6 | Gaussian-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.js | 20 | The 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.js | 3 | Habitable zone from the Kopparapu et al. |
imexam.js | 10 | Image 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.js | 5 | K2 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.js | 14 | Keplerian orbit geometry for transit modelling. |
lcfits.js | 2 | Light 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.js | 24 | Preparing 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.js | 10 | Limb darkening coefficients from stellar parameters. |
ldspec.js | 9 | Limb 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.js | 7 | Stellar limb darkening laws. |
methodsText.js | 6 | "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.js | 5 | Named 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.js | 29 | Parameter registry and likelihood construction shared by the UI, the worker and the tests. |
nbody.js | 25 | Gravitational 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.js | 2 | MiniNest: a compact nested sampler in the spirit of UltraNest's ReactiveNestedSampler (Buchner 2021). |
observability.js | 44 | Where 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.js | 10 | Periodic signals in transit-timing residuals. |
phasecurve.js | 31 | Secondary eclipses, phase curves and eclipse mapping. |
photometry.js | 47 | Photometry 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.js | 6 | Physical-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.js | 4 | Prior 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.js | 21 | Detrending 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.js | 8 | The core as a service: what the Python package (python/esl) calls. |
pyshim.js | 3 | Host 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.js | 27 | Published relations used to estimate a value a catalogue does not give. |
report.js | 2 | The project report: one Markdown document, always in the same order, that gathers an observing project from the target to the result. |
rm.js | 10 | Rossiter–McLaughlin effect: the radial-velocity anomaly while a planet covers part of a rotating star. |
rv.js | 4 | Radial velocity of the star from the reflex motion of its planets. |
rvsources.js | 13 | Radial 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.js | 9 | The 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.js | 1 | Reader 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.js | 0 | The Extrasolar Planets Encyclopaedia, exoplanet.eu (snapshot built by tools/build_catalog_eu.py). |
sources/fields.js | 2 | The 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.js | 1 | Gap filling: estimate what a catalogue row lacks from what it has, with a named relation for every estimate. |
sources/index.js | 15 | The catalogues the Search and Plan pages read, as plug-ins, and the table built from them. |
sources/match.js | 8 | Matching the planets of two catalogues. |
sources/nea.js | 0 | NASA Exoplanet Archive: composite parameters, one row per planet (snapshot built by tools/build_catalog_table.py). |
sources/snapshot.js | 3 | Reader 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.js | 0 | TESS Objects of Interest, from the NASA Exoplanet Archive's toi table (snapshot built by tools/build_catalog_table.py). |
spectroscopy.js | 33 | Time-series spectroscopy: spectra per integration in, a transmission or emission spectrum out. |
stats.js | 9 | Small numerical toolbox: seeded RNG, normal distribution helpers, weighted summaries. |
stellar.js | 3 | Stellar mass and radius from spectroscopic parameters. |
transit.js | 5 | Transit light curve for a limb-darkened star. |
zip.js | 9 | Reading .zip archives in the browser (and Node 18+) without a library and without inflating them whole. |