Module sleplet.harmonic_methods
Methods to perform operations in Fourier space of the sphere or mesh.
Functions
def compute_random_signal(L: int, rng: numpy.random._generator.Generator, *, var_signal: float) ‑> numpy._typing._array_like.NDArray[numpy.complex128]-
Generate a normally distributed random signal of a complex signal with mean
0and variance1.- Args
- -----=
L- The spherical harmonic bandlimit.
rng- The random number generator object.
var_signal- The variance of the signal.
Returns -----= The coefficients of a random signal on the sphere.
def invert_flm_boosted(flm: numpy._typing._array_like.NDArray[numpy.complex128],
L: int,
resolution: int,
*,
reality: bool = False,
spin: int = 0) ‑> numpy._typing._array_like.NDArray[numpy.complex128 | numpy.float64]-
Upsamples the signal and performs the inverse harmonic transform .
- Args
- -----=
flm- The spherical harmonic coefficients.
L- The spherical harmonic bandlimit.
resolution- The output resolution of the field values.
reality- Whether the given spherical signal is real or not.
spin- The value of the spin.
Returns -----= The boosted field value.
def mesh_forward(mesh: Mesh,
u: numpy._typing._array_like.NDArray[numpy.complex128 | numpy.float64]) ‑> numpy._typing._array_like.NDArray[numpy.float64]-
Compute the mesh forward transform from pixel space to Fourier space.
- Args
- -----=
mesh- The given mesh object.
u- The signal field value on the mesh.
Returns -----= The basis functions of the mesh in Fourier space.
def mesh_inverse(mesh: Mesh,
u_i: numpy._typing._array_like.NDArray[numpy.complex128 | numpy.float64]) ‑> numpy._typing._array_like.NDArray[numpy.complex128 | numpy.float64]-
Compute the mesh inverse transform from Fourier space to pixel space.
- Args
- -----=
mesh- The given mesh object.
u_i- The Fourier coefficients on the mesh.
Returns -----= The values on the mesh in pixel space.
def rotate_earth_to_africa(earth_flm: numpy._typing._array_like.NDArray[numpy.complex128 | numpy.float64],
L: int) ‑> numpy._typing._array_like.NDArray[numpy.complex128]-
Rotates the harmonic coefficients of the Earth to a view centred on Africa.
- Args
- -----=
earth_flm- The spherical harmonic coefficients of the Earth.
L- The spherical harmonic bandlimit.
Returns -----= The spherical harmonic coefficients of the Earth centred on Africa.
def rotate_earth_to_south_america(earth_flm: numpy._typing._array_like.NDArray[numpy.complex128 | numpy.float64],
L: int) ‑> numpy._typing._array_like.NDArray[numpy.complex128]-
Rotates the harmonic coefficients of the Earth to a view centred on South America.
- Args
- -----=
earth_flm- The spherical harmonic coefficients of the Earth.
L- The spherical harmonic bandlimit.
Returns -----= The spherical harmonic coefficients of the Earth centred on South America.