Web applet and the web contract

Local Flask applet

webapp/ is a single-page Flask + Plotly UI over the runtime, for local exploration only:

pip install -e ".[web]"
./run.sh            # then open http://127.0.0.1:5000

Showcase tables mode: pick a planet, scenario, number of transits and R; get the spectrum with one noisy realization, the template S/N, transit light curves and the slicersim readout diagnostics. Custom planet mode: prefill from a showcase preset, edit the star, planet and atmosphere, run the parametric model; a Derived table reports \(g\), \(H\), \(\mu\) and its source, the temperature clamp, the Vega→AB conversion, the readout used and any residual saturation.

The web contract

Every UI, including the public page on the Lazuli simulators site, drives the model through two small modules so defaults, ranges and messages live in one place:

The Flask endpoints /api/presets, /api/preset and /api/simulate are a dozen lines each on top of these. Notebook 7. A custom planet, end to end walks through the same path in Python.