make_cartesian_axis_sampling

make_cartesian_axis_sampling#

pypulseqpp.make_cartesian_axis_sampling()[source]#

Select the acquired views of one Cartesian encoding axis.

The views are the zero-based indices 0 .. n - 1 of the axis, with the k-space centre at index n // 2. With R = acceleration, the undersampled lattice is

\[\{\, i : (i - \lfloor n/2 \rfloor) \bmod R = 0 \,\},\]

so the centre view is acquired for every R. Partial Fourier removes the indices below n - round(partial_fourier * n); the centre and the far edge are retained. The calibration region is the n_acs contiguous views centred on n // 2, fully sampled and clipped by partial Fourier.

The routine applies to any Cartesian encoding axis: the phase-encoding lines of a 2D acquisition, or the partitions of a stack-of-stars, stack-of-spirals or stack-of-blades acquisition.

Parameters:
  • n (int) – Number of views on the axis (the encoding matrix size).

  • acceleration (int, default=1) – Undersampling factor R of the lattice.

  • n_acs (int, default=0) – Number of fully sampled calibration (ACS) views centred on n // 2. Ignored when acceleration is 1.

  • partial_fourier (float, default=1.0) – Fraction of the axis acquired, in (0.5, 1].

Returns:

  • calibration (list of int) – Calibration views, ascending. Empty when acceleration is 1 or n_acs is 0.

  • imaging (list of int) – Lattice views not in calibration, ascending. The two lists are disjoint; the acquired support is their union. Neither list is an acquisition order: the sequence application decides when each view is acquired, and creates its labels.

Raises:

ValueError – If acceleration is below one, n_acs is negative, or partial_fourier is outside (0.5, 1].

See also

make_cartesian_plane_sampling

the same selection over two encoding axes.

make_traversal_order

a loop order over the selected views.

Notes

The two groups are returned separately so that a sequence application can treat them differently, for example by acquiring the calibration views first or marking them with the IMA label. Both lists are in ascending order; sorted(calibration + imaging) is the whole support in ascending order.

Examples

>>> import pypulseqpp as pp
>>> pp.make_cartesian_axis_sampling(8)
([], [0, 1, 2, 3, 4, 5, 6, 7])

Twofold undersampling about the centre view 4, with four calibration views. The imaging views exclude the calibration views:

>>> calibration, imaging = pp.make_cartesian_axis_sampling(8, 2, 4)
>>> calibration
[2, 3, 4, 5]
>>> imaging
[0, 6]

Partial Fourier with fraction 0.75 removes the first two views:

>>> pp.make_cartesian_axis_sampling(8, partial_fourier=0.75)
([], [2, 3, 4, 5, 6, 7])