pygrappa.mdgrappa¶
Python implementation of multidimensional GRAPPA.
-
pygrappa.mdgrappa.
mdgrappa
(kspace, calib=None, kernel_size=None, coil_axis=-1, lamda=0.01, nnz=None, weights=None, ret_weights=False)[source]¶ GeneRalized Autocalibrating Partially Parallel Acquisitions.
Parameters: - kspace (N-D array) – Measured undersampled complex k-space data. N-1 dimensions hold spatial frequency axes (kx, ky, kz, etc.). 1 dimension holds coil images (coil_axis). The missing entries should have exactly 0.
- calib (N-D array or None, optional) – Fully sampled calibration data. If None, calibration data will be extracted from the largest possible hypercube with origin at the center of k-space.
- kernel_size (tuple or None, optional) – The size of the N-1 dimensional GRAPPA kernels: (kx, ky, …). Default: (5,)*(kspace.ndim-1)
- coil_axis (int, optional) – Dimension holding coil images.
- lamda (float, optional) – Tikhonov regularization constant for kernel calibration.
- nnz (int or None, optional) – Number of nonzero elements in a multidimensional patch required to train/apply a kernel. Default: sqrt(prod(kernel_size)).
- weights (dict, optional) – Maps sampling patterns to trained kernels.
- ret_weights (bool, optional) – Return the trained weights as a dictionary mapping sampling
patterns to kernels. Default is
False
.
Returns: - res (array_like) – k-space data where missing entries have been filled in.
- weights (dict, optional) – Returned if
ret_weights=True
.
Notes
Based on the GRAPPA algorithm described in [1].
All axes (except coil axis) are used for GRAPPA reconstruction.
References
[1] Griswold, Mark A., et al. “Generalized autocalibrating partially parallel acquisitions (GRAPPA).” Magnetic Resonance in Medicine: An Official Journal of the International Society for Magnetic Resonance in Medicine 47.6 (2002): 1202-1210.