write_fits_sb

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/write_fits_sb.pro 


FORMAT

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


QUALIFIERS

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

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

Xten_stc
(optional),
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.


KEYWORDS

Coordsys=
(optional),
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)

Ordering=
(optional),
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

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

Extension=
(optional),
scalar integer, extension in which to write the data (0 based).
default:0

/Nested
(optional),
if set, specifies that the map is in the NESTED ordering scheme
see also:Ordering and Ring

/Ring
(optional),
if set, specifies that the map is in the RING ordering scheme
see also:Ordering and Nested

/Partial
(optional),
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.

/Nothealpix
(optional),
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.


DESCRIPTION

$\textstyle \parbox{\hsize}{\facname {} writes out the information contained in ...
...{30}$.\\
\par
If {\tt Nothealpix} is set, the restrictions on Nside are void.}$


RELATED ROUTINES

This section lists the routines related to write_fits_sb

idl
version 6.4 or more is necessary to run write_fits_sb
read_fits_map
This HEALPix IDL facility can be used to read in maps written by write_fits_sb.
read_fits_s
This HEALPix IDL facility can be used to read into an IDL structure maps written by write_fits_sb.
sxaddpar
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_partial, write_fits_map
write_tqu, write_fits_sb
HEALPix IDL routines to write cut-sky and partial maps, full-sky maps, polarized full-sky maps and arbitrary data sets into FITS files
write_tqu
This HEALPix IDL facility based on write_fits_sb is designed to write temperature+polarization (T,Q,U) maps


EXAMPLE:

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'.

Version 3.82, 2022-07-28