mrpro.operators.FourierOp

class mrpro.operators.FourierOp(recon_matrix: SpatialDimension[int], encoding_matrix: SpatialDimension[int], traj: KTrajectory, nufft_oversampling: float = 2.0, nufft_numpoints: int = 6, nufft_kbwidth: float = 2.34)[source]

Bases: LinearOperator

Fourier Operator class.

__init__(recon_matrix: SpatialDimension[int], encoding_matrix: SpatialDimension[int], traj: KTrajectory, nufft_oversampling: float = 2.0, nufft_numpoints: int = 6, nufft_kbwidth: float = 2.34) None[source]

Fourier Operator class.

Parameters:
  • recon_matrix – dimension of the reconstructed image

  • encoding_matrix – dimension of the encoded k-space

  • traj – the k-space trajectories where the frequencies are sampled

  • nufft_oversampling – oversampling used for interpolation in non-uniform FFTs

  • nufft_numpoints – number of neighbors for interpolation in non-uniform FFTs

  • nufft_kbwidth – size of the Kaiser-Bessel kernel interpolation in non-uniform FFTs

adjoint(x)

Adjoint of the operator.

forward(x)

Apply forward operator.

classmethod from_kdata(kdata: KData, recon_shape: SpatialDimension[int] | None = None) Self[source]

Create an instance of FourierOp from kdata with default settings.

Parameters:
  • kdata – k-space data

  • recon_shape – dimension of the reconstructed image. Defaults to KData.header.recon_matrix

operator_norm(initial_value: Tensor, dim: Sequence[int] | None, max_iterations: int = 20, relative_tolerance: float = 0.0001, absolute_tolerance: float = 1e-05, callback: Callable[[Tensor], None] | None = None) Tensor

Power iteration for computing the operator norm of the linear operator.

Parameters:
  • initial_value – initial value to start the iteration; if the initial value contains a zero-vector for one of the considered problems, the function throws an value error.

  • dim – the dimensions of the tensors on which the operator operates. For example, for a matrix-vector multiplication example, a batched matrix tensor with shape (4,30,80,160), input tensors of shape (4,30,160) to be multiplied, and dim = None, it is understood that the matrix representation of the operator corresponds to a block diagonal operator (with 4*30 matrices) and thus the algorithm returns a tensor of shape (1,1,1) containing one single value. In contrast, if for example, dim=(-1,), the algorithm computes a batched operator norm and returns a tensor of shape (4,30,1) corresponding to the operator norms of the respective matrices in the diagonal of the block-diagonal operator (if considered in matrix representation). In any case, the output of the algorithm has the same number of dimensions as the elements of the domain of the considered operator (whose dimensionality is implicitly defined by choosing dim), such that the pointwise multiplication of the operator norm and elements of the domain (to be for example used in a Landweber iteration) is well-defined.

  • max_iterations – maximum number of iterations

  • relative_tolerance – absolute tolerance for the change of the operator-norm at each iteration; if set to zero, the maximal number of iterations is the only stopping criterion used to stop the power iteration

  • absolute_tolerance – absolute tolerance for the change of the operator-norm at each iteration; if set to zero, the maximal number of iterations is the only stopping criterion used to stop the power iteration

  • callback – user-provided function to be called at each iteration

Return type:

an estimaton of the operator norm

property H: LinearOperator

Adjoint operator.

property gram: LinearOperator

Return the gram operator.