Linear operators#
bartorch.linop represents a linear operator \(A\) from a domain of C-order
shape ishape to a codomain of shape oshape, with its adjoint \(A^H\) and its
normal operator \(A^H A\). Operators combine by A @ B (composition), A + B,
A - B, c * A, A ** n, A.H (adjoint), A.T (transpose) and A[key]
(restriction of the codomain); each result is a LinearOperator,
and a composition of BART-backed operators is built as one BART operator.
The MRI encoding operator describes the MRI encoding these operators
implement and Differentiation through reconstruction their autograd behaviour.
Operation |
Result |
|---|---|
|
\(Ax\); |
|
\(A^H y\) |
|
\(A^H A x\), and \(A^H A\) as an operator |
|
\(A A^H\) as an operator |
|
The encoding form an MRI operator was lowered into, or |
MRI encoding operators#
Object |
Transform |
Model |
|---|---|---|
FFT |
Cartesian SENSE, \(A = PFS\), with optional subspace basis and sampled-encode table |
|
NUFFT |
Non-Cartesian SENSE, \(A = W\,\mathrm{NUFFT}\,S\), with optional density weights and subspace basis |
|
Wave-encoded FFT |
Wave-CAIPI and Wave-Shuffling encoding |
|
Any of the above |
Off-resonance correction by time segmentation, \(\sum_l \operatorname{diag}(b_l)\,E\,\operatorname{diag}(c_l)\) |
Operator class#
Object |
Description |
|---|---|
Base class: forward, adjoint and normal applications, operator algebra, and operators defined by Python callbacks |
Elementary operators#
Object |
Description |
|---|---|
Identity on a shape |
|
Zero operator |
|
Pointwise multiplication by a broadcast tensor |
|
Separate real scalings of the real and imaginary parts (real-linear) |
|
Complex conjugation (real-linear) |
|
Real part (real-linear) |
|
Unitary Fourier transform along axes, centred by default |
|
Non-uniform Fourier transform along a trajectory, with optional weights and basis |
|
Multiplication by a tensor followed by summation over axes absent from the codomain |
Matrix, convolution, finite-difference and smoothing operators#
Object |
Description |
|---|---|
Multiplication by a matrix along one axis |
|
Convolution with a fixed kernel |
|
Forward finite differences with circular boundary, stacked on a new leading axis |
|
A smooth image from k-space coefficients under a Sobolev weighting, as NLINV and |
Stacking and block composition#
Object |
Description |
|---|---|
Operators applied to one input, outputs concatenated along an axis |
|
Operators applied to one input, outputs stacked on a new axis |
|
Input split between operators, outputs summed |
|
Block-diagonal operator |
|
Block matrix of operators |
Shape and indexing operators#
Object |
Description |
|---|---|
Same elements under another shape |
|
Exchange of two axes |
|
Permutation of the axes |
|
Reversal along axes |
|
Cyclic shift along one axis |
|
Zero padding |
|
Centred cropping or zero filling |
|
Extraction of a block |
|
Sliding-window (Hankel) embedding along one axis |
|
Sum over axes |
|
Sum over axes divided by the square root of the number of terms |
|
Mean over axes |
|
Repetition along axes |
User-defined operators#
LinearOperator.from_callbacks() builds an operator from Python functions
for the forward, the adjoint and, optionally, the normal; BART calls them
through callbacks, one call into Python per application. A subclass that
defines forward and adjoint in Python is equivalent.
Complete reconstructions with these operators are in Operators and solvers and Radial SENSE reconstruction.