estimate_r2eff(method=' minfx ' ,
min_algor=' simplex ' ,
c_code=True,
constraints=False,
chi2_jacobian=False,
spin_id=None,
ftol=1e-15,
xtol=1e-15,
maxfev=10000000,
factor=100.0,
verbosity=1)
| source code
|
Estimate r2eff and errors by exponential curve fitting with
scipy.optimize.leastsq or minfx.
THIS IS ONLY FOR TESTING.
scipy.optimize.leastsq is a wrapper around MINPACK's lmdif and lmder
algorithms.
MINPACK is a FORTRAN90 library which solves systems of nonlinear
equations, or carries out the least squares minimization of the residual
of a set of linear or nonlinear equations.
Errors are calculated by taking the square root of the reported
co-variance.
This can be an huge time saving step, when performing model fitting in
R1rho. Errors of R2eff values, are normally estimated by time-consuming
Monte-Carlo simulations.
Initial guess for the starting parameter x0 = [r2eff_est, i0_est], is
by converting the exponential curve to a linear problem. Then solving
initial guess by linear least squares of: ln(Intensity[j]) = ln(i0) -
time[j]* r2eff.
- Parameters:
method (string) - The method to minimise and estimate errors. Options are: 'minfx'
or 'scipy.optimize.leastsq'.
min_algor (string) - The minimisation algorithm
c_code (bool) - If optimise with C code.
constraints (bool) - If constraints should be used.
chi2_jacobian (bool) - If the chi2 Jacobian should be used.
spin_id (str) - The spin identification string.
ftol (float) - The function tolerance for the relative error desired in the sum
of squares, parsed to leastsq.
xtol (float) - The error tolerance for the relative error desired in the
approximate solution, parsed to leastsq.
maxfev (int) - The maximum number of function evaluations, parsed to leastsq.
If zero, then 100*(N+1) is the maximum function calls. N is the
number of elements in x0=[r2eff, i0].
factor (float) - The initial step bound, parsed to leastsq. It determines the
initial step bound (''factor * || diag * x||''). Should be in
the interval (0.1, 100).
verbosity (int) - The amount of information to print. The higher the value, the
greater the verbosity.
|