Retrieval and numerical methods#

Retrieval adjusts a trial pulse until its predicted trace matches the data. croak poses this as (regularised) nonlinear least squares and offers ten solvers behind one retrieve() call. This chapter covers which solver to use, what the objective is, how gradients are computed, how regularisation and fitted instrument parameters enter, and how to judge convergence.

Which page do I need?#

I want to…

Read

pick a solver, set restarts and stopping criteria

Choosing a solver

know exactly what is minimised and how the trace scale is fitted

Retrieval as nonlinear least squares

understand how COPRA, L-BFGS, LM and CMA-ES work

Retrieval algorithms

see the analytic adjoint and the automatic-differentiation route

Gradients

stabilise a noisy or ill-posed retrieval, or use a measured spectrum

Regularisation

fit the medium thickness, delay zero or smearing width

Fitting the medium thickness and delay-zero

Key concepts#

The trace error \(R\) is the weighted RMS residual after an optimal intensity scale \(\mu\) (one per frequency with R_omega=True). The objective is non-convex, so the result depends on the start: the default warm-lbfgs starts the autodiff L-BFGS solver from a COPRA sweep, and several random restarts are the standard check. The penalty-capable solvers add smoothness and spectral-match penalties by default (reg_spectrum=0.01, reg_amp=0.03); reg_spectrum binds only when a measured spectrum is supplied.

Main entry points#

The algorithm comparison runs the solvers side by side. After a run, continue with interpreting results.