make_poisson_disc_mask#
- pypulseqpp.make_poisson_disc_mask()[source]#
Generate a variable-density Poisson-disc Cartesian sampling mask.
mask[y, z]isTruewhen the view(y, z)is acquired. The minimum distance between acquired views grows with the distancerfrom the k-space centre as1 + s r; the slopesis found by bisection so that the realised acceleration matchesaccelwithintol. Views are placed by Bridson’s dart throwing [1]. The algorithm is adapted fromsigpy.mri.samp.poisson.- Parameters:
accel (float) – Target acceleration factor, greater than one.
calib (tuple of int, default=(0, 0)) – Extent
(c_y, c_z)of the fully sampled calibration block: rowsn_y // 2 - c_y // 2ton_y // 2 + (c_y + 1) // 2 - 1, and likewise for columns. It is seeded into the draw, so no other view is placed within the minimum distance of it.seed (int, default=0) – Seed of the random draw. Equal seeds give equal masks.
max_attempts (int, default=30) – Bridson candidate attempts per active point.
tol (float, default=0.1) – Allowed deviation of the realised acceleration from
accel.crop_corner (bool, default=True) – Remove the views whose normalised distance outside the calibration block is at least 1: with no calibration block, the views outside the ellipse inscribed in the grid. The calibration block is kept.
- Returns:
Boolean support mask of shape
shape. It encodes no acquisition order;make_shuffling_order()is an echo ordering, not a support.- Return type:
- Raises:
ValueError – If the acceleration is not greater than one, or the draw cannot reach it within the shape given.
See also
make_cartesian_plane_samplingPoisson-disc support with calibration and partial Fourier, as coordinate lists (
sampling='poisson').
References
Examples
>>> import pypulseqpp as pp >>> mask = pp.make_poisson_disc_mask((24, 24), 3.0, calib=(6, 6), seed=1) >>> mask.dtype, mask.shape (dtype('bool'), (24, 24)) >>> bool(mask[9:15, 9:15].all()) True >>> again = pp.make_poisson_disc_mask((24, 24), 3.0, calib=(6, 6), seed=1) >>> bool((again == mask).all()) True