Minimization

Minimization is performed with a non-linear Levenberg-Marquardt algorithm thanks to the very robust GNU Scientific Library[1]. As a first step, the algorithm runs a set of parameters excluding rotation angle in order to set good start values and thus, avoiding possible divergence. If [math]\displaystyle{ \sigma_x-\sigma_y \gt 0.01 }[/math] (parameters directly computed in the 2-D Gaussian formula, see above), then another fit is run with the angle parameter. Therefore, the Siril Dynamic PSF provides accurate values for all the fitted parameters.