healpix_resample.psf.conjugate_gradient#
- healpix_resample.psf.conjugate_gradient(A_mv, b, x0=None, max_iter=200, tol=1e-06, verbose=True, weight=None)[source]#
Solve A x = b with Conjugate Gradient, using only matvec A_mv(v). No autograd (uses torch.no_grad).
A_mv(as built byleast_squares_cg()forPSFResampler) is self-adjoint and positive-definite with respect to the weighted inner product<u, v>_w = sum(u * v * weight)on the HEALPix-cell space (weight = per-cell column-weightDxused to normalizeM), not with respect to the plain Euclidean inner product. Passweightso CG’s own dot products use the inner product the operator is actually SPD in — withweight=None(Euclidean), CG’s classical convergence guarantees do not formally apply to this operator, even though it often still behaves reasonably in practice.- Returns:
x – solution info: dict with residual norms history, iterations