make_traps_schedule

make_traps_schedule#

pypulseqpp.make_traps_schedule()[source]#

Return a variable refocusing flip-angle schedule in radians.

variable=False gives a constant target angle. Otherwise the first refocusing angle is raised above the target, approximately pi / 2 + target / 2 as proposed for pseudo-steady-state stabilisation [1], and the following angles decay towards the target by a factor of two per echo. Flip-angle trains that vary smoothly along the echo train are the subject of TRAPS [2]; this routine implements only the initial stabilising transition.

Parameters:
  • length (int) – Echo train length (>= 1).

  • target_flip_angle (float) – Asymptotic refocusing flip angle (rad), positive.

  • variable (bool, default=True) – Sweep down to the target (default) instead of holding it constant.

Returns:

Refocusing flip angles (rad), length length, approaching target_flip_angle.

Return type:

numpy.ndarray

Raises:

ValueError – If length is negative, or a flip angle is outside the range a refocusing train can use.

Examples

>>> import numpy as np
>>> import pypulseqpp as pp
>>> flips = pp.make_traps_schedule(8, np.deg2rad(120))
>>> np.rad2deg(flips)[[0, -1]].round(1)
array([153. , 120.2])

References