This routine is a wrapper to four other routines that synthesize a HEALPix temperature (and polarisation) map(s), its (their) first derivatives, and optionally its (their) second derivatives. The routines accept both single and double precision arrays for alm, map, der1 and der2. The precision of these arrays should match. All maps produced are RING ordered.

See ''Fortran Facilities'' Appendix for a note on a bug affecting the calculation of polarisation derivatives on past versions of this routine.

Location in HEALPix directory tree: src/f90/mod/alm_tools.F90 


call alm2map_der*( nsmax, nlmax, nmmax, alm, map, der1[, der2] )


name & dimensionality kind in/out description
nsmax I4B IN the Nside value of the map to synthesize.
nlmax I4B IN the maximum l value used for the alm.
nmmax I4B IN the maximum m value used for the alm.
alm(1:p, 0:nlmax, 0:nmmax) SPC/ DPC IN The alm values to make the map from. p is either 1 (temperature only) or 3 (temperature+polarisation).
map(0:12*nsmax**2-1) or (0:12*nsmax**2-1,1:3) SP/ DP OUT temperature map T(p) or temperature + polarisation maps T(p), Q(p), U(p) to be synthesized.
der1(0:12*nsmax**2-1, 1:2*p) SP/ DP OUT contains on output the first derivatives of T: $\left({\partial T}/{\partial \theta}, {\partial T}/{\partial \phi}/\sin\theta \right)
$ or the interleaved derivatives of T, Q, and U: $\left({\partial T}/{\partial
\theta}, {\partial Q}/{\partial \theta}, {\partial U}/{\partial \theta};\right. $ $\left.{\partial T}/{\partial \phi}/\sin\theta, \ldots \right)
der2(0:12*nsmax**2-1,1:3*p), OPTIONAL SP/ DP OUT If this optional matrix is passed with this rank, it will contain on output the second derivatives $\left({\partial^2 T}/{\partial \theta^2}, {\partial^2 T}/{\partial
\theta\partial\phi}/\sin\theta,\right. $ $\left.{\partial^2 T}/{\partial \phi^2}/\sin^2\theta \right) $ or $\left({\partial^2 T}/{\partial \theta^2}, {\partial^2 Q}/{\partial \theta^2},
{\partial^2 Q}/{\partial \theta^2}, \ldots \right) $


use healpix_types
use pix_tools, only : nside2npix
use alm_tools, only : alm2map_der
integer(I4B) :: nside, lmax, mmax, npix, n_plm
real(SP), dimension(:), allocatable :: map
real(SP), dimension(:,:), allocatable :: der1, der2
complex(SPC), dimension(:,:,:), allocatable :: alm
nside=256 ; lmax=512 ; mmax=lmax
allocate(der1(0:npix-1,1:2), der2(0:npix-1,1:3))
call alm2map_der(nside, lmax, mmax, alm, map, der1, der2)
Make temperature maps and its derivatives from the alm passed in alm. The maps have Nside of 256, and are constructed from alm values up to 512 in l and m.


This section lists the modules and routines used by alm2map_der*.

Performs FFT over m for synthesis of the rings.
compute_lam_mm, get_pixel_layout,
gen_lamfac_der, gen_mfac,
gen_recfac, init_rescale, l_min_ylm
Ancillary routines used for $\ {_s}Y_{lm}$ recursion
module, containing:
routine to print error message, when an array can not be allocated properly


This section lists the routines related to alm2map_der*

routine generating maps of temperature and polarisation from their alm
routine generating maps of arbitrary spin from their salm
executable using alm2map_der* to synthesize maps.
routine to generate randomly distributed alm coefficients according to a given power spectrum

Version 3.31, 2017-01-06