foscat.alm ========== .. py:module:: foscat.alm Classes ------- .. autoapisummary:: foscat.alm.alm Module Contents --------------- .. py:class:: alm(backend=None, lmax=24, nside=None, limit_range=10000000000.0) .. py:attribute:: lth .. py:attribute:: lph .. py:attribute:: matrix_shift_ph .. py:attribute:: ratio_mm .. py:attribute:: P_mm .. py:attribute:: A .. py:attribute:: B .. py:attribute:: Yp .. py:attribute:: Ym .. py:method:: ring_th(nside) .. py:method:: ring_ph(nside) .. py:method:: shift_ph(nside) .. py:method:: init_Ys(s, nside) .. py:method:: log(v) .. py:method:: double_factorial_log(n) .. py:method:: recurrence_fn(states, inputs) 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] .. py:method:: compute_legendre_m(x, m, lmax, nside) .. py:method:: compute_legendre_m_old2(x, m, lmax, nside) .. py:method:: compute_legendre_m_old(x, m, lmax, nside) .. py:method:: compute_legendre_spin2_m(co_th, si_th, m, lmax) .. py:method:: rfft2fft(val, axis=0) .. py:method:: irfft2fft(val, N, axis=0) .. py:method:: comp_tf(im, nside, realfft=False) .. py:method:: icomp_tf(i_im, nside, realfft=False) .. py:method:: anafast(im, map2=None, nest=False, spin=2, axes=0) 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. .. py:method:: map2alm(im, nest=False) .. py:method:: alm2map(nside, alm) .. py:method:: map2alm_spin(im_Q, im_U, spin=2, nest=False)