dipy logo

Site Navigation

NIPY Community

dipy.reconst.qball

dipy.reconst.qball.cartesian2polar(x=0, y=0, z=0)

Converts cartesian coordinates to polar coordinates

converts a list of cartesian coordinates (x, y, z) to polar coordinates (R, theta, phi).

dipy.reconst.qball.real_sph_harm(m, n, theta, phi)

Compute real spherical harmonics, where the real harmonic Y^m_n is defined to be:

Real(Y^m_n) * sqrt(2) if m > 0 Y^m_n if m == 0 Imag(Y^m_n) * sqrt(2) if m < 0

This may take scalar or array arguments. The inputs will be broadcasted against each other.

Parameters :

- `m` : int |m| <= n

The order of the harmonic.

  • n : int >= 0 The degree of the harmonic.
  • theta : float [0, 2*pi] The azimuthal (longitudinal) coordinate.
  • phi : float [0, pi] The polar (colatitudinal) coordinate.
Returns :

- `y_mn` : real float

The real harmonic Y^m_n sampled at theta and phi.

:See also: :

scipy.special.sph_harm

dipy.reconst.qball.sph_harm_ind_list(sh_order)

Returns the degree (n) and order (m) of all the symmetric spherical harmonics of degree less then or equal it sh_order. The results, m_list and n_list are kx1 arrays, where k depends on sh_order. They can be passed to real_sph_harm.

Parameters :

sh_order : int

even int > 0, max degree to return

Returns :

m_list : array

orders of even spherical harmonics

n_list : array

degrees of even spherical hormonics

See also

real_sph_harm