fits2alm


This IDL routine provides a means to read from a FITS file binary table extension(s) containing spherical harmonic coefficients (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 facility anafast.


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
alm_array
Real 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.
anafast
provides the output 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.

Eric Hivon 2003-02-07