signal generator#

s2fft.utils.signal_generator.generate_flm(rng: Generator, L: int, L_lower: int = 0, spin: int = 0, reality: bool = False, using_torch: bool = False) ndarray#

Generate a 2D set of random harmonic coefficients.

Note

Real signals are explicitly produced from conjugate symmetry.

Parameters:
  • rng (Generator) – Random number generator.

  • L (int) – Harmonic band-limit.

  • L_lower (int, optional) – Harmonic lower bound. Defaults to 0.

  • spin (int, optional) – Harmonic spin. Defaults to 0.

  • reality (bool, optional) – Reality of signal. Defaults to False.

  • using_torch (bool, optional) – Desired frontend functionality. Defaults to False.

Returns:

Random set of spherical harmonic coefficients.

Return type:

np.ndarray

s2fft.utils.signal_generator.generate_flmn(rng: Generator, L: int, N: int = 1, L_lower: int = 0, reality: bool = False, using_torch: bool = False) ndarray#

Generate a 3D set of random Wigner coefficients.

Note

Real signals are explicitly produced from conjugate symmetry.

Parameters:
  • rng (Generator) – Random number generator.

  • L (int) – Harmonic band-limit.

  • N (int, optional) – Number of Fourier coefficients for tangent plane rotations (i.e. directionality). Defaults to 1.

  • L_lower (int, optional) – Harmonic lower bound. Defaults to 0.

  • reality (bool, optional) – Reality of signal. Defaults to False.

  • using_torch (bool, optional) – Desired frontend functionality. Defaults to False.

Returns:

Random set of Wigner coefficients.

Return type:

np.ndarray