make_phase_cycling_schedule

make_phase_cycling_schedule#

pypulseqpp.make_phase_cycling_schedule()[source]#

Repeat a phase cycle, reducing each entry modulo 2*pi.

Parameters:
  • length (int) – Number of repetitions to fill.

  • phases (sequence of float, default=(0.0, np.pi)) – The cycle to repeat (rad); (0, pi) by default.

Returns:

Phases (rad) in [0, 2 pi), length length.

Return type:

numpy.ndarray

Raises:

ValueError – If length is negative, or phases is not a non-empty one-dimensional finite sequence.

Examples

>>> import numpy as np
>>> import pypulseqpp as pp
>>> np.rad2deg(pp.make_phase_cycling_schedule(5))
array([  0., 180.,   0., 180.,   0.])
>>> np.rad2deg(pp.make_phase_cycling_schedule(4, (0.0, np.pi / 2)))
array([ 0., 90.,  0., 90.])

See also

make_rf_spoiling_schedule

for spoiled, non-steady-state sequences.