GrogLinearOp#
- class pygrog.interop.GrogLinearOp(op)[source]#
Bases:
objectWrap a pygrog operator as an
mrpro.operators.LinearOperator.Because mrpro is an optional dependency, the class is built lazily on first instantiation so importing this module does not fail when mrpro is absent.
- Parameters:
op (SparseFFT-like) – Any operator with
forward(kspace) -> imageandadjoint(image) -> kspacemethods, plus anatural_shapeattribute whose last axis is the GROG kernel width.- Raises:
ImportError – If
mrprois not installed.
Examples
from pygrog.operator import SparseFFT from pygrog.interop import GrogLinearOp from mrpro.algorithms.optimizers import pgd base = SparseFFT(plan=grog.plan, smaps=smaps) mrpro_op = GrogLinearOp(base) # mrpro_op now consumes/produces standard # ``(*other, n_coils, k2, k1, k0)`` k-space and ``(*other, z, y, x)`` # images, ready for any mrpro algorithm.
Methods
__init__