get_grappa_caipi_positions#
- mrinufft.trajectories.tools.get_grappa_caipi_positions(img_size: tuple[int, int], grappa_factors: tuple[int, int], caipi_delta: int = 0, acs_region: tuple[int, int] | None = None) ndarray[tuple[int, ...], dtype[_ScalarType_co]] | tuple[ndarray[tuple[int, ...], dtype[_ScalarType_co]], ndarray[tuple[int, ...], dtype[_ScalarType_co]]][source]#
Generate a Cartesian k-space sampling mask for GRAPPA with optional CAIPI shifts.
This function computes the k-space sampling positions for a GRAPPA (GeneRalized Autocalibrating Partial Parallel Acquisition) pattern, optionally incorporating CAIPI (Controlled Aliasing in Parallel Imaging) shifts. The sampling points are distributed over a Cartesian grid based on the specified GRAPPA acceleration factors and image size.
- Parameters:
img_size (array_like of int, shape (2,)) – The size of the k-space grid (number of samples) along each dimension, typically corresponding to the phase-encoding and frequency-encoding directions.
grappa_factors (array_like of int, shape (2,)) – The GRAPPA acceleration factors along each axis. For example, a factor of
[2, 1]means every second line is sampled along the first axis, while every line is sampled along the second axis.caipi_delta (float, optional) – The CAIPI phase shift (in units of k-space fraction) to apply along the second dimension. A nonzero value introduces controlled aliasing between slices or coil elements. Default is
0(no shift).acs_region (array_like of int, shape (2,)) – The size of the Auto-Calibration Signal (ACS) region along each dimension. This region is fully sampled to allow for accurate GRAPPA kernel estimation.
- Returns:
positions (ndarray of shape (N, 2)) – The Cartesian coordinates of the sampled k-space points in 2D plane.
acs_positions (ndarray of shape (M, 2)) – The Cartesian coordinates of the ACS region k-space points in 2D plane.
- Return type:
ndarray[tuple[int, …], dtype[_ScalarType_co]] | tuple[ndarray[tuple[int, …], dtype[_ScalarType_co]], ndarray[tuple[int, …], dtype[_ScalarType_co]]]
Notes
This function merely gives the mask positions, not the entire trajectory.