write_fits_partial

This IDL facility writes out a unpolarized or polarized HEALPix map into a FITS file for a fraction of the sky.

Location in HEALPix directory tree: src/idl/fits/write_fits_partial.pro 


FORMAT

IDL> WRITE_FITS_PARTIAL, File, Pixel, IQU [, COLNAMES=, COORDSYS=, EXTENSION=, HDR=, HELP=, /NESTED, NSIDE=, ORDERING=, /RING, UNITS=, VERBOSE=, XHDR=]


QUALIFIERS

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

Pixel
(INT, LONG or LONG64 vector of length $n_{\rm p}$),
index of observed (or valid) pixels. Will be the first column of the FITS binary table

IQU
(FLOAT or DOUBLE array of size ($n_{\rm p}$, $n_{\rm c}$)),
I, Q and U Stokes parameters of each pixel (if $n_{\rm c}=3$), or I of each pixel (if $n_{\rm c}=1$)


KEYWORDS

COLNAMES=
STRING vector with FITS table column names (beside PIXEL) (not case sensitive: [A-Z,0-9,_])
default:TEMPERATURE, for 1 column,
TEMPERATURE, Q_POLARISATION, U_POLARISATION, for 3 columns,
or C01, C02, C03, C04, ... otherwise
If provided the number of COLNAMES must be $\ge$ the number of columns

COORDSYS=
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)

EXTENSION=
(0 based) extension number in which to write data. default:0. If set to 0 (or not set) a new file is written from scratch. If set to a value larger than 1, the corresponding extension is added or updated, as long as all previous extensions already exist. All extensions of the same file should use the same ORDERING, NSIDE and COORDSYS.

HDR=
String array containing the information to be put in the primary header.

HELP=
if set, an extensive help is displayed, and no file is written

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

NSIDE=
scalar integer, HEALPix resolution parameter of the data set. The resolution parameter should be made available to the FITS file, either thru this qualifier, or via the header (see XHDR).

ORDERING=
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
The ordering information should be made available to the FITS file, either thru a combination of Ordering/Ring/Nested, or via the header (see XHDR).

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

UNITS=
STRING scalar or vector describing the physical units of the table columns (except for the PIXEL one) if scalar, same units for all columns; if vector, each column can have its own units; if needed, the last UNITS provided will be replicated for the remaining columns

VERBOSE=
if set, the routine is verbose while writing the FITS file

XHDR=
String array containing the information to be put in the extension header.


DESCRIPTION

For more information on the FITS file format supported in HEALPix, including the one implemented in write_fits_partial, see https://healpix.sourceforge.io/data/examples/healpix_fits_specs.pdf


RELATED ROUTINES

This section lists the routines related to write_fits_partial

idl
version 6.4 or more is necessary to run write_fits_partial
read_fits_partial
This HEALPix IDL facility can be used to read in maps written by write_fits_partial.
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
sxaddpar
This IDL routine (included in HEALPix package) can be used to update or add FITS keywords to the header in HDR and XHDR


EXAMPLE:

nside = 512
pixel = lindgen(nside2npix(nside)/10)
write_fits_partial, 'map_part_T.fits', pixel, pixel*100., $
nside=nside, units='K', /ring
write_fits_partial, 'map_part_TQU.fits', pixel, pixel#[100.,1.,1.], $
nside=nside, units='K', /ring
write_fits_partial, 'map_part_xxxx.fits', pixel, pixel#[1.,-2.,3.,-4.], $
nside=nside,colnames=['c1',B2','xx','POWER'],units=['K','m','s','W'],$
/ring
will write in 'map_part_T.fits' a FITS binary table with the columns PIXEL and TEMPERATURE; in 'map_part_TQU.fits' a table with the columns PIXEL, TEMPERATURE, Q_POLARISATION and U_POLARISATION; and in 'map_part_xxxx.fits' a table with the columns PIXEL, C1, B2, XX and POWER.

Version 3.82, 2022-07-28