healpy.sphtfunc.anafast

healpy.sphtfunc.anafast(map1, map2=None, nspec=None, lmax=None, mmax=None, iter=3, alm=False, pol=True, use_weights=False, datapath=None)

Computes the power spectrum of an Healpix map, or the cross-spectrum between two maps if map2 is given. No removal of monopole or dipole is performed.

Parameters:

map1 : float, array-like shape (Npix,) or (3, Npix)

Either an array representing a map, or a sequence of 3 arrays representing I, Q, U maps

map2 : float, array-like shape (Npix,) or (3, Npix)

Either an array representing a map, or a sequence of 3 arrays representing I, Q, U maps

nspec : None or int, optional

The number of spectra to return. If None, returns all, otherwise returns cls[:nspec]

lmax : int, scalar, optional

Maximum l of the power spectrum (default: 3*nside-1)

mmax : int, scalar, optional

Maximum m of the alm (default: lmax)

iter : int, scalar, optional

Number of iteration (default: 3)

alm : bool, scalar, optional

If True, returns both cl and alm, otherwise only cl is returned

pol : bool, optional

If True, assumes input maps are TQU. Output will be TEB cl’s and correlations (input must be 1 or 3 maps). If False, maps are assumed to be described by spin 0 spherical harmonics. (input can be any number of maps) If there is only one input map, it has no effect. Default: True.

datapath : None or str, optional

If given, the directory where to find the weights data.

Returns:

res : array or sequence of arrays

If alm is False, returns cl or a list of cl’s (TT, EE, BB, TE, EB, TB for polarized input map) Otherwise, returns a tuple (cl, alm), where cl is as above and alm is the spherical harmonic transform or a list of almT, almE, almB for polarized input