bartorch.linop.Coils

bartorch.linop.Coils#

class bartorch.linop.Coils(sensitivities, image_shape, kernels=False, device=None, coil_batch=1, coeffs=1)#

Coil sensitivities, without the transform that usually follows them.

The multiply on its own: an image to coil images, and the conjugate sensitivities summed over the coils on the way back. Held as maps it is what MultiplySum builds, and with coil_batch=0 it is that operator. Held as kernels, or walked a slab at a time, the bank is inflated or fetched a slab at a time and never resident whole, which is the arrangement NoncartesianSense uses and the reason this exists: an encoding whose transform is not a Fourier transform cannot be a SENSE operator, and chaining the coils onto it should not cost the whole bank.

Parameters:
  • sensitivities (tensor) – Coil sensitivities of shape (coils, *image_shape[1:]), or their k-space kernels when kernels is set. Several sets of maps are (sets, coils, *spatial), as NoncartesianSense takes them.

  • image_shape (tuple of int) – Coil-image shape, C order, for instance (coils, y, x).

  • kernels (bool) – Read sensitivities as k-space kernels, zero-padded to the image grid and transformed a slab at a time, as NoncartesianSense reads them.

  • device (device, optional) – Where the operator is built and does its arithmetic; by default where the sensitivities are.

  • coil_batch (int) – Coils applied at once; 0 uses BART’s own fmac over all of them.

  • coeffs (int) – Subspace coefficients the image carries. With more than one the domain is (coeffs, 1, 1, 1, *spatial) and the codomain (coeffs, 1, 1, coils, *spatial): the sensitivities are the same for every coefficient, so nothing about the multiply changes.

Examples

>>> S = Coils(kernels, (coils, y, x), kernels=True)
>>> A = FFT(S.oshape, axes=(-2, -1)) @ S
__init__(sensitivities, image_shape, kernels=False, device=None, coil_batch=1, coeffs=1)#

Methods

A(x, **kwargs)

A x, under deepinv's name.

A_adjoint(y, **kwargs)

A^H y, under deepinv's name, recorded for autograd.

A_adjoint_A(x, **kwargs)

A^H A x, under deepinv's name, recorded for autograd.

A_dagger(y, **kwargs)

The pseudo-inverse, under deepinv's name.

__init__(sensitivities, image_shape[, ...])

adjoint(y[, out])

A^H y, without recording for autograd.

cogram()

A A^H as an operator.

conj()

conj(A): conjugate the input, apply, conjugate the output.

forward(x[, out])

A x, without recording for autograd.

gram()

A^H A as an operator.

normal(x[, out])

A^H A x.

opnorm()

The spectral norm, by BART's power iteration on A^H A.

pinv(y[, damp])

(A^H A + damp I)^-1 A^H y, the damped least-squares solution.

to_nonlinear()

The same operator as a NonlinearOperator.

Attributes

H

A^H, from BART's own adjoint constructor.

T

A^T, the adjoint without the conjugation, as conj(A).H.

codim_rank

How many axes the codomain has.

codim_shape

The codomain, under pyxu's name for it; the same as oshape.

codim_size

How many elements the codomain holds.

device

dim_rank

How many axes the domain has.

dim_shape

The domain, under pyxu's name for it; the same as ishape.

dim_size

How many elements the domain holds.

ishape

oshape