getsize_fits


This IDL function reads the number of maps and/or the pixel ordering of a FITS file containing a HEALPix map.

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


FORMAT

IDL> var = GETSIZE_FITS (File, [Nmaps=, Nside=, Mlpol=, Ordering=, Obs_Npix=, Type=, Header=, Extension=, /Help])


QUALIFIERS

File
name of a FITS file containing the HEALPix map(s).

var
contains on output the number of pixels stored in a map FITS file. Each pixel is counted only once (even if several information is stored on each of them, see nmaps). Depending on the data storage format, result may be :
- equal or smaller to the number Npix of Healpix pixels available over the sky for the given resolution (Npix = 12*nside*nside)
- equal or larger to the number of non blank pixels (obs_npix)

Nmaps=
contains on output the number of maps in the file

Nside=
contains on output the HEALPix resolution parameter $N_{\rm side}$

Mlpol=
contains on output the maximum multipole used to generate the map

Ordering=
contains on output the pixel ordering scheme: either 'RING' or 'NESTED'

Obs_Npix=
contains on output the number of non blanck pixels. It is set to -1 if it can not be determined from header

Type=
Healpix/FITS file type
<0 : file not found, or not valid
0 : image only fits file, deprecated Healpix format (var $=12N_{\rm side}^2$)
1 : ascii table, generally used for C(l) storage
2 : binary table : with implicit pixel indexing (full sky) (var $=12N_{\rm side}^2$)
3 : binary table : with explicit pixel indexing (generally cut sky) (var $\le 12N_{\rm side}^2$)
999 : unable to determine the type

Header=
contains on output the FITS extension header

Extension=
extension unit to be read from FITS file: either its 0-based ID number (ie, 0 for first extension after primary array) or the case-insensitive value of its EXTNAME keyword.


KEYWORDS

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


DESCRIPTION

getsize_fits gets the number of pixels in a FITS file. If the file follows the HEALPix standard, the routine can also get the resolution parameter Nside, the ordering scheme, ..., and can determine the type of data set contained in the file.


RELATED ROUTINES

This section lists the routines related to getsize_fits

idl
version 6.4 or more is necessary to run getsize_fits
read_fits_map
This HEALPix IDL facility can be used to read in maps written by getsize_fits .
sxaddpar
This IDL routine (included in HEALPix package) can be used to update or add FITS keywords to Header
reorder
This HEALPix IDL routine can be used to reorder a map from NESTED scheme to RING scheme and vice-versa.
write_fits_sb
routine to write multi-column binary FITS table


EXAMPLE:

npix = getsize_fits(!healpix.directory+'/test/map.fits', nside=nside, $
$\quad$ mlpol=lmax, type=filetype)
print, npix, nside, lmax, filetype
$\textstyle \parbox{\hsize}{ should produce something like \\
{\em 196608 \ \ ...
...s
nside=128, the maximum multipole was 256, and this a full sky map
(type 2).
}$

Version 3.31, 2017-01-06