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.
simulate(cases, options)
Section titled “simulate(cases, options)”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 },);dataset(spec, onProgress)
Section titled “dataset(spec, onProgress)”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'] });validate(onProgress)
Section titled “validate(onProgress)”Runs the validation on published magnitudes. Returns { rows, bias, rms, within }.
Other members
Section titled “Other members”| 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.