Skip to content

Command line

Installing lunartrace adds a lunartrace command. python -m lunartrace.cli runs the same program from a checkout. It does the same things as the Python calls, on files.

CommandDoesExit status
lunartrace studyCompile a Study; print its digest and the summary line0, or 1 if an argument is refused
lunartrace why FILE PAIRPrint the sentence for a pair0, or 1
lunartrace verify FILERecompute the digest0 if it holds, 1 if not
lunartrace replay FILERecompile from the retained sources and compare0 with REPLAY_MATCH, else 1
lunartrace notebook FILEExport a marimo notebook0, or 1
lunartrace study --site -69.3741,32.32 --event 2023-08-23T12:33Z/12:35Z \
--products LRO/LROC/CDRNAC4 --archive vikram-2026-10-14 \
-o vikram.study.json --sources
sha256:3d75a662ce75f00cd34dd9ba288012ad471c73b1e56ecf0abe36896d0b199dd0
108 products · 2,340 pairs · frontiers 13/56/133/342
saved vikram.study.json

--site takes lat,lon or a registered name such as vikram. --event takes an interval or a basis id. --archive takes a directory or a packaged snapshot name; leave it out to fetch Lunar ODE now. --box dlat,dlon changes the query box. -o writes the file, and --sources also writes vikram.study.sources/. The four frontier sizes are angles, angles+resolution, angles+time and all, in that order.

lunartrace why vikram.study.json pair:002ea7a82e1060f1 --frontier angles
lunartrace verify vikram.study.json
lunartrace replay vikram.study.json

why prints the same sentence as str(study.why(...)). verify prints VERIFIED and the digest, or INTEGRITY_FAIL on standard error. replay needs the <stem>.sources/ directory beside the file, and prints both digests and then REPLAY_MATCH or REPLAY_MISMATCH.

lunartrace notebook vikram.study.json -o vikram_nb.py

Without -o, the notebook is written as <stem>_nb.py beside the file. See Notebook.

Output is UTF-8 on every platform, including Windows, so the sentence for why keeps its Δ and degree signs when you pipe it.