Saving, sessions, and reproducible workflows#

A result is reproducible when both the retrieved field and the settings that produced it are kept. croak saves results to HDF5 and every setting of an analysis to a TOML session file, which can be replayed without the GUI or turned into an editable Python script. This chapter covers the graphical wizard, which writes those sessions, and the saving and loading functions behind it.

Which page do I need?#

I want to…

Read

use the wizard stage by stage

The wizard GUI

save a result, or several, and load them back

Saving and loading

rerun a saved session headlessly or retarget it at new data

Saving and loading

decide between the GUI and a script

GUI or script interface

Key concepts#

A result file (result.h5) holds the retrieved spectrum, grid, predicted trace and convergence history, optionally with the measured trace, processed quantities, a known truth pulse and uncertainty results. A session file (options.toml) holds the per-stage parameters: loader, preprocessing, retrieval, dispersion and uncertainty. croak replay options.toml reruns a session; croak script options.toml writes the equivalent Python script.

Use croak script options.toml -o replay.py to save the script as UTF-8 Python source. This preserves Unicode text on Windows as well as on Linux and macOS, independently of the system’s default text encoding.

Main entry points#

The experimental workflow follows the sequence from loading to saving, and the session API documents programmatic use.