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/



IDL> FITS2ALM, index, alm_array, fitsfile, [signal, /HELP, HDR=, LMAX=, LMIN=, XHDR= ]


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).
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.
String containing the name of the file to be read.
String defining the signal coefficients to read Valid options: 'T', 'E', 'B' or 'ALL'


String array containing the primary header read from the FITS file.
If set, the routine documentation header is shown and the routine exits
Largest l multipole to be output
Smallest l multipole to be output. If LMIN (resp. LMAX) is below (above) the range of l's present in the file, it will be silently ignored
String array containing the read extension header(s). If ALL signals are required, then the three extension headers are returned appended into one string array.


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.


This section lists the routines related to fits2alm

version 6.4 or more is necessary to run fits2alm.
provides the complimentary routine to write alm coefficients into a FITS file.
alm_i2t, alm_t2i
these facilities turn indexed lists of alm into 2D a(l,m) tables and back
converts the index i = l2 + l + m + 1 returned by fits2alm into l and m
converts (l, m) vectors into i = l2 + l + m + 1
routine to read/compute C(l) power spectra from a file containing C(l) or alm coefficients
ianafast, isynfast
IDL routine providing alm coefficients file to be read by fits2alm.
alteralm, anafast, synfast
F90 facilities providing alm coefficients file to be read by fits2alm.


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.

Version 3.31, 2017-01-06