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, gal_cut=0, use_pixel_weights=False)

Computes the power spectrum of a Healpix map, or the cross-spectrum between two maps if map2 is given. No removal of monopole or dipole is performed. The input maps must be in ring-ordering.

Parameters
map1float, array-like shape (Npix,) or (3, Npix)

Either an array representing a map, or a sequence of 3 arrays representing I, Q, U maps. Must be in ring ordering.

map2float, array-like shape (Npix,) or (3, Npix)

Either an array representing a map, or a sequence of 3 arrays representing I, Q, U maps. Must be in ring ordering.

nspecNone or int, optional

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

lmaxint, scalar, optional

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

mmaxint, scalar, optional

Maximum m of the alm (default: lmax)

iterint, scalar, optional

Number of iteration (default: 3)

almbool, scalar, optional

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

polbool, 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.

datapathNone or str, optional

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

gal_cutfloat [degrees]

pixels at latitude in [-gal_cut;+gal_cut] are not taken into account

use_pixel_weights: bool, optional

If True, use pixel by pixel weighting, healpy will automatically download the weights, if needed

Returns
resarray 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