stack_random#

mrinufft.trajectories.tools.stack_random(trajectory: ndarray[tuple[int, ...], dtype[_ScalarType_co]], dim_size: int, center_prop: float | int = 0.0, accel: float | int = 4, pdf: Literal['uniform', 'gaussian', 'equispaced'] | ndarray[tuple[int, ...], dtype[_ScalarType_co]] = 'uniform', rng: int | Generator | None = None, order: Literal['center-out', 'top-down', 'random'] = 'center-out')[source]#

Stack a 2D trajectory with random location.

Parameters:
  • traj (np.ndarray) – Existing 2D trajectory.

  • dim_size (int) – Size of the k_z dimension

  • center_prop (int or float) – Number of line or proportion of slice to sample in the center of the k-space

  • accel (int) – Undersampling/Acceleration factor

  • pdf (str or np.array) – Probability density function for the remaining samples. “uniform” (default), “gaussian” or np.array

  • rng (random state)

  • order (str) – Order of the lines, “center-out” (default), “random” or “top-down”

Returns:

The 3D trajectory stacked along the \(k_z\) axis.

Return type:

numpy.ndarray

Example using stack_random:#

Trajectory tools

Trajectory tools