Skip to content
LightCurve
WebsiteApp

Automate

JavaScript API

window.lightcurve: simulate, generate datasets and validate from a script.

Once the page is loaded, window.lightcurve exposes the engine. The command-line tools use it through a headless browser.

Evaluates cases with the interface’s engine and returns one row per case (the columns of Batch mode).

const rows = await window.lightcurve.simulate(
[{ preset: 'iss', date: '2026-10-07T20:00:00Z', 'geometry.mode': 'phase', 'geometry.phase': -40, 'geometry.rangeKm': 600 }],
{ resolution: 320 },
);

Generates labelled light curves (see Synthetic datasets). Returns { samples, confusion, csv: { labels, curves } }.

const { confusion, csv } = await window.lightcurve.dataset({ n: 200, durationS: 600, cadenceS: 2, classes: ['spin', 'tumble'] });

Runs the validation on published magnitudes. Returns { rows, bias, rms, within }.

Member Content
version API version (2)
presets Ids of the catalogue models
defaults() The current simulation state

The calls are gated by the licence: simulate, dataset and validate need the Simulations plan. See Licensing.