Previous: Low-Level FITS Header I/O Subroutines
Up: Subroutine Calling Sequence Definitions
Next: Define Data Scaling Parameters and Undefined Pixel Flags
Previous Page: Low-Level FITS Header I/O Subroutines
Next Page: Define Data Scaling Parameters and Undefined Pixel Flags
These subroutines provide a simple method of reading or writing most of the keyword values that are normally required in a FITS files. These subroutines are provided for convenience only and are not required to be used. If preferred, users may call the lower-level subroutines described in the previous section to individually read or write the required keywords. Note that the PCOUNT, GCOUNT and EXTEND keywords are not required in the primary header and are only written by the ftphpr subroutine if pcount is not equal to zero, gcount is not equal to zero or one, and if extend is TRUE, respectively. Similarly, the optional TUNITnnn and EXTNAME keywords are written by ftphtb or ftphbn only if the input string values are not blank.
It is important to realize that when creating a new FITS file that in addition to writing the required keywords to the header, one must also initialize the internal FITSIO buffers which define the structure of the FITS primary array or extension by calling one of the following subroutines: ftpdef, ftadef, or ftbdef. One common mistake is to forget to call ftpdef when attempting to create a null, or zero-length primary array.
FTPHPR(unit,simple,bitpix,naxis,naxes,pcount,gcount,extend, > status)
FTGHPR(unit,maxdim > simple,bitpix,naxis,naxes,pcount,gcount,extend, status)
FTPHTB(unit,rowlen,nrows,tfields,ttype,tbcol,tform,tunit,extname, > status)
FTGHTB(unit,maxdim > rowlen,nrows,tfields,ttype,tbcol,tform,tunit, extname,status)
FTPHBN(unit,nrows,tfields,ttype,tform,tunit,extname,varidat > status)
FTGHBN(unit,maxdim, > nrows,tfields,ttype,tform,tunit,extname,varidat, status)