make_radial_order

make_radial_order#

pypulseqpp.make_radial_order()[source]#

Echo-train ordering of Cartesian views in centre-out radial order.

This orders Cartesian phase-encoding views, the radial view ordering of 3D fast spin echo; it does not concern radial (projection) trajectories. The views are sorted by polar angle about the origin and cut into ceil(N / train_length) angular wedges of train_length views; each wedge is one shot. Within a wedge the views are acquired in order of increasing distance from the origin, so every shot acquires its view nearest the centre at echo 0. This is scheme B (radial wedge reordering) of Buonincontri et al., Fig. 2.

Parameters:
  • coords (array_like) – Centred coordinates of the selected views: an (N, 2) array of (ky, kz) or an (N,) array of ky, relative to the k-space centre, which is the origin. Encoded view indices (y, z) on an (n_y, n_z) grid convert as views - (n_y // 2, n_z // 2). Distances and angles are evaluated in the units supplied. Boolean masks are not accepted.

  • train_length (int) – Echo-train length, at least 1. The number of shots is ceil(N / train_length).

  • pad (bool, default=False) – Pad every train to train_length with None, so that the position in a train is the echo index. With False the None entries are removed.

Returns:

trains – trains[s][e] is the row index into coords of the view acquired at echo e of shot s. The values are indices, not coordinates; every row of coords appears exactly once. With pad=True, None marks an echo that acquires no view. Empty coords give [].

Return type:

list of list of int

Raises:
  • TypeError – If coords is a boolean mask or not numeric.

  • ValueError – If coords does not have shape (N,) or (N, 2), or train_length is not a positive integer.

See also

make_radial_adaptive_order

a target echo other than the first.

Examples

Eight centred views on a 3 x 3 ky-kz grid without its centre, in shots of four. Each shot is a half-plane wedge, acquired from the inner to the outer views:

>>> import pypulseqpp as pp
>>> views = [(-1, -1), (-1, 0), (-1, 1), (0, -1),
...          (0, 1), (1, -1), (1, 0), (1, 1)]
>>> trains = pp.make_radial_order(views, 4)
>>> trains
[[3, 6, 0, 5], [4, 1, 7, 2]]
>>> [[views[i] for i in train] for train in trains]
[[(0, -1), (1, 0), (-1, -1), (1, -1)], [(0, 1), (-1, 0), (1, 1), (-1, 1)]]