foscat.alm#

Classes#

alm

Module Contents#

class foscat.alm.alm(backend=None, lmax=24, nside=None, limit_range=10000000000.0)[source]#
lth#
lph#
matrix_shift_ph#
ratio_mm#
P_mm#
A#
B#
Yp#
Ym#
ring_th(nside)[source]#
ring_ph(nside)[source]#
shift_ph(nside)[source]#
init_Ys(s, nside)[source]#
log(v)[source]#
double_factorial_log(n)[source]#
recurrence_fn(states, inputs)[source]#

Recurrence function for tf.scan. states: un tuple (U_{n-1}, U_{n-2}) de forme [m] inputs: a tuple (a_n(x), b_n) where a_n(x) has shape [m]

compute_legendre_m(x, m, lmax, nside)[source]#
compute_legendre_m_old2(x, m, lmax, nside)[source]#
compute_legendre_m_old(x, m, lmax, nside)[source]#
compute_legendre_spin2_m(co_th, si_th, m, lmax)[source]#
rfft2fft(val, axis=0)[source]#
irfft2fft(val, N, axis=0)[source]#
comp_tf(im, nside, realfft=False)[source]#
icomp_tf(i_im, nside, realfft=False)[source]#
anafast(im, map2=None, nest=False, spin=2, axes=0)[source]#

The anafast function computes the L1 and L2 norm power spectra.

Currently, it is not optimized for single-pass computation due to the relatively inefficient computation of (Y_{lm}). Nonetheless, it utilizes TensorFlow and can be integrated into gradient computations.

Input: - im: a vector of size ([N_image, 12 imes ext{Nside}^2]) for scalar data, or of size ([N_image, 2, 12 imes ext{Nside}^2]) for Q,U polar data, or of size ([N_image,3, 12 imes ext{Nside}^2]) for I,Q,U polar data. - map2 (optional): a vector of size ([12 imes ext{Nside}^2]) for scalar data, or of size ([3, 12 imes ext{Nside}^2]) for polar data. If provided, cross power spectra will be computed. - nest=True: alters the ordering of the input maps. - spin=2 for 1/2 spin data as Q and U. Spin=1 for seep fields

Output: -A tensor of size ([l_{ ext{max}} imes (l_{ ext{max}}-1)) formatted as ([6, ldots]), ordered as TT, EE, BB, TE, EB.TBanafast function computes L1 and L2 norm powerspctra.

map2alm(im, nest=False)[source]#
alm2map(nside, alm)[source]#
map2alm_spin(im_Q, im_U, spin=2, nest=False)[source]#