alm2map_spin*

This routine produces the maps of arbitrary spin $s$ and $-s$ given their alm coefficients. A (complex) map $S$ of spin $s$ is a linear combination of the spin weighted harmonics $\ {_s}Y_{\ell m}$

$\displaystyle {_s}S(p) = \sum_{\ell m} {_s}a_{\ell m}\ \ {_s}Y_{\ell m}(p)$ (3)

for $\ell \ge \vert m\vert, \ell \ge \vert s\vert$, and is such that ${_s}S^* = {_{-s}}S$.
The usual phase convention for the spin weighted harmonics is ${_s}Y_{\ell m}^* = (-1)^{s+m} {_{-s}}Y_{\ell -m}$ and therefore ${_s}a_{\ell m}^* = (-1)^{s+m} {_{-s}}a_{\ell -m}$.

alm2map_spin* expects the alm coefficients to be provided as

$\displaystyle {_{\vert s\vert}}a^{+}_{\ell m}$ $\displaystyle = - ( {_{\vert s\vert}}a_{\ell m} + (-1)^s {_{-\vert s\vert}}a_{\ell m} )/2,$ (4)
$\displaystyle {_{\vert s\vert}}a^{-}_{\ell m}$ $\displaystyle = - ( {_{\vert s\vert}}a_{\ell m} - (-1)^s {_{-\vert s\vert}}a_{\ell m} )/(2i),$ (5)

for $m\ge 0$, knowing that, just as for spin 0 maps, the coefficients for $m<0$ are given by

$\displaystyle {_{\vert s\vert}}a^{+}_{\ell-m}$ $\displaystyle = (-1)^m {_{\vert s\vert}}a^{+*}_{\ell m},$ (6)
$\displaystyle {_{\vert s\vert}}a^{-}_{\ell-m}$ $\displaystyle = (-1)^m {_{\vert s\vert}}a^{-*}_{\ell m}.$ (7)

The two (real) maps produced by alm2map_spin* are defined respectively as

$\displaystyle {_{\vert s\vert}}S^+$ $\displaystyle = ({_{\vert s\vert}}S + {_{-\vert s\vert}}S)/2,$ (8)
$\displaystyle {_{\vert s\vert}}S^-$ $\displaystyle = ({_{\vert s\vert}}S - {_{-\vert s\vert}}S)/(2i).$ (9)

With these definitions, ${_2}a^{+}$, ${_2}a^{-}$, ${_2}S^+$ and ${_2}S^-$ match HEALPix polarization $a^E, a^B, Q$ and $U$ respectively. However, for $s=0$, $\ _{0}a^+_{\ell m} = -a^T_{\ell m}$, $\ _{0}a^-_{\ell m} = 0$, $\ {_0}S^+ = T$, $\ {_0}S^- = 0.$

When dealing only with scalar quantities, like temperature or intensity maps, having a spin $s=0$, it is highly recommended, and much more memory-efficient, to use directly the routine alm2map, rather then setting spin$=0$ in alm2map_spin*.

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


FORMAT

call alm2map_spin*( nsmax, nlmax, nmmax, spin, alm, map[, zbounds=] )


ARGUMENTS

name & dimensionality kind in/out description
       
nsmax I4B IN the $N_{\mathrm{side}}$ value of the map to synthesize.
nlmax I4B IN the maximum $\ell$ value used for the $a_{\ell m}$.
nmmax I4B IN the maximum $m$ value used for the $a_{\ell m}$.
spin I4B IN spin $s$ of the maps to be generated (only its absolute value is relevant).
alm(1:2, 0:nlmax, 0:nmmax) SPC/ DPC IN The ${_{\vert s\vert}}a^+_{\ell m}$ and ${_{\vert s\vert}}a^-_{\ell m}$ values to make the map from.
map(0:12*nsmax**2-1, 1:2) SP/ DP OUT ${_{\vert s\vert}}S^+$ and ${_{\vert s\vert}}S^-$ output maps
zbounds(1:2), OPTIONAL DP IN section of the sphere on which to perform the map synthesis, expressed in terms of $z=\sin(\mathrm{latitude}) =
\cos(\theta).$ If zbounds(1)$<$zbounds(2), it is performed on the strip zbounds(1)$<z<$zbounds(2); if not, it is performed outside the strip zbounds(2)$\le z \le$zbounds(1). If absent, the whole map is processed.


EXAMPLE:

use healpix_types
use pix_tools, only : nside2npix
use alm_tools, only : alm2map_spin
integer(I4B) :: nside, lmax, mmax, npix, spin
real(SP), dimension(:,:), allocatable :: map
complex(SPC), dimension(:,:,:), allocatable :: alm
...
nside=256 ; lmax=512 ; mmax=lmax ; spin=4
npix=nside2npix(nside)
allocate(alm(1:2,0:lmax,0:mmax))
allocate(map(0:npix-1,1:2))
...
call alm2map_spin(nside, lmax, mmax, spin, alm, map)
Make spin-4 maps from the $a_{\ell m}$ passed in alm. The maps have $N_{\mathrm{side}}$ of 256, and are constructed from $a_{\ell m}$ values up to 512 in $\ell$ and $m$.


MODULES & ROUTINES

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

ring_synthesis
Performs FFT over $m$ for synthesis of the rings.
compute_lam_mm, get_pixel_layout,
gen_lamfac_der, gen_mfac, gen_mfac_spin, do_lam_lm_spin,
gen_recfac, gen_recfac_spin, init_rescale, l_min_ylm
Ancillary routines used for $Y_{\ell m}$ recursion
misc_utils
module, containing:
assert_alloc
routine to print error message, when an array can not be allocated properly
Note: Starting with version 3.80, some libsharp routines will be called for any $\vert s\vert$ value.


RELATED ROUTINES

This section lists the routines related to alm2map_spin*

alm2map
routine generating maps of temperature and polarisation from their $a_{\ell m}$
alm2map_der
routine generating maps of temperature and polarisation, and their spatial derivatives, from their $a_{\ell m}$
map2alm_spin
routine performing the inverse transform of alm2map.
create_alm
routine to generate randomly distributed $a_{\ell m}$ coefficients according to a given power spectrum

Version 3.82, 2022-07-28