get_random_loc_1d#
- mrinufft.trajectories.tools.get_random_loc_1d(dim_size: int, center_prop: float | int, accel: float = 4, pdf: Literal['uniform', 'gaussian', 'equispaced'] | ndarray[tuple[int, ...], dtype[_ScalarType_co]] | VDSpdf = 'uniform', rng: int | Generator | None = None, order: Literal['center-out', 'top-down', 'random'] | VDSorder = 'center-out') ndarray[tuple[int, ...], dtype[_ScalarType_co]][source]#
Get slice index at a random position.
- Parameters:
dim_size (int) – Dimension size
center_prop (float or int) – Proportion of center of kspace to continuouly sample
accel (float) – Undersampling/Acceleration factor
pdf (str, optional) – Probability density function for the remaining samples. “gaussian” (default) or “uniform” or np.array
rng (int or np.random.Generator) – random state
order (str) – Order of the lines, “center-out” (default), “random” or “top-down”
- Returns:
np.ndarray
- Return type:
array of size dim_size/accel.