Utility Functions#

HEALPix fast Fourier transform planning functions#

Function Name

Description

healpix_ifft()

Wrapper function for the Inverse Fast Fourier Transform with spectral folding in the polar regions to mitigate aliasing.

healpix_ifft_numpy()

Computes the Inverse Fast Fourier Transform with spectral folding in the polar regions to mitigate aliasing (NumPy).

healpix_ifft_jax()

Computes the Inverse Fast Fourier Transform with spectral folding in the polar regions to mitigate aliasing (JAX).

healpix_ifft_torch()

Computes the Inverse Fast Fourier Transform with spectral folding in the polar regions to mitigate aliasing (Torch).

healpix_fft()

Wrapper function for the Forward Fast Fourier Transform with spectral back-projection in the polar regions to manually enforce Fourier periodicity.

healpix_fft_numpy()

Computes the Forward Fast Fourier Transform with spectral back-projection in the polar regions (NumPy).

healpix_fft_jax()

Computes the Forward Fast Fourier Transform with spectral back-projection in the polar regions (JAX).

healpix_fft_torch()

Computes the Forward Fast Fourier Transform with spectral back-projection in the polar regions (Torch).

spectral_folding()

Folds higher frequency Fourier coefficients back onto lower frequency coefficients (NumPy).

spectral_folding_jax()

Folds higher frequency Fourier coefficients back onto lower frequency coefficients (JAX).

spectral_folding_torch()

Folds higher frequency Fourier coefficients back onto lower frequency coefficients (Torch).

spectral_periodic_extension()

Extends lower frequency Fourier coefficients onto higher frequency coefficients (NumPy).

spectral_periodic_extension_jax()

Extends lower frequency Fourier coefficients onto higher frequency coefficients (JAX).

spectral_periodic_extension_torch()

Extends lower frequency Fourier coefficients onto higher frequency coefficients (Torch).

Quadrature functions.#

Function Name

Description

quad_weights_transform()

Compute quadrature weights for \(\theta\) and \(\phi\) integration to use in transform for various sampling schemes.

quad_weights()

Compute quadrature weights for \(\theta\) and \(\phi\) integration for various sampling schemes.

quad_weights_hp()

Compute HEALPix quadrature weights for \(\theta\) and \(\phi\) integration.

quad_weights_dh()

Compute DH quadrature weights for \(\theta\) and \(\phi\) integration.

quad_weights_mw()

Compute MW quadrature weights for \(\theta\) and \(\phi\) integration.

quad_weights_mwss()

Compute MWSS quadrature weights for \(\theta\) and \(\phi\) integration.

quad_weight_dh_theta_only()

Compute DH quadrature weight for \(\theta\) integration (only), for given \(\theta\).

quad_weights_mw_theta_only()

Compute MW quadrature weights for \(\theta\) integration (only).

quad_weights_mwss_theta_only()

Compute MWSS quadrature weights for \(\theta\) integration (only).

mw_weights()

Compute MW weights given as a function of index m.

Note

JAX and Torch versions of these functions share an almost identical function trace and are simply accessed by the sub-modules quadrature_jax() and quadrature_torch() respectively.

Periodic resampling functions#

Function Name

Description

periodic_extension()

Perform period extension of MW/MWSS signal on the sphere in harmonic domain, extending \(\theta\) domain from \([0,\pi]\) to \([0,2\pi]\).

periodic_extension_spatial_mwss()

Perform period extension of MWSS signal on the sphere in spatial domain, extending \(\theta\) domain from \([0,\pi]\) to \([0,2\pi]\).

upsample_by_two_mwss()

Upsample MWSS sampled signal on the sphere defined on domain \([0,\pi]\) by a factor of two.

upsample_by_two_mwss_ext()

Upsample an extended MWSS sampled signal on the sphere defined on domain \([0,2\pi]\) by a factor of two.

downsample_by_two_mwss()

Downsample an MWSS sampled signal on the sphere.

unextend()

Unextend MW/MWSS sampled signal from \(\theta\) domain \([0,2\pi]\) to \([0,\pi]\).

mw_to_mwss_phi()

Convert \(\phi\) component of signal on the sphere from MW sampling to MWSS sampling.

mw_to_mwss_theta()

Convert \(\theta\) component of signal on the sphere from MW sampling to MWSS sampling.

mw_to_mwss()

Convert signal on the sphere from MW sampling to MWSS sampling.

Signal generating functions#

Function Name

Description

generate_flm()

Generate a 2D set of random harmonic coefficients.

generate_flmn()

Generate a 3D set of random Wigner coefficients.

Note

JAX and Torch versions of these functions share an almost identical function trace and are simply accessed by the sub-modules resampling_jax() and resampling_torch() respectively.

Rotation functions#

Function Name

Description

rotate_flms()

Euler rotates spherical harmonic coefficients by given angle in zyz convention.

generate_rotate_dls()

Generates an array of all reduced Wigner d-function coefficients for angle beta.