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 facility writes out a HEALPix map into a FITS file according to the HEALPix convention. It can also write an arbitray data set into a FITS binary table

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


IDL> WRITE_FITS_SB , File, Prim_Stc [, Xten_stc, Coordsys=, /Nested, /Ring, Ordering=, /Partial, Nside=, Extension=, /Nothealpix]


name of a FITS file in which the map is to be written

IDL structure containing the following fields:
- primary header
- primary image
Set it to 0 to get an empty primary unit

IDL structure containing the following fields:
- extension header
- data column 1
- data column 2
NB: because of some astron routines limitation, avoid using the single letters 'T' or 'F' as tagnames in the structures Prim_stc and Xten_stc.


if set to either 'C', 'E' or 'G', specifies that the Healpix coordinate system is respectively Celestial=equatorial, Ecliptic or Galactic. (The relevant keyword is then added/updated in the extension header, but the map is NOT rotated)

if set to either 'ring' or 'nested' (case un-sensitive), specifies that the map is respectively in RING or NESTED ordering scheme
see also:Nested and Ring

scalar integer, HEALPix resolution parameter of the data set. Must be used when the data set does not cover the whole sky

scalar integer, extension in which to write the data (0 based).

if set, specifies that the map is in the NESTED ordering scheme
see also:Ordering and Ring

if set, specifies that the map is in the RING ordering scheme
see also:Ordering and Nested

if set, the data set does not cover the whole sky. In that case the information on the actual map resolution should be given by the qualifier Nside (see above), or included in the FITS header enclosed in the Xten_stc.

if set, the data set can be arbitrary, and the restriction on the number of pixels do not apply. The keywords Ordering, Nside, Nested, Ring and Partial are ignored.


$\textstyle \parbox{\hsize}{\facname writes out the information contained in {\t...
...he Nside qualifier is given a valid value OR the FITS header contains

If Nothealpix is set, the restrictions on Nside a void.


This section lists the routines related to write_fits_sb

version 6.1 or more is necessary to run write_fits_sb
This HEALPix IDL facility can be used to read in maps written by write_fits_sb.
This HEALPix IDL facility can be used to read into an IDL structure maps written by write_fits_sb.
This IDL routine (included in HEALPix package) can be used to update or add FITS keywords to the header in Prim_stc and Exten_stc
write_fits_cut4, write_fits_map
write_tqu, write_fits_sb
HEALPix IDL routines to write cut-sky maps, full-sky maps, polarized full-sky maps and arbitrary data sets into FITS files
This HEALPix IDL facility based on write_fits_sb is designed to write temperature+polarization (T,Q,U) maps


npix = nside2npix(128)
f= randomn(seed,npix)
n= lindgen(npix)+3
map_FN = create_struct('HDR',[' '],'FLUX',f,'NUMBER',n)
write_fits_sb, 'map_fluxnumber.fits', 0, map_FN, coord='G', /ring

The structure map_FN is defined to contain a fictitious Flux+number map, where one field is a float and the other an integer. write_fits_sb writes out the contents of map_FN into the extension of the FITS file 'map_fluxnumber.fits'.

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

CL 03-2650