lsqr#
- mrinufft.extras.optim.lsqr(operator, kspace_data, damp=0.0, atol=1e-06, btol=1e-06, conlim=100000000.0, max_iter=100, x0=None, x_init=None, callback=None, progressbar=True)[source]#
 Solve a general regularized linear least-squares problem using the LSQR algorithm.
Solves problems of the form .. math:
\arg\min \|A x - b\|_2^2 + \gamma^2 \|x - x0\|_2^2
Stop iterating if:
numerical convergence is reached: \(\|Ax-b\| <= atol \|A\| * \|x\| + btol * \|b\|\)
estimation of the conditioning of the problem diverge:
cond(A)>=conlimMaximum number of iteration reached.
- Parameters:
 $base_params
atol (float, optional) – Stopping tolerance on the absolute error. Default is 1e-6.
btol (float, optional) – Stopping tolerance on the relative error. Default is 1e-6.
conlim (float, optional) – Limit on condition number. Iteration stops if condition exceeds this value. Default is 1e8.
$returns
operator (FourierOperatorBase)
kspace_data (ndarray[tuple[int, ...], dtype[_ScalarType_co]])
damp (float)
max_iter (int)
x_init (ndarray[tuple[int, ...], dtype[_ScalarType_co]] | None)
callback (Callable | None)
progressbar (bool)
References
Note
This function uses
numpyfor all CPU arrays, andcupyfor all on-gpu array. It will convert all its array argument to the respective array library. The outputs will be converted back to the original array module and device.