This subroutine processes the nonlinear Levenberg-Marquart algorithm and returns the one-dimensional array params at a given iperp. The variable quality is the sum of the squares of all residuals.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | is |
Index of species for which LM_nonlinear_fit is executed. |
||
double precision, | intent(in) | :: | g(0:npar) |
Array of function to be fitted. |
||
integer, | intent(in) | :: | n_params |
Total number of fit parameters for a given species. |
||
integer, | intent(in) | :: | nJT |
First dimension of matrix JT (see determine_JT). |
||
double precision, | intent(inout) | :: | params(n_params) |
Array of fit parameters. |
||
logical, | intent(in) | :: | param_mask(n_params) |
Bit mask for required fit parameters. |
||
integer, | intent(in) | :: | iperp |
Index of perpendicular momentum. |
||
integer, | intent(in) | :: | npar |
Number of steps in parallel momentum |
||
integer, | intent(in) | :: | ipparbar_lower |
Lower index of parallel momentum (relativistic). |
||
double precision, | intent(out) | :: | quality |
Quality of the individual fit result. |