biosspheres.miscella.harmonicex#

This module has functions for returning the spherical harmonic expansions of selected functions.

Extended summary#

This module has functions for returning the spherical harmonic expansions of selected functions: - The zero function. See function_zero. - The constant function. See function_cte. - Point source function, dirichlet and neumann expansions. See

point_source_coefficients_dirichlet_expansion_azimuthal_symmetry, point_source_coefficients_dirichlet_expansion, point_source_coefficients_neumann_expansion_0j_azimuthal_symmetry, point_source_coefficients_neumann_expansion_0j.

Routine listings#

function_zero function_cte point_source_coefficients_dirichlet_expansion_azimuthal_symmetry point_source_coefficients_dirichlet_expansion point_source_coefficients_neumann_expansion_0j_azimuthal_symmetry point_source_coefficients_neumann_expansion_0j plane_wave_coefficients_dirichlet_expansion_0j plane_wave_coefficients_neumann_expansion_0j

Functions

function_cte(big_l, cte[, azimuthal])

function_zero(big_l[, azimuthal])

plane_wave_coefficients_dirichlet_expansion_0j(...)

plane_wave_coefficients_neumann_expansion_0j(...)

point_source_coefficients_dirichlet_expansion(...)

Returns a numpy array with the coefficients of the spherical harmonic expansion of the Dirichlet trace, on the surface of the sphere of radius 1, of the function 1 / (4 pi sigma_e ||p_0 - r||_2).

point_source_coefficients_dirichlet_expansion_azimuthal_symmetry(...)

Returns a numpy array with the coefficients of the spherical harmonic expansion of the dirichlet trace, on the surface of the sphere of radius 1, of the function 1 / (4 pi sigma_e ||p_0 - r||_2).

point_source_coefficients_neumann_expansion_0j(...)

Returns a numpy array with the coefficients of the spherical harmonic expansion of the Neumann trace, on the surface of the sphere of radius 1, of the function 1 / (4 pi sigma_e ||p_0 - r||_2).

point_source_coefficients_neumann_expansion_0j_azimuthal_symmetry(...)

Returns a numpy array with the coefficients of the spherical harmonic expansion of the Neumann trace, on the surface of the sphere of radius 1, of the function 1 / (4 pi sigma_e ||p_0 - r||_2).

biosspheres.miscella.harmonicex.function_cte(big_l: int, cte: float, azimuthal: bool = True) → ndarray[source]#
Parameters:
  • big_l

  • cte

  • azimuthal

Returns:

function_coefficientes

Return type:

np.ndarray

biosspheres.miscella.harmonicex.point_source_coefficients_dirichlet_expansion(big_l: int, radius: float, p_0: ndarray, sigma_e: float, intensity: float) → ndarray[source]#

Returns a numpy array with the coefficients of the spherical harmonic expansion of the Dirichlet trace, on the surface of the sphere of radius 1, of the function 1 / (4 pi sigma_e ||p_0 - r||_2).

Parameters:
  • big_l (int) – >= 0, max degree.

  • radius (float) – > 0, sphere radius.

  • p_0 (numpy array) – of three floats, position in cartesian coordinates relative to the center of the sphere.

  • sigma_e (float) – > 0 , parameter.

  • intensity (float) – > 0 , parameter.

Returns:

values – Length (big_l+1)**2.

Return type:

numpy array

biosspheres.miscella.harmonicex.point_source_coefficients_dirichlet_expansion_azimuthal_symmetry(big_l: int, radius: float, p_0_0: float, sigma_e: float, intensity: float) → ndarray[source]#

Returns a numpy array with the coefficients of the spherical harmonic expansion of the dirichlet trace, on the surface of the sphere of radius 1, of the function 1 / (4 pi sigma_e ||p_0 - r||_2).

Only works in one half of the z axis.

Parameters:
  • big_l (int) – >= 0, max degree.

  • radius (float) – > 0, sphere radius.

  • p_0_0 (float) – > 0, norm of the position vector of the source.

  • sigma_e (float) – > 0, parameter.

  • intensity (float) – > 0, parameter.

Returns:

values – Length (big_l+1).

Return type:

numpy array

biosspheres.miscella.harmonicex.point_source_coefficients_neumann_expansion_0j(big_l: int, radius: float, p_0: ndarray, sigma_e: float, intensity: float) → ndarray[source]#

Returns a numpy array with the coefficients of the spherical harmonic expansion of the Neumann trace, on the surface of the sphere of radius 1, of the function 1 / (4 pi sigma_e ||p_0 - r||_2).

Parameters:
  • big_l (int) – >= 0, max degree.

  • radius (float) – > 0, sphere radius.

  • p_0 (numpy array) – of three floats, position in cartesian coordinates relative to the center of the sphere.

  • sigma_e (float) – > 0, parameter.

  • intensity (float) – > 0, parameter.

Returns:

values – Length (big_l+1)**2.

Return type:

numpy array

biosspheres.miscella.harmonicex.point_source_coefficients_neumann_expansion_0j_azimuthal_symmetry(big_l: int, radius: float, p_0_0: float, sigma_e: float, intensity: float) → ndarray[source]#

Returns a numpy array with the coefficients of the spherical harmonic expansion of the Neumann trace, on the surface of the sphere of radius 1, of the function 1 / (4 pi sigma_e ||p_0 - r||_2).

Only works in one half of the z axis.

Parameters:
  • big_l (int) – >= 0, max degree.

  • radius (float) – > 0, sphere radius.

  • p_0_0 (float) – > 0, norm of the position vector of the source.

  • sigma_e (float) – > 0, parameter.

  • intensity (float) – > 0, parameter.

Returns:

values – Length (big_l+1).

Return type:

numpy array