This routine writes the baseline FITS header for the most common HEALPix data sets: (cut sky or full sky) map, C(l) power spectra and alm coefficients.

Location in HEALPix directory tree: src/f90/mod/head_fits.F90 


call write_minimal_header( header, dtype, [append, nside, order, ordering, coordsys, creator, version, randseed, beam_leg, fwhm_degree, units, nlmax, polar, nmmax, bcross, deriv, asym_cl] )

Arguments appearing in italic are optional.


name & dimensionality kind in/out description
header(LEN=80) DIMENSION(:) CHR INOUT The FITS header to fill in.
dtype(LEN=*) CHR IN data to be put in the FITS file, must be one of 'ALM', 'CL', 'MAP', 'CUTMAP' (case un-sensitive).
name & dimensionality kind in/out description
append LGT IN if set to TRUE, the keywords will be appended to the content of header instead of written from scrath
nside I4B IN map resolution parameter; required for dtype='MAP' and dtype='CUTMAP'
order I4B IN map ordering, either 1 (=ring) or 2 (=nested); see ordering
ordering(LEN=*) CHR IN map ordering, either 'RING' or 'NESTED' (case un-sensitive); either order or ordering is required for dtype='MAP' and dtype='CUTMAP'
coordsys(LEN=*) CHR IN map coordinate system; Valid choices are 'G' = Galactic, 'E' = Ecliptic, 'C'/'Q' = Celestial = eQuatorial
creator(LEN=*) CHR IN name of software generating the data set
version(LEN=*) CHR IN version of creator software
randseed I4B IN random number generator seed used to generate the data
beam_leg(LEN=*) CHR IN File containing Legendre transform of symmetric beam
fwhm_degree DP IN FWHM in degrees of gaussian symmetric beam (FITS keyword: FWHM)
units(LEN=*) CHR IN physical units of the data set (FITS keyword: TUNIT*)
nlmax I4B IN maximum multipole order l of the data set (FITS keyword: MAX-LPOL)
polar LGT IN if set to .TRUE., the file to be written contains polarized data
nmmax I4B IN maximum degree m of data set (FITS keyword: MAX-MPOL)
bcross LGT IN if set to .TRUE., the magnetic cross terms power spectra (TB and EB) are included; only applies to dtype='CL'
deriv I4B IN order of derivatives to included in FITS file (0, 1 or 2); only applies to dtype='MAP'
asym_cl LGT IN if set to .TRUE., the asymmetric power spectra (ET, BT and BE on top of TE, TB and EB) are included; only applies to dtype='CL'


use healpix_types
use head_fits
character(len=80), dimension(1:60) :: header
call write_minimal_header(header, 'MAP', nside=256, ordering='Nested')
call add_card(header, 'HISTORY', 'Dummy map')
Writes in header a HEALPix compliant FITS header for a ${N_{\rm side}}=256$ map with NESTED ordering. Further HISTORY information is added with add_card


This section lists the modules and routines used by write_minimal_header.

more general routine for adding a keyword to a header.
library for FITS file handling.


This section lists the routines related to write_minimal_header

general purpose routine to write/edit an arbitrary keyword into a FITS file header.
general purpose routine to read any keywords from a header in a FITS file.
routine to discard a keyword from a FITS header
read_par, number_of_alms
routines to read specific keywords from a header in a FITS file.
function returning the size of the data set in a fits file and reading some other useful FITS keywords
routine to merge two FITS headers

Version 3.31, 2017-01-06