fits2alm


This IDL routine provides a means to read from a FITS file binary table extension(s) containing spherical harmonic coefficients alm (and optional errors) and their index. Reads header information if required. The facility is intended to enable the user to read the output from the HEALPix facilities anafast and synfast.


Location in HEALPix directory tree: src/idl/fits/fits2alm.pro


FORMAT

IDL> FITS2ALM, index, alm_array, fitsfile, [signal, HDR = , XHDR = ]


QUALIFIERS


index
Long array containing the index for the corresponding array of alm coefficients (and errors if required). The index i is related to (l,m) by the relation
i = l2 + l + m + 1.
This has dimension nl (see below).
alm_array
Real or double array of alm coefficients read from the file. This has dimension (nl,nalm,nsig) - corresponding to
nl = number of (l,m) indices
nalm = 2 for real and imaginary parts of alm coefficients or 4 for above plus corresponding error values
nsig = number of signals to be written (1 for any of T E B or 3 if ALL to be written). Each signal is stored in a separate extension.
fitsfile
String containing the name of the file to be read.
signal
String defining the signal coefficients to read Valid options: 'T', 'E', 'B' or 'ALL'
default:'T'.


KEYWORDS


HDR =
String array containing the primary header for the FITS file.
XHDR =
String array containing the extension header(s). If ALL signals are required, then the three extension headers are returned appended into one string array.


DESCRIPTION


fits2alm reads binary table extension(s) which contain the alm coefficients (and associated errors if present) from a FITS file. FITS headers can also optionally be read from the input file.


RELATED ROUTINES

This section lists the routines related to fits2alm


idl
version 5.0 or more is necessary to run cl2fits.
alm2fits
provides the complimentary routine to write alm coefficients into a FITS file.
index2lm
converts the index i = l2 + l + m + 1 returned by fits2alminto l and m
fits2cl
routine to read/compute C(l) power spectra from a file containing C(l) or alm coefficients
alteralm
provides alm coefficients file to be read by fits2alm.
anafast
provides alm coefficients file to be read by fits2alm.
synfast
provides alm coefficients file to be read by fits2alm.


EXAMPLE:

fits2alm, index, alm, 'alm.fits', HDR = hdr, XHDR = xhdr

fits2alm reads from the input FITS file alm.fits the alm coefficients into the variable alm with optional headers passed by the string variables hdr and xhdr. Upon return index will contain the value of l2 + l + m + 1 for each alm found in the file.

Eric Hivon 2005-08-31