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


fits2cl


This IDL facility provides a means to read from a FITS file an ascii or binary table extension containing power spectrum (C(l)) or spherical harmonics (al m) coefficients, and returns the corresponding power spectrum ( $C(l) = \sum_m a_{lm}a^*_{lm} / (2l+1)$). Reads primary and extension headers 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/fits2cl.pro


FORMAT

IDL> FITS2CL, cl_array, fitsfile, [HDR = ,/HELP, /INTERACTIVE, LLFACTOR=, MULTIPOLES=, /RSHOW, /SHOW, /SILENT=, XHDR =]


QUALIFIERS


cl_array
real array of Cl coefficients read or computed from the file. The output dimension depends on the contents of the file. This has dimension either (lmax+1,6) given in the sequence T E B TxE TxB ExB or (lmax+1,4) for T E B TxE or (lmax+1) for T alone. The convention for the power spectrum is that it is not normalised by the Harrison-Zeldovich (flat) spectrum.
fitsfile
String containing the name of the FITS file to be read. The file contains either C(l) power spectra or al m coefficients. In either cases, C(l) is returned.


KEYWORDS


HDR =
String array containing on output the primary header read from the FITS file.
/HELP
If set, produces an extended help message (using the doc_library IDL command).
/INTERACTIVE
If set, the plots generated by /SHOW and /RSHOW options are produced using iPlot routine, allowing for interactive cropping, zooming and annotation of the plots. This requires IDL 6.4 or newer to work properly.
LLFACTOR =
vector containing on output the factor $l(l+1)/2\pi$ which is often applied to C(l) to flatten it for plotting purposes
MULTIPOLES =
vector containing on output the multipoles l for which the power spectra are provided. They are either
- read from the file (1st column in the Planck format),
- or generated by the routine (assuming that all multipoles from 0 to lmax included are provided).
/RSHOW
If set, the raw power spectra C(l) read from the file are plotted
/SHOW
If set, the rescaled power spectra $l(l+1)C(l)/2\pi$ are plotted
/SILENT
If set, no message is issued during normal execution
XHDR =
String array containing on output the extension header read from the FITS file.


DESCRIPTION


fits2cl reads the power spectrum coefficients from a FITS file containing an ascii table extension. Descriptive headers conforming to the FITS convention can also be read from the input file.


RELATED ROUTINES

This section lists the routines related to fits2cl


idl
version 6.1 or more is necessary to run fits2cl.
bin_llcl
facility to bin a spectrum read with fits2cl.
bl2fits
facility to write a window function into a FITS file.
cl2fits
provides the complimentary routine to write a power spectrum to a FITS file.
fits2alm, alm2fits
routines to read and write alm coefficients
ianafast
IDL routine computing C(l) files that can be read by fits2cl.
anafast
F90 facility computing C(l) files that can be read by fits2cl.


EXAMPLE:

fits2cl, pwrsp, '$HEALPIX/test/cl.fits', $
HDR=hdr, XHDR=xhdr, MULTI=l, LLFACT=fll
plot, l, powrsp[*,0]*fll

fits2cl reads a power spectrum C(l) from the input FITS file $HEALPIX/test/cl.fits into the variable pwrsp, with optional headers passed by the string variables hdr and xhdr. The multipoles l and factors $l(l+1)/2\pi$ are read into l and fll respectively. $l(l+1)C(l)/2\pi$ vs l is then plotted.

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

CL 03-2650