Sampling and scan-loop schedules#

Routines that select the Cartesian views an acquisition encodes, order an already selected set into loop, shot and echo positions, and supply the per-shot orientations and per-repetition RF values of a scan loop. None of them creates events or labels: a sequence function scales the gradients and creates the LIN, PAR, ECO and other labels from their results, as Sampling and ordering describes.

Cartesian sampling support#

Support is returned as zero-based encoded view indices, y or (y, z) on an (n_y, n_z) grid with the k-space centre at (n_y // 2, n_z // 2), in two disjoint lists: calibration views and the other acquired views.

Object

Input

Returns

Purpose

make_cartesian_axis_sampling

Prescription of one axis: matrix size, acceleration, ACS, partial Fourier

(calibration, imaging): encoded view indices y

Lines of a 2D acquisition, or partitions of a stack-of-* acquisition.

make_cartesian_plane_sampling

Prescription of a ky-kz plane, with sampling='lattice' or 'poisson'

(calibration, imaging): encoded view indices (y, z)

Views of a 3D Cartesian acquisition.

count_cartesian_plane_sampling

The arguments of make_cartesian_plane_sampling

(n_calibration, n_imaging)

Number of views of a 3D Cartesian acquisition, without listing them.

calc_cartesian_plane_sampling_probability

The arguments of make_cartesian_plane_sampling, without the seed

(calibration, imaging): probability of each view

Expected views of a 3D Cartesian acquisition; a Poisson-disc draw’s expected density, without drawing it.

Boolean sampling masks#

mask[y, z] is True where the view (y, z) is acquired; np.argwhere(mask) lists those views as encoded indices.

Object

Input

Returns

Purpose

make_caipirinha_mask

Grid shape, ry, rz, shift

Boolean mask, True where acquired

CAIPIRINHA lattice anchored at (0, 0).

make_poisson_disc_mask

Grid shape, acceleration, calibration block, seed

Boolean mask, True where acquired

Variable-density Poisson-disc support.

make_random_mask

Grid shape, acceleration, calibration block, seed

Boolean mask, True where acquired

Uniform-random support.

Traversal ordering#

Object

Input

Returns

Purpose

make_traversal_order

Number of positions, scheme

Permutation of range(n)

Loop order over slices, partitions or selected lines.

Echo-train ordering#

Each routine takes centred coordinates of already selected Cartesian views: an (N, 2) or (N,) array with the k-space centre at the origin, obtained from encoded indices as views - (n_y // 2, n_z // 2). It returns trains, where trains[s][e] is the row index into that array of the view acquired at echo e of shot s. The values are indices, not coordinates. The orderings do not change the support: T2 Shuffling reorders views already selected, for example by the Poisson-disc support of make_cartesian_plane_sampling(..., sampling='poisson').

Object

Input

Returns

Purpose

make_linear_order

Centred coordinates, train length

Indices as [shot][echo]

Raster-order bands, one per echo.

make_centric_order

Centred coordinates, train length

Indices as [shot][echo]

Distance-ranked bands; centre at echo 0 or center_echo.

make_pclo_order

Centred coordinates, train length, centre echo

Indices as [shot][echo]

Rydén PCLO radius bands for identical trains and arbitrary centre echoes; a centre in the second half of the train is not mirrored, so the later echoes read the outer bands.

make_radial_order

Centred coordinates, train length

Indices as [shot][echo]

One angular wedge per shot, centre-out within it.

make_radial_adaptive_order

Centred coordinates, train length

Indices as [shot][echo]

Distance bands folded about center_echo.

make_shuffling_order

Centred coordinates, train length, seed

Indices as [shot][echo]

Random echo positions within raster-contiguous trains (T2 Shuffling).

make_complementary_order

Centred integer coordinates, train length, seed

Indices as [shot][echo]

Echo positions forming a complementary Poisson-disc pattern per echo (Levine et al.).

EPI shot offsets#

The offsets are relative to echo 0 of one shot. The scan loop chooses each shot’s origin (y0, z0); echo e then acquires (y0, z0) + offsets[e].

Object

Input

Returns

Purpose

make_epi_shot_offsets

EPI prescription: echo-train length, scheme, acceleration, segments, CAIPI

(etl, 2) offsets (Δky, Δkz) relative to echo 0

Linear, segmented blipped-CAIPI and zigzag traversals of one shot.

Non-Cartesian orientations#

Object

Input

Returns

Purpose

calc_uniform_angles

Count, angular span

Angles (rad)

Equal spacing over the span.

calc_golden_angles

Count, half or full circle

Angles (rad), modulo 2π

Golden-angle increment.

calc_tiny_golden_angles

Count, tiny-golden index

Angles (rad), modulo 2π

Smaller golden increment.

calc_raga_angles

Count, approximation order

Angles (rad) from a finite equidistant set

Rational approximation of the golden angle.

calc_projection_shell

Views per shell, shots, scheme

Unit directions (n_views, 3) and rotations (n_shots, 3, 3)

3D radial shell and its per-shot rotations.

RF phase and flip schedules#

Object

Input

Returns

Purpose

make_rf_spoiling_schedule

Number of repetitions, increment

Phases (rad), one per repetition

Quadratic RF spoiling.

make_phase_cycling_schedule

Number of repetitions, cycle

Phases (rad), one per repetition

Repeated phase cycle.

make_pd_schedule

Total RF count, echo timing, first/maximum/final angles, signal-tail onset

Refocusing angles (rad), including startup

Relaxation-aware prescribed-signal inverse EPG for PD imaging. Needs the design extra.

make_pd_target_schedule

RF count, echo timing, first angle, angle bound, target-signal plateau, tail and initial decay

Refocusing angles (rad), including startup

Inverse EPG of an explicit PD target signal, fitted by default to Buonincontri et al. Needs the design extra.

make_busse_schedule

Total RF count, minimum/centre/maximum angles, centre echo

Refocusing angles (rad), including startup

Prescribed-PSS envelope inverted with EPG. Needs the design extra.

make_traps_schedule

Echo-train length, target angle

Refocusing angles (rad), one per echo

Stabilising variable refocusing angles.