NASA - Jet Propulsion Laboratory
    + View the NASA Portal
Search JPL
Jet Propulsion Laboratory Home Earth Solar System Stars & Galaxies Technology
Introduction Background Software Links


This IDL routine provides a means to write spherical harmonic coefficients (and optional errors) and their index label to a FITS file. Each signal is written to a separate binary table extension. The routine also writes header information if required. The facility is primarily designed to allow the user to write a FITS files containing constraints for a constrained realisation performed by the HEALPix facility synfast.

Location in HEALPix directory tree: src/idl/fits/


IDL> ALM2FITS, index, alm_array, fitsfile, [HDR = , /HELP, XHDR = ]


Long array containing the index for the corresponding array of alm coefficients (and erralm if required). The index i is related to l,m by the relation
i = l2 + l + m + 1
Real array of alm coefficients written to 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 written.


String array containing the primary header to be written in the FITS file.
If set, the routine documentation header is shown and the routine exits
String array containing the extension header. If ALL signals are required, then each extension table is given this header.
NOTE: optional header strings should NOT include the header keywords explicitly written by this routine.


alm2fits writes the input alm coefficients (and associated errors if required) into a FITS file. Each signal type is written as a separate binary table extension. Optional headers conforming to the FITS convention can also be written to the output file. All required FITS header keywords are automatically generated by the routine and should NOT be duplicated in the optional header inputs. The keywords EXTNAME and TTYPE* are now also automatically generated.


This section lists the routines related to alm2fits

version 6.1 or more is necessary to run alm2fits.
provides the complimentary routine to read in alm coefficients from a FITS file.
converts the alm order and degree (l, m) into the index i = l2 + l + m + 1 required by alm2fits.
routine to write a power spectrum into a FITS file.
routine to read/compute C(l) power spectra from a file containing C(l) or alm coefficients
utilises the output file generated by alm2fits.
utilises the output file generated by alm2fits.


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

alm2fits writes the coefficients stored in the variable alm to the output FITS file alm.fits with optional headers passed by the string variables hdr and xhdr.

Eric Hivon 2010-06-18
Privacy / Copyright
FIRST GOV Contact: NASA Home Page Site Manager:

CL 03-2650