calc_uniform_angles

calc_uniform_angles#

pypulseqpp.calc_uniform_angles()[source]#

Return equally spaced rotations in the half-open interval [0, span).

Parameters:
  • n (int) – Number of angles.

  • span (float, default=2.0 * np.pi) – Angular range the spokes are spread across, in radians. pi for diametric spokes, 2 * pi (the default) for full-turn arms.

Returns:

Angles (rad), length n, spaced by span / n.

Return type:

numpy.ndarray

Raises:

ValueError – If n is below one, or span is not positive.

Examples

>>> import numpy as np
>>> import pypulseqpp as pp
>>> np.rad2deg(pp.calc_uniform_angles(4))
array([  0.,  90., 180., 270.])

A half-turn span spaces diametric spokes without covering a direction twice:

>>> np.rad2deg(pp.calc_uniform_angles(4, span=np.pi))
array([  0.,  45.,  90., 135.])

See also

calc_golden_angles

uniform in any temporal window instead.