The phantomas.utils package continas utility math functions and definitions used throughout the phantomas library.
This module contains an implementation of the real, antipodally symmetric Spherical Harmonics basis as defined in [R8].
[R8] | Descoteaux, Maxime, Elaine Angelino, Shaun Fitzgibbons, and Rachid Deriche. “Regularized, fast, and robust analytical Q-ball imaging” Magnetic Resonance in Medicine 58, no. 3 (2007): 497-510 |
Computees the Laplace-Beltrami operator matrix.
Parameters : | order : int
|
---|
Returns the Funk-Radon operator matrix.
Parameters : | order : int
|
---|
This class describes a symmetrical spherical function by its spherical hamonics coefficients.
Parameters : | coefficients : array-like, shape (R, )
|
---|
Methods
angular_function(theta, phi) | Returns the values of the spherical harmonics function at given positions specified by colatitude and aximuthal angles. |
set_coefficients(coefficients) | |
spherical_function(x, y, z) | Returns the values of the spherical harmonics function at given |
Returns the values of the spherical harmonics function at given positions specified by colatitude and aximuthal angles.
Parameters : | theta : array-like, shape (K, )
phi : array0-like, shape (K, )
|
---|---|
Returns : | f : array-like, shape (K, )
|
Returns the values of the spherical harmonics function at given positions specified by Cartesian coordinates.
Parameters : | x, y, z : array-like, shape (K, )
|
---|---|
Returns : | f : array-like, shape (K, )
|
Returns the dimension, , of the real, antipodally symmetric spherical harmonics basis for a given truncation order.
Parameters : | order : int
|
---|---|
Returns : | R : int
|
Returns the flattened spherical harmonics index corresponding to degree l and order m.
Parameters : | l : int
m : int
|
---|---|
Returns : | j : int
|
Returns the degree, l, of the spherical harmonic associated to index j.
Parameters : | j : int
|
---|---|
Returns : | l : int
|
Returns the order, m, of the spherical harmonic associated to index j.
Parameters : | j : int
|
---|---|
Returns : | m : int
|
Returns the spherical harmonics observation matrix.
Parameters : | theta : array-like, shape (K, )
phi : array-like, shape (K, )
order : int
|
---|---|
Returns : | H : array-like, shape (K, R)
|
This module implements icosahedron tessellation to provide a (relatively) regular tessellation of the unit sphere.
Computes the (triangular) face areas.
Parameters : | vertices : array-lie, (N, 3)
faces : array-like
|
---|
Computes the (triangular) faces center of mass.
Parameters : | vertices : array-lie, (N, 3)
faces : array-like
|
---|
Constructs a tessellation from a subdivision of an icosahedron.
Parameters : | order : int
compute_face_centers : bool, optional compute_face_areas : bool, optional |
---|---|
Returns : | vertices : array-lie, (N, 3)
faces : array-like
nb_edges : int |
Notes
We have only kept 10 faces out of 20, so as to generate a sphere tessellation adding the antipodal symmetric. Results are cached for future use in the dictionary _tessellations.