NASA - Jet Propulsion Laboratory
    + View the NASA Portal
Search JPL
Jet Propulsion Laboratory Home Earth Solar System Stars & Galaxies Technology
Introduction Background Software Links


add_card


This routine writes a keyword of any kind into a FITS header. It is a wrapper to other routines that write keywords of different kinds.


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


FORMAT

call add_card( header, kwd, value [, comment, update] )

Arguments appearing in italic are optional.


ARGUMENTS

name & dimensionality kind in/out description
       
header(LEN=80) DIMENSION(:) CHR INOUT The header to write the keyword to.
kwd(LEN=*) CHR IN the FITS keyword to write. Should be shorter or equal to 8 characters.
value any IN the value to give to the keyword.
comment(LEN=*) CHR IN comment to the keyword.
update LGT IN if set to .true., the first occurence of the keyword kwd in header will be updated (and all other occurences removed); otherwise, the keyword will be appended at the end (and any previous occurence removed). If the keyword is either 'HISTORY' or 'COMMENT', update is ignored and the keyword is peacefully appended at the end of the header.


EXAMPLE:

character(len=80), dimension(1:120) :: header
header = '' ! very important
call add_card(header,'NSIDE',256,'the nside of the map')

Gives the keyword `NSIDE' the value 256 in the given header-string. It is important to make sure that the header string array is empty before attempting to write anything in it.


MODULES & ROUTINES

This section lists the modules and routines used by add_card.

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


RELATED ROUTINES

This section lists the routines related to add_card


write_minimal_header
routine to write HEALPix compliant baseline FITS header
get_card
general purpose routine to read any keywords from a header in a FITS file.
del_card
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.
getsize_fits
function returning the size of the data set in a fits file and reading some other useful FITS keywords
merge_headers
routine to merge two FITS headers

Eric Hivon 2010-06-18
Privacy / Copyright
FIRST GOV Contact: NASA Home Page Site Manager:
Webmaster:

CL 03-2650