Operators¶
See Architecture → Operators for the model.
Bases: ABC
Abstract linear operator A with an adjoint Aᴴ.
Subclasses implement :meth:_forward and :meth:_adjoint. Declare
in_shape / out_shape (tuples, with None for free axes) to get
automatic shape checking; leave them None to skip it.
H
property
¶
The adjoint operator Aᴴ. A.H.H is A.
__matmul__(other)
¶
(A @ B)(x) == A(B(x)).
adjoint(y)
¶
Apply Aᴴ to y.
dot_test(in_shape=None, out_shape=None, *, n_trials=3, rtol=1e-05, seed=0)
¶
Verify the adjoint via ⟨A x, y⟩ ≈ ⟨x, Aᴴ y⟩ on random complex data.
NumPy-only diagnostic. Provide concrete in_shape / out_shape if
the operator declares free (None) axes.
forward(x)
¶
Apply A to x.
normal(x)
¶
Apply AᴴA to x (override :meth:_normal for a fast path).
Bases: LinearOperator
Wrap base, skipping the public input/output shape validation.
Some operators (e.g. :class:~unimri.operators.fourier.FourierOperator and
:class:~unimri.operators.nufft.NUFFTOperator) declare the shape for a
single image but their _forward/_adjoint also accept a batched
input with a leading axis (e.g. coils) -- that is how
FourierOperator(...) @ SensitivityOperator(maps) becomes a full SENSE
encoding operator. The public :meth:forward/:meth:adjoint/:meth:normal
would reject the batched shape; this wrapper calls the unchecked internals
directly, for use once you know the batching is intentional (e.g. inside a
solver such as :func:unimri.optimization.conjugate_gradient).
Bases: LinearOperator
Centered, unnormalized DFT over image_shape.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
image_shape
|
tuple[int, ...]
|
The (single-instance) image shape, e.g. |
required |
axes
|
tuple[int, ...] | None
|
Which axes to transform, as negative indices. Defaults to the last
|
None
|
Bases: LinearOperator
FINUFFT-backed non-uniform FFT for a fixed trajectory and image shape.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
trajectory
|
Trajectory
|
The k-space sample locations. 2-D or 3-D. |
required |
image_shape
|
tuple[int, ...]
|
Target image grid, in NumPy axis order -- |
required |
eps
|
float
|
FINUFFT relative tolerance. |
_EPS
|
Bases: LinearOperator
Multiply/combine by per-coil sensitivity maps.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
sensitivity
|
Array
|
Complex array of shape |
required |