create_alm


This routine generates scalar (and tensor) alm from an input FITS file with a temperature (and polarisation) power spectrum. The alm are convolved with a gaussian beam of given fwhm or an arbitrary circular beam defined by its window function and a pixel window from a given 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] )


ARGUMENTS

name&dimensionality kind in/out description
       
nsmax I4B IN Nside of the map to be created by the alm.
nlmax I4B IN maximum l value to be considered ( MAX = 3×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 filename of FITS-file containing powerspectrum.
iseed I4B INOUT seed for generation of gaussian distributed random numbers to the alm. Set to a negative integer to (re-)initialise the random number generator. On exit iseed will be positive definite.
fwhm_arcmin SP IN fwhm size of the gaussian beam in arcminutes.
alm_TGC(1:p,0:nlmax,0:nmmax) SPC 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:

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

Creates scalar and tensor alm from the powerspectrum given in the file `cl.fits'. The map to be created from these alm is assumed to have Nside = 64. Cls from the powerspectrum are used up to an l value of 128. Corresponding alm values up to l=128 and m=128 are created from a random generator with seed -1. The produced alm are convolved with a gaussian beam of fwhm 5 arcminutes and a pixel window given in the windowfile. It is assumed that after the return from this routine, a map is supposed to be generated from the created alm. For this purpose, a part of a FITS-header for a FITS-file where this map is supposed to be stored, is returned in header.


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:
read_asctab
routine to read a FITS-ascii file containing a powerspectrum.
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.
ran_tools
module, containing:
randgauss_boxmuller
function which returns a gaussian distributed random number. Please refer to the ``Comment on Random Number Generator'' in the Fortran90 facilities guidelines.


RELATED ROUTINES

This section lists the routines related to create_alm


synfast
executable using create_almto synthesize maps.
alm2map
Routine to transform a set of alm created by create_alm to a HEALPix map.
alms2fits
Routine to save a set of alm in a FITS-file.

Eric Hivon 2003-02-07