fits2alm

This IDL routine provides a means to read from a FITS file binary table extension(s) containing spherical harmonic coefficients $a_{\ell m}$ (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, /HELP, HDR=, LMAX=, LMIN=, XHDR= ]


QUALIFIERS

index
Long array containing the index for the corresponding array of $a_{\ell m}$ coefficients (and errors if required). The index i is related to $(\ell, m)$ by the relation
$i = \ell^2 + \ell + 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 $(\ell, 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 read from the FITS file.
/HELP
If set, the routine documentation header is shown and the routine exits
LMAX=
Largest $\ell$ multipole to be output
LMIN=
Smallest $\ell$ 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
XHDR=
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.


DESCRIPTION

fits2alm reads binary table extension(s) which contain the $a_{\ell m}$ 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 6.4 or more is necessary to run fits2alm.
alm2fits
provides the complimentary routine to write $a_{\ell m}$ coefficients into a FITS file.
alm_i2t, alm_t2i
these facilities turn indexed lists of $a_{\ell m}$ into 2D a(l,m) tables and back
index2lm
converts the index $i = \ell^2 + \ell + m + 1$ returned by fits2alm into $\ell$ and m
lm2index
converts ($\ell$, m) vectors into $i = \ell^2 + \ell + m + 1$
fits2cl
routine to read/compute $C(\ell)$ power spectra from a file containing $C(\ell)$ or $a_{\ell m}$ coefficients
ianafast, isynfast
IDL routine providing $a_{\ell m}$ coefficients file to be read by fits2alm.
alteralm, anafast, synfast
F90 facilities providing $a_{\ell m}$ 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 $a_{\ell m}$ coefficients into the variable alm with optional headers passed by the string variables hdr and xhdr. Upon return index will contain the value of $\ell^2 + \ell + m + 1$ for each $a_{\ell m}$ found in the file.

Version 3.82, 2022-07-28