This module contains functions and subroutines for the hybrid analytical continuation.
This function evaluates the fit to f0 at and the complex parallel momentum ppar_valC. It requires the fit parameters that will be determined by the subroutine determine_param_fit.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | is |
Index of species for which eval_fit is executed. |
||
integer, | intent(in) | :: | iperp |
Index of perpendicular momentum at which eval_fit is executed. |
||
double complex, | intent(in) | :: | ppar_valC |
Complex parallel momentum at which eval_fit is executed. |
This function evaluates the fit to f0 at real pperp_val and complex ppar_val, provided that the one-dimensional fit-parameter array params is fed into the function. This is only used during the fitting. For the evaluation in ALPS, use eval_fit.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | is |
Index of species for which eval_fit is executed. |
||
integer, | intent(in) | :: | n_params |
Total number of fit parameters for a given species. |
||
double precision, | intent(in) | :: | params(n_params) |
Array of fit parameters. |
||
double precision, | intent(in) | :: | pperp_val |
Perpendicular momentum. |
||
double complex, | intent(in) | :: | ppar_val |
Complex parallel momentum. |
This function evaluates the orthogonal polynomical fit to f0 at real pperp_val and complex ppar_val, with the one-dimensional polynomical coefficient array fit_coeffs is fed into the function. For the evaluation in ALPS, use eval_fit. kgk: should this be .gt. or .ge. ?
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | is |
Index of species for which eval_fit is executed. |
||
integer, | intent(in) | :: | iperp |
Index of perpendicular momentum at which fit_function_poly is executed. |
||
double complex | :: | ppar_val |
Complex parallel momentum. |
|||
integer | :: | n_poly |
Maximum Polynomial Order |
|||
double precision, | intent(in) | :: | fit_coeffs(0:n_poly) |
Array of polynomial coefficients |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | n |
This is the fitting routine for the hybrid analytic continuation. It determines the full field param_fit.
This subroutine evaluates the General Linear Least Squares fit to the distribution function for component 'is' using the selected polynomial basis functions.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer | :: | is |
Index of species. |
Solves General Linear Least Squares Normal Equation
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
double precision, | intent(in) | :: | AA(0:npar,0:npoly) |
Polynomial Basis |
||
double precision, | intent(in) | :: | BB(0:npar) |
f0(is,iperp,:) |
||
double precision, | intent(out) | :: | coeffs(0:npoly) |
fit coefficients |
||
integer | :: | npoly |
Order for polyhedral representation |
This subroutine evaluates the General Linear Least Squares fit to the distribution function for component 'is' using the selected polynomial basis functions.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer | :: | is |
Index of species. |
This subroutine outputs the fit parameters for iperp=0 to stdout to monitor the fit.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
double precision, | intent(in) | :: | qualitytotal |
Quality of the total fit result. |
This subroutine calculates the transposed Jacobian matrix of the fit function with respect to the fit parameter array.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | is |
Index of species for which determine_JT is executed. |
||
integer, | intent(in) | :: | n_params |
Total number of fit parameters for a given species. |
||
integer, | intent(in) | :: | nJT |
First dimension of matrix JT. |
||
double precision, | intent(out) | :: | JT(nJT,0:upper_limit) |
Transposed Jacobian matrix of the fit function. |
||
double precision, | intent(in) | :: | params(n_params) |
Array of fit parameters. |
||
integer, | intent(in) | :: | iperp |
Index of perpendicular momentum at which JT is evaluated. |
||
integer, | intent(in) | :: | upper_limit |
Upper limit of iperp space (relativistic and non-relativistic). |
||
integer, | intent(in) | :: | ipparbar_lower |
Lower index of parallel momentum (relativistic). |
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. |