healpy.sphtfunc.synfast(cls, nside, lmax=None, mmax=None, alm=False, pol=True, pixwin=False, fwhm=0.0, sigma=None, new=False, verbose=True)

Create a map(s) from cl(s).

You can choose a random seed using numpy.random.seed(SEEDVALUE) before calling synfast.

clsarray or tuple of array

A cl or a list of cl (either 4 or 6, see synalm())

nsideint, scalar

The nside of the output map(s)

lmaxint, scalar, optional

Maximum l for alm. Default: min of 3*nside-1 or length of the cls - 1

mmaxint, scalar, optional

Maximum m for alm.

almbool, scalar, optional

If True, return also alm(s). Default: False.

polbool, optional

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

pixwinbool, scalar, optional

If True, convolve the alm by the pixel window function. Default: False.

fwhmfloat, scalar, optional

The fwhm of the Gaussian used to smooth the map (applied on alm) [in radians]

sigmafloat, scalar, optional

The sigma of the Gaussian used to smooth the map (applied on alm) [in radians]

newbool, optional

If True, use the new ordering of cl’s, ie by diagonal (e.g. TT, EE, BB, TE, EB, TB or TT, EE, BB, TE if 4 cl as input). If False, use the old ordering, ie by row (e.g. TT, TE, TB, EE, EB, BB or TT, TE, EE, BB if 4 cl as input).

mapsarray or tuple of arrays

The output map (possibly list of maps if polarized input). or, if alm is True, a tuple of (map,alm) (alm possibly a list of alm if polarized input)


We don’t plan to change the default order anymore, that would break old code in a way difficult to debug.