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
MultiplySumbuilds, and withcoil_batch=0it 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 arrangementNoncartesianSenseuses 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 whenkernelsis set. Several sets of maps are(sets, coils, *spatial), asNoncartesianSensetakes them.image_shape (tuple of int) – Coil-image shape, C order, for instance
(coils, y, x).kernels (bool) – Read
sensitivitiesas k-space kernels, zero-padded to the image grid and transformed a slab at a time, asNoncartesianSensereads 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
fmacover 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, underdeepinv's name.A_adjoint(y, **kwargs)A^H y, underdeepinv's name, recorded for autograd.A_adjoint_A(x, **kwargs)A^H A x, underdeepinv'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^Has an operator.conj()conj(A): conjugate the input, apply, conjugate the output.forward(x[, out])A x, without recording for autograd.gram()A^H Aas 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
HA^H, from BART's own adjoint constructor.TA^T, the adjoint without the conjugation, asconj(A).H.codim_rankHow many axes the codomain has.
codim_shapeThe codomain, under pyxu's name for it; the same as
oshape.codim_sizeHow many elements the codomain holds.
devicedim_rankHow many axes the domain has.
dim_shapeThe domain, under pyxu's name for it; the same as
ishape.dim_sizeHow many elements the domain holds.
ishapeoshape