bartorch.tools.pics#
- bartorch.tools.pics(kspace, sensitivities, *, regularizers=None, l2=None, solver=None, maxiter=None, step=None, admm_rho=None, cg_maxiter=None, traj=None, pattern=None, basis=None, initial=None, psf=None, toeplitz=None, lowmem=False, real=False, eigen_step=False, **extra)#
Parallel-imaging compressed-sensing reconstruction.
- Parameters:
kspace (torch.Tensor) – Under-sampled k-space, C order.
sensitivities (torch.Tensor) – Coil sensitivities, as
ecalib()orcaldir()produce them.regularizers (Regularizer or iterable of Regularizer, optional) –
bartorch.proxterms (-R). Their axes indexkspace’s shape, negative ones counting from the last axis. A settingpicstakes once for every term –randshift,family, aLocallyLowRankblock– has to agree across the terms.l2 (float, optional) – Plain Tikhonov weight (
-r).solver ({'ist', 'fista', 'admm', 'pridu', 'eulermaruyama'}, optional) –
Noneletspicschoose from the regularizers.maxiter (int, optional) – Iterations (
-i).step (float, optional) – Step size (
-s).admm_rho (float, optional) – ADMM penalty (
-u); setting it selects ADMM unlesssolversays otherwise.cg_maxiter (int, optional) – Inner conjugate-gradient steps for ADMM (
-C).traj (tensor, optional) – Non-Cartesian trajectory (
-t), in grid units.pattern (tensor, optional) – Sampling pattern or weights (
-p).basis (tensor, optional) – Subspace basis over frames and coefficients (
-B).initial (tensor, optional) – Warm start (
-W).psf (tensor, optional) – A point spread function computed elsewhere (
--psf_import), which is how a normal operator built outside BART is brought in.toeplitz (bool, optional) –
Falsepasses--no-toeplitz;Noneleaves BART’s default.lowmem (bool) – Hold one set of frequencies of the point spread function at a time (
--lowmem).real (bool) – Constrain the image to be real (
-c).eigen_step (bool) – Scale the step size by the largest eigenvalue (
-e).**extra – Further BART
picsoptions, by name. One that picks dimensions (L,shared_img_dims) takes axes ofkspace.
- Returns:
The reconstructed image.
- Return type:
torch.Tensor
Examples
>>> image = pics(kspace, maps, l2=0.01, maxiter=50) >>> image = pics(kspace, maps, regularizers=prox.Wavelet((-1, -2), 0.005), solver="fista") >>> image = pics(kspace, maps, traj=trajectory, basis=subspace)