Skip to main content

Module callbacks

Module callbacks 

Source
Expand description

Iteration callbacks for progress, checkpoints, diagnostics, and image output. Hooks that observe or control iterative reconstruction.

Implement crate::callbacks::Callback for custom behavior, or use callbacks such as crate::callbacks::CheckpointEvery, DiagnosticRecorder, and crate::callbacks::StopOnPlateau. Callbacks receive a borrowed crate::callbacks::StepContext and return a crate::callbacks::CallbackAction to continue or stop a run.

Structs§

CheckpointEvery
Writes resumable JSON checkpoints at a fixed iteration frequency.
CsvLogger
Streams universal iteration history to a CSV file.
ProgressLogger
Prints iteration, objective, and elapsed-time progress to standard error.
SaveImageEvery
Periodically writes reconstructed object amplitude and wrapped phase PNG previews.
SavePupilEvery
Periodically writes recovered pupil amplitude and wrapped phase PNG previews.
SaveResidualsEvery
Periodically saves one signed intensity-residual PNG per measured frame.
StepContext
Borrowed reconstruction snapshot supplied to non-finish callback hooks.
StopOnPlateau
Stops after a configured number of iterations without sufficient objective improvement.

Enums§

CallbackAction
Control decision returned by a callback hook.
CallbackHook
Point in runner execution at which a callback can be invoked.

Traits§

Callback
Thread-sendable observer or early-stop controller for reconstruction execution.