getsize_fits


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


Location in HEALPix directory tree: src/f90/mod/fitstools.f90


FORMAT

var=getsize_fits( filename, nmaps, ordering, obs_npix, nside, mlpol, type, polarisation )


ARGUMENTS

name&dimensionality kind in/out description
       
var I8B OUT number of pixels or time samples in the fits file
filename(LEN=filenamelen) CHR IN filename of the FITS-file containing HEALPix map(s).
nmaps (OPTIONAL) I4B OUT number of maps in the file.
ordering (OPTIONAL) I4B OUT pixel ordering, 0=unknown, 1=RING, 2=NESTED
obs_npix (OPTIONAL) I4B OUT number of non blanck pixels. It is set to -1 if it can not be determined from header information alone
nside (OPTIONAL) I4B OUT Healpix resolution parameter Nside
mlpol (OPTIONAL) I4B OUT maximum multipole used to generate the map (for simulated map)
type (OPTIONAL) I4B OUT Healpix/FITS file type
<0 : file not found, or not valid
0 : image only fits file, deprecated Healpix format (var = 12 * nside * nside)
1 : ascii table, generally used for C(l) storage
2 : binary table : with implicit pixel indexing (full sky) (var = 12 * nside * nside)
3 : binary table : with explicit pixel indexing (generally cut sky) (var $ \le$ 12 * nside * nside)
999 : unable to determine the type
polarisation (OPTIONAL) I4B OUT presence of polarisation data in the file
<0 : can not find out
0 : no polarisation
1 : contains polarisation (Q,U or G,C)


EXAMPLE:

npix= getsize_fits('map.fits', nmaps=nmaps, ordering=ordering,obs_npix=obs_npix, nside=nside, mlpol=mlpol, type=type, polarisation=polarisation)

Returns 1 or 3 in nmaps, dependent on wether 'map.fits' contain only temperature or both temperature and polarisation maps. The pixel ordering number is found by reading the keyword ORDERING in the FITS file. If this keyword does not exist, 0 is returned.

MODULES & ROUTINES

This section lists the modules and routines used by getsize_fits.

fitstools
module, containing:
printerror
routine for printing FITS error messages.
cfitsio
library for FITS file handling.


RELATED ROUTINES

This section lists the routines related to getsize_fits


anafast
executable that reads a HEALPix map and analyses it.

Eric Hivon 2003-02-07