Module sleplet.slepian_methods
Methods to work with Slepian coefficients.
Functions
def choose_slepian_method(L: int,
region: Region) ‑> SlepianFunctions-
Initialise Slepian object depending on input.
Args
L
- The spherical harmonic bandlimit.
region
- The Slepian region.
Raises
ValueError
- Invalid
region_type
, likely cause is invalidmask_name
.
Returns
The given Slepian object.
def compute_s_p_omega(L: int,
slepian: SlepianFunctions) ‑> numpy.ndarray[typing.Any, numpy.dtype[numpy.complex128]]-
Compute S_{p}(\omega) for a given region.
Args
L
- The spherical harmonic bandlimit.
slepian
- The given Slepian object.
Returns
The complex S_{p}(\omega) values.
def slepian_forward(L: int,
slepian: SlepianFunctions,
*,
f: numpy.ndarray[typing.Any, numpy.dtype[numpy.complex128]] | None = None,
flm: numpy.ndarray[typing.Any, numpy.dtype[numpy.complex128 | numpy.float64]] | None = None,
mask: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]] | None = None,
n_coeffs: int | None = None) ‑> numpy.ndarray[typing.Any, numpy.dtype[numpy.complex128]]-
Compute the Slepian forward transform for all coefficients.
Args
L
- The spherical harmonic bandlimit.
slepian
- The given Slepian object.
f
- The field value.
flm
- The spherical harmonic coefficients.
mask
- A boolean mask of the Slepian region.
n_coeffs
- The number of Slepian coefficients to use.
Returns
The Slepian coefficients of the inputs.
def slepian_inverse(f_p: numpy.ndarray[typing.Any, numpy.dtype[numpy.complex128 | numpy.float64]],
L: int,
slepian: SlepianFunctions) ‑> numpy.ndarray[typing.Any, numpy.dtype[numpy.complex128]]-
Compute the Slepian inverse transform up to the Shannon number.
Args
f_p
- The Slepian coefficients.
L
- The spherical harmonic bandlimit.
slepian
- The given Slepian object.
Returns
The values on the sphere in pixel space.
def slepian_mesh_forward(mesh_slepian: MeshSlepian,
*,
u: numpy.ndarray[typing.Any, numpy.dtype[numpy.complex128 | numpy.float64]] | None = None,
u_i: numpy.ndarray[typing.Any, numpy.dtype[numpy.complex128 | numpy.float64]] | None = None,
mask: bool = False,
n_coeffs: int | None = None) ‑> numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]]-
Compute the Slepian forward transform for all coefficients on the mesh.
Args
mesh_slepian
- The Slepian mesh object containing the eigensolutions.
u
- The signal field value on the mesh.
u_i
- The Fourier coefficients of the mesh.
mask
- Whether to use the mask to compute the coefficients.
n_coeffs
- The number of Slepian coefficients to use.
Returns
The Slepian coefficients on the mesh.
def slepian_mesh_inverse(mesh_slepian: MeshSlepian,
f_p: numpy.ndarray[typing.Any, numpy.dtype[numpy.complex128 | numpy.float64]]) ‑> numpy.ndarray[typing.Any, numpy.dtype[numpy.complex128 | numpy.float64]]-
Compute the Slepian inverse transform on the mesh up to the Shannon number.
Args
mesh_slepian
- The Slepian mesh object containing the eigensolutions.
f_p
- The Slepian wavelet coefficients.
Returns
The value of a function on the mesh in pixel space.