healpy.sphtfunc.alm2map¶
- healpy.sphtfunc.alm2map(alms, nside, lmax=None, mmax=None, pixwin=False, fwhm=0.0, sigma=None, pol=True, inplace=False, verbose=True)¶
Computes a Healpix map given the alm.
The alm are given as a complex array. You can specify lmax and mmax, or they will be computed from array size (assuming lmax==mmax).
- Parameters:
- almscomplex, array or sequence of arrays
A complex array or a sequence of complex arrays. Each array must have a size of the form: mmax * (2 * lmax + 1 - mmax) / 2 + lmax + 1
- nsideint, scalar
The nside of the output map.
- lmaxNone or int, scalar, optional
Explicitly define lmax (needed if mmax!=lmax)
- mmaxNone or int, scalar, optional
Explicitly define mmax (needed if mmax!=lmax)
- pixwinbool, optional
Smooth the alm using the pixel window functions. 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]
- polbool, optional
If True, assumes input alms are TEB. Output will be TQU maps. (input must be 1 or 3 alms) If False, apply spin 0 harmonic transform to each alm. (input can be any number of alms) If there is only one input alm, it has no effect. Default: True.
- inplacebool, optional
If True, input alms may be modified by pixel window function and beam smoothing (if alm(s) are complex128 contiguous arrays). Otherwise, input alms are not modified. A copy is made if needed to apply beam smoothing or pixel window.
- Returns:
- mapsarray or list of arrays
A Healpix map in RING scheme at nside or a list of T,Q,U maps (if polarized input)
Notes
Running map2alm then alm2map will not return exactly the same map if the discretized field you construct on the sphere is not band-limited (for example, if you have a map containing pixel-based noise rather than beam-smoothed noise). If you need a band-limited map, you have to start with random numbers in lm space and transform these via alm2map. With such an input, the accuracy of map2alm->alm2map should be quite good, depending on your choices of lmax, mmax and nside (for some typical values, see e.g., section 5.1 of https://arxiv.org/pdf/1010.2084).