make_centric_order#
- pypulseqpp.make_centric_order()[source]#
Echo-train ordering of Cartesian views in centric order.
The views are ranked by their distance from the origin (the k-space centre), ties broken by polar angle, and the ranking is cut into
train_lengthconsecutive bands ofceil(N / train_length)views. Bandeis acquired at echoe, one view per shot, dealt across the shots in angle order. The first echo of every shot therefore acquires a view near the centre: the conventional centric ordering of segmented gradient-echo and MPRAGE acquisitions.- Parameters:
coords (array_like) – Centred coordinates of the selected views: an
(N, 2)array of(ky, kz)or an(N,)array ofky, relative to the k-space centre, which is the origin. Encoded view indices(y, z)on an(n_y, n_z)grid convert asviews - (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).center_echo (int or None, default=None) – Echo at which the innermost band is acquired, in
[0, train_length).Noneacquires it at echo 0; an integer rotates the band order, which moves the effective echo time without changing the train membership.pad (bool, default=False) – Pad every train to
train_lengthwithNone, so that the position in a train is the echo index. WithFalsetheNoneentries are removed.
- Returns:
trains –
trains[s][e]is the row index intocoordsof the view acquired at echoeof shots. The values are indices, not coordinates; every row ofcoordsappears exactly once. Withpad=True,Nonemarks an echo that acquires no view. Emptycoordsgive[].- Return type:
- Raises:
TypeError – If
coordsis a boolean mask or not numeric.ValueError – If
coordsdoes not have shape(N,)or(N, 2),train_lengthis not a positive integer, orcenter_echois outside[0, train_length).
See also
make_radial_ordercentre-out order within angular wedges.
make_radial_adaptive_orderdistance order folded about a target echo.
Examples
Five centred
kyviews in shots of two echoes:>>> import pypulseqpp as pp >>> views = [-2, -1, 0, 1, 2] >>> trains = pp.make_centric_order(views, 2) >>> trains [[2, 4], [3, 0], [1]] >>> [[views[i] for i in train] for train in trains] [[0, 2], [1, -2], [-1]]
Echo 0 acquires the three views nearest the centre, one per shot, and echo 1 the two outer views. The third shot has no second view.