get_cartesian_mask

get_cartesian_mask#

snake.core.sampling.factories.get_cartesian_mask(shape, n_frames, rng=None, constant=False, center_prop=0.3, accel=4, accel_axis=0, pdf=VDSpdf.GAUSSIAN)[source]#

Get a cartesian mask for fMRI kspace data.

Parameters:
  • shape (tuple) – shape of fMRI volume.

  • n_frames (int) – number of frames.

  • rng (random state) – Random number generator or seed.

  • constant (bool) – If True, the mask is constant across time.

  • center_prop (float) – 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”.

  • rng

  • accel_axis (int)

Returns:

np.ndarray

Return type:

random mask for an acquisition.