Skip to content

Notebook

A saved Study can be exported as a marimo notebook. The notebook is a plain Python file. It recomputes nothing: it loads the saved Study, which verifies the digest, and shows what is in it.

import lunartrace as lt
study = lt.temporal.study(site="vikram", event="vikram:minute-envelope",
products="LRO/LROC/CDRNAC4", archive="vikram-2026-10-14")
saved = study.save("vikram.study.json")
study.to_notebook("vikram_nb.py", study_path=saved)

If you leave out study_path, the Study is saved beside the notebook as <notebook stem>.study.json first. The notebook refers to the file relative to itself, so keep the two together.

marimo is not a dependency of lunartrace. Install it with pip install marimo, or use the lab extra.

marimo edit vikram_nb.py # interactive
python vikram_nb.py # as a script: prints the digest and the frontier size

As a script it prints the digest, angles frontier: 13 pairs, and the why sentence for the first pair that is off the angles frontier.

CellShows
Loadlt.temporal.load(...), then the digest. A changed byte stops the notebook here.
SummaryThe event basis, the digest and the counts.
FrontierThe angles frontier as a table of Δsun, Δview and Δphase.
WhyThe why sentence for a pair that is off that frontier.

The Study file stays the authority. Editing a cell does not change it.