cg#
- mrinufft.extras.cg(operator: FourierOperatorBase, kspace_data: NDArray, damp: float = 0.0, x0: NDArray | None = None, x_init: NDArray | None = None, max_iter: int = 10, tol: float = 0.0001, progressbar: bool | tqdm = True, callback: Callable | None = None)[source]#
Perform conjugate gradient (CG) optimization for image reconstruction.
The image is updated using the gradient of a data consistency term, and a velocity vector is used to accelerate convergence.
- Parameters:
$base_params
tol (float) – Tolerance for converge check.
$returns
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.See also
This function is part of the optimizer registry. You can find other registered functions in this registry below:
Key
Function
"lsqr""lsmr""cg"