NASA - Jet Propulsion Laboratory
    + View the NASA Portal
Search JPL
Jet Propulsion Laboratory Home Earth Solar System Stars & Galaxies Technology
Introduction Background Software Links


create_alm*


This routine generates scalar (and tensor) alm for a temperature (and polarisation) power spectrum read from an input FITS file. The alm are gaussian distributed with a zero mean, and their amplitude is multiplied with the l-space window function of a gaussian beam characterized by its FWHM or an arbitrary circular beam and a pixel window read from an external file.


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


FORMAT

call create_alm*( nsmax, nlmax, nmmax, polar, filename, iseed, fwhm_arcmin, alm_TGC, header [, windowfile, units, beam_file, rng_handle] )


ARGUMENTS

name & dimensionality kind in/out description
       
nsmax I4B IN Nside of the map to be synthetized from the alm created by this routine.
nlmax I4B IN maximum l value to be considered ( MAX=3 x Nside).
nmmax I4B IN maximum m value for the alm.
polar I4B IN equals 1 if polarisation is used, 0 otherwise.
filename(LEN=filenamelen) CHR IN name of FITS file containing power spectrum.
rng_handle planck_rng INOUT structure containing information necessary to continue a random sequence initiated previously with the subroutine rand_init. Consecutive calls to create_alm*can be made after a single invocation to rand_init.
fwhm_arcmin SP/ DP IN FWHM size of the gaussian beam in arcminutes.
alm_TGC(1:p,0:nlmax,0:nmmax) SPC/ DPC OUT complex alm values generated from the powerspectrum in the FITS-file. The first index here runs form 1:1 for temperature only, and 1:3 for polarisation. In the latter case, 1=T, 2=E, 3=B.
header(LEN=80),dimension(60) CHR OUT part of header which will be included in the FITS-file containing the map synthesised from the alm which create_alm generates.
windowfile(LEN=filenamelen) (OPTIONAL) CHR IN full filename specification of the FITS file with the pixel window function.
units(LEN=80),dimension(1:) (OPTIONAL) CHR OUT physical units of the created alm (square-root of the input power spectrum units).
beam_file(LEN=filenamelen) (OPTIONAL) CHR IN name of the file containing the (non necessarily gaussian) window function Bl of a circular beam. If present, it will override the argument fwhm_arcmin.


EXAMPLE:

use alm_tools, only: create_alm
use rngmod, only: rand_init, rng_handle
type(planck_rng) :: rng_handle

call rand_init(rng_handle, -1)
call create_alm(64, 128, 128, 1, 'cl.fits', rng_handle, 5.0, alm_TGC, header, 'data/pixel_window_n0064.fits')

Creates scalar and tensor alm from the power spectrum given in the file `cl.fits'. The map to be created from these alm is assumed to have Nside=64. Cls from the power spectrum are used up to an l value of 128. Corresponding alm values up to l=128 and m=128 are created as gaussian distributed complex numbers. Their are drawn from a sequence of pseudo-random numbers initiated with a seed of -1. The produced alm are convolved with a gaussian beam of FWHM 5 arcminutes and a pixel window read from 'data/pixel_window_n0064.fits'. It is assumed that after the return from this routine, a map is generated from the created alm. For this purpose, header is updated with FITS format information describing the origin and history of these alm.


MODULES & ROUTINES

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

alm_tools
module, containing:
pow2alm_units
routine to convert from power spectrum units to alm units
generate_beam
routine to generate beam window function
pixel_window
routine to read in pixel window function
utilities
module, containing:
die_alloc
routine that prints an error message if there is not enough space for allocation of variables.
fitstools
module, containing:
fits2cl
routine to read a FITS file containing a power spectrum.
read_dbintab
routine to read a FITS-binary file containing the pixel window functions.
head_fits
module, containing:
add_card
routine to add a keyword to a FITS header.
get_card
routine to read a keyword value from FITS header.
merge_headers
routine to merge two FITS headers.
rngmod
module, containing:
rand_gauss
function which returns a gaussian distributed random number.


RELATED ROUTINES

This section lists the routines related to create_alm*


rand_init
subroutine to initiate a random number sequence.
synfast
executable using create_alm* to synthesize CMB maps from a given power spectrum.
alm2map
Routine to transform a set of alm created by create_alm* to a HEALPix map.
alms2fits, dump_alms
Routines to save a set of alm in a FITS file.

Eric Hivon 2010-06-18
Privacy / Copyright
FIRST GOV Contact: NASA Home Page Site Manager:
Webmaster:

CL 03-2650